Slide de ma présentation au Voxxed Days Luxembourg 2017.
http://cfp-voxxed-lux.yajug.org/2017/talk/KMC-5325/Documentation_as_code:_controler_la_qualite_!
"Document as code" consiste à utiliser toutes les bonnes pratiques que nous utilisons pour notre source code et de les appliquer à la documentation. Les points clés sont :
* Utiliser un outil de gestion des sources (git) et de préférence le même que pour les sources.
* Un format de texte simple (pas de XML) comme AsciiDoc.
* Mettre en place des outils d'intégration continu et déploiement continu
Lorsque cette bonne pratique est en place, se pose une seconde catégorie de problème. Comment garantir la qualité :
* Faciliter la barrière à l’entrée en proposant un lien pour éditer la documentation sur chaque page et pour soumettre une pull request.
* Test systématique des exemples de code
* Respect des conventions de documentation
* Métriques et dashboard pour garantir la qualité
* Partage de bonnes pratiques/revue de documentation.
Cette présentation est un retour d’expérience et donne quelques bonnes pratiques de documentation. C'est un aperçu de ce qui peut être mis en place pour s’assurer de la qualité de la doc.
9. #DocAsCode #voxxed_lu
La syntaxe «AsciiDoc»
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
10. #DocAsCode #voxxed_lu
La syntaxe «AsciiDoc»
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
Document Title
Section Level 1
11. #DocAsCode #voxxed_lu
La syntaxe «AsciiDoc»
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
Unordered list items
12. #DocAsCode #voxxed_lu
La syntaxe «AsciiDoc»
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
bold italic
code
13. #DocAsCode #voxxed_lu
La syntaxe «AsciiDoc»
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
External link with title
14. #DocAsCode #voxxed_lu
La syntaxe «AsciiDoc»
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
15. #DocAsCode #voxxed_lu
La syntaxe «AsciiDoc»
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
23. #DocAsCode #voxxed_lu
[[lst-wikitext1, Listing 1]]
[source,java]
----
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n
parser.parse(mediawikiText); // <1>
return writer.toString();
}
----
<1> Main call of the Mylyn Wikitext framework
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
24. #DocAsCode #voxxed_lu
[[lst-wikitext1, Listing 1]]
[source,java]
----
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n
parser.parse(mediawikiText); // <1>
return writer.toString();
}
----
<1> Main call of the Mylyn Wikitext framework
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
25. #DocAsCode #voxxed_lu
[[lst-wikitext1, Listing 1]]
[source,java]
----
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n
parser.parse(mediawikiText); // <1>
return writer.toString();
}
----
<1> Main call of the Mylyn Wikitext framework
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
28. #DocAsCode #voxxed_lu
[[lst-wikitext1, Listing 1]]
[source,java]
----
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n
parser.parse(mediawikiText); // <1>
return writer.toString();
}
----
<1> Main call of the Mylyn Wikitext framework
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
29. #DocAsCode #voxxed_lu
[[lst-wikitext1, Listing 1]]
[source,java]
----
include::src/main/java/MediawikiTest.java[tags=method]
----
<1> Main call of the Mylyn Wikitext framework
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
code snippet taken from
real source code
30. #DocAsCode #voxxed_lu
public class MediawikiTest {
//tag::method[]
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), new H
parser.parse(mediawikiText); // <1>
return writer.toString();
}
//end::method[]
@Test
public void test() {
StringBuilder sb = new StringBuilder();
sb.append("= Heading 1 =n");
sb.append("n");
sb.append("Hello World!n");
sb.append("n"); #DocAsCode #voxxed_lu
32. #DocAsCode #voxxed_lu
* Add page `OrganizationTablePage` with title
"Organizations" using the Scout new page wizard
[[lst-contacts_OrganizationTablePage, Listing
OrganizationTablePage]]
[source,java]
.Initial implementation of class OrganizationTablePage.
----
include::{codedir}/contacts/org.eclipse.scout.contacts.clie
----
<1> Make sure to add a translated text entry for
"Organizations" using the Scout NLS tooling
The implementation of class `OrganizationTablePage` using
the Scout new page wizard then looks as shown in <<lst-
contacts_OrganizationTablePage>>.
49. #DocAsCode #voxxed_lu
Screenshots würde ich jeweils ohne den
Browserrahmen machen
Die Bildbeschriftungen sind noch auf Englisch
(Figure statt Abbildung)