Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Book/3.9"

< Scout‎ | Book
(Review and Complete your Contribution)
(The Eclipse Scout Book)
(29 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
== The Eclipse Scout Book ==
 
== The Eclipse Scout Book ==
  
The Eclipse Scout Book is the attempt to significantly improve the state of the documentation of the Eclipse Scout framework.
+
The Eclipse Scout Book project described here is an attempt/experiment to significantly improve the state of the documentation of the Eclipse Scout framework.
 
+
 
The goal of this effort is to have written a substantial part of the book by Kepler release date (June 2013 - the content of the book will target Scout 3.9)
 
The goal of this effort is to have written a substantial part of the book by Kepler release date (June 2013 - the content of the book will target Scout 3.9)
  
To allow for participation by the community the book will be written in the open from it's very first version (as of now (December 4th 2012) there is hardly more than the proposed table of contents with some pointers to existing forum entries.
+
To allow for participation by the community, the book will be written in the open from it's very first version (as of now, December 14th 2012) there is hardly more than the proposed table of contents with some pointers to existing forum entries.
 +
 
 +
[[Image:Bsi_eclipse_scout_crowdwriting_2.png‎]] [[Image:Eclipse_scout_crowdwriting_raspberrypi.jpg‎]]
 +
 
 +
[[#Your_Contribution|How do I contribute?]]
  
 
== Repository and Download ==
 
== Repository and Download ==
Line 32: Line 35:
 
* [http://tools.bsiag.com/scoutbook/latest/html/book.zip zip file (html)]
 
* [http://tools.bsiag.com/scoutbook/latest/html/book.zip zip file (html)]
 
* [http://tools.bsiag.com/scoutbook/latest/epub/book.epub epub file]
 
* [http://tools.bsiag.com/scoutbook/latest/epub/book.epub epub file]
 +
 +
== Your Contribution ==
 +
To demonstrate our acknowledgment of community contributions we decided to give away a [http://www.raspberrypi.org/ Raspberry Pi] to anyone handing in a meaningful contribution before May 3rd 2013 (Kepler M7 +0).
 +
 +
In the above context, 'we' is defined as the set of [http://www.eclipse.org/projects/project.php?id=technology.scout Scout committers] where the contribution needs to get some +1 and no -1.
 +
The other part that needs an explanation is the term 'meaningful' contribution which is subjective, of course.
 +
We would roughly want to see the following items:
 +
 +
* Acceptance of the licencing terms (detailed below)
 +
* Following the contribution workflow (detailed below)
 +
* A pull request to discuss the topic you write about
 +
* An updated pull request with a couple of pages worth of text
 +
* Text shows understanding of the topic
 +
* Text shows the author cares about the reader
 +
* Text adds new material to the book
 +
* Text is not a random copy paste effort
 +
* Text does not necessarily need to end up in the 3.9 version of the book
  
 
== Licencing Terms for Contributions ==
 
== Licencing Terms for Contributions ==
Line 65: Line 85:
  
 
The contribution workflow outlined above is explained step-by-step in the reminder of this article. It would be great if you would find the time to contribute to the Scout book and help us to foster a healthy and growing community around Eclipse Scout.
 
The contribution workflow outlined above is explained step-by-step in the reminder of this article. It would be great if you would find the time to contribute to the Scout book and help us to foster a healthy and growing community around Eclipse Scout.
 +
 +
== Why LaTeX? ==
 +
 +
There are many valid approaches to professionally write a book. Our choice of [http://en.wikipedia.org/wiki/LaTeX LaTeX] is primairly based on the following properties:
 +
* Good previous experience with documents significantly larger than 100 pages
 +
* Possibility to have PDF, HTML, EPUB outputs from a single source
 +
* Text based format makes it ideal to use with version control (Git in our case)
 +
* Possiblity to link to code snippes directly from project workspaces (this helps to make sure that the code in the book actually compiles)
 +
* Professional quality output for printing
 +
 +
If your are new to LaTeX, think of it as ''Scripting'' language to ''write'' a book. Here are a couple of high-level recommendations:
 +
* If you need to have some specific layout, first try to find an existing example in the book. Then, do the same.
 +
* You might want to have a look at tutorial first. Start with [http://tobi.oetiker.ch/lshort/lshort.pdf ''The Not So Short Introduction to LaTeX''] (if you would like to recommend other sources, please add them here).
 +
* Don't try too hard to manipulate the layouting.
 +
* Try to let LaTeX do as much as possible.
  
 
== Setting Things Up ==
 
== Setting Things Up ==
Line 102: Line 137:
  
 
   a@1 ~/Desktop/oss/github
 
   a@1 ~/Desktop/oss/github
   $ mkdir matthiaszimmermanntest
+
   $ <font style="color:blue">mkdir matthiaszimmermanntest</font>
 
    
 
    
 
   a@1 ~/Desktop/oss/github
 
   a@1 ~/Desktop/oss/github
   $ cd matthiaszimmermanntest/
+
   $ <font style="color:blue">cd matthiaszimmermanntest/</font>
  
 
Clone the fork into your local repository
 
Clone the fork into your local repository
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest
   $ git clone https://github.com/matthiaszimmermanntest/scoutbook.git
+
   $ <font style="color:blue">git clone https://github.com/matthiaszimmermanntest/scoutbook.git</font>
 
   Cloning into 'scoutbook'...
 
   Cloning into 'scoutbook'...
 
   remote: Counting objects: 568, done.
 
   remote: Counting objects: 568, done.
Line 125: Line 160:
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest
   $ cd scoutbook/
+
   $ <font style="color:blue">cd scoutbook/</font>
 
    
 
    
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
   $ ls -l
+
   $ <font style="color:blue">ls -l</font>
 
   total 2.0k
 
   total 2.0k
 
   -rw-r--r--    1 mzi      Administ      132 Nov 29 22:04 README.textile
 
   -rw-r--r--    1 mzi      Administ      132 Nov 29 22:04 README.textile
Line 143: Line 178:
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
   $ git remote add upstream git@github.com:BSI-Business-Systems-Integration-AG/scoutbook.git
+
   $ <font style="color:blue">git remote add upstream git@github.com:BSI-Business-Systems-Integration-AG/scoutbook.git</font>
  
 
With the above command you created the gray arrow from the ''blessed repository'' to your local repository according to the illustration provided [http://git-scm.com/book/en/Distributed-Git-Distributed-Workflows#Integration-Manager-Workflow here].
 
With the above command you created the gray arrow from the ''blessed repository'' to your local repository according to the illustration provided [http://git-scm.com/book/en/Distributed-Git-Distributed-Workflows#Integration-Manager-Workflow here].
Line 149: Line 184:
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
   $ git remote -v
+
   $ <font style="color:blue">git remote -v</font>
 
   origin  https://github.com/matthiaszimmermanntest/scoutbook.git (fetch)
 
   origin  https://github.com/matthiaszimmermanntest/scoutbook.git (fetch)
 
   origin  https://github.com/matthiaszimmermanntest/scoutbook.git (push)
 
   origin  https://github.com/matthiaszimmermanntest/scoutbook.git (push)
Line 219: Line 254:
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
   $ make pdf
+
   $ <font style="color:blue">make pdf</font>
  
 
The complete sequence of commands to generate all three output formats is
 
The complete sequence of commands to generate all three output formats is
  
   make clean
+
   <font style="color:blue">make clean</font>
   make pdf
+
   <font style="color:blue">make pdf</font>
   make html
+
   <font style="color:blue">make html</font>
   make epub
+
   <font style="color:blue">make epub</font>
  
 
The output will then be moved to the following locations
 
The output will then be moved to the following locations
Line 241: Line 276:
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
   $ checkout master
+
   $ <font style="color:blue">checkout master</font>
   $ git pull upstream master
+
   $ <font style="color:blue">git pull upstream master</font>
  
 
Next, bring you public repository up to date
 
Next, bring you public repository up to date
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
   $ git push origin master
+
   $ <font style="color:blue">git push origin master</font>
  
 
=== Create your Local Branch ===
 
=== Create your Local Branch ===
Line 254: Line 289:
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
   $ git branch matthiaszimmermanntest-client_notification
+
   $ <font style="color:blue">git branch matthiaszimmermanntest-client_notification</font>
   $ git checkout matthiaszimmermanntest-client_notification
+
   $ <font style="color:blue">git checkout matthiaszimmermanntest-client_notification</font>
  
 
Please use the following naming scheme for your topic branches <githubuser-meaningful_contribution_name>. Managing pull requests will get significantly simpler (In the example above ''matthiaszimmermanntest'' is contributing the material to describe the ''client_notification'' mechanism of Scout.
 
Please use the following naming scheme for your topic branches <githubuser-meaningful_contribution_name>. Managing pull requests will get significantly simpler (In the example above ''matthiaszimmermanntest'' is contributing the material to describe the ''client_notification'' mechanism of Scout.
Line 299: Line 334:
 
=== An Example Contribution ===
 
=== An Example Contribution ===
  
Let's assume that you will be describing the client notification mechanism of Scout. During browsing of the table of contents you find that this topic is to be covered in a separate chapter in part "User Interface" of the book.
+
Let's assume that you will be describing the '''client notification''' mechanism of Scout. During browsing of the table of contents you find that this topic is to be covered in a separate chapter in part "User Interface" of the book.
Starting with the file ''book.tex'' you find the following latex "code":
+
Starting with the file ''./tex/book.tex'' (the root file of the book) you find the following latex "code":
  
 
   % --------------------------------------------------------------------------- %
 
   % --------------------------------------------------------------------------- %
Line 307: Line 342:
 
   \include{ScoutClient/ScoutClient}
 
   \include{ScoutClient/ScoutClient}
  
This means, that you have to open latex file ''ScoutClient/ScoutClient.tex''. In that file you find the corresponding chapter:
+
Alternatively you can search (grep command) for any string in the GitHub shell as shown below (in the example we search for '''notification''')
 +
 
 +
  a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 +
  $ <font style="color:blue">grep -r -i "notification" ./tex | grep ".tex:"</font>
 +
  ./tex/ScoutClient/ScoutClient.tex:\chapter{Client Notification}
 +
  ./tex/ScoutClient/ScoutClient.tex:  \item concept wiki: \url{http://wiki.eclipse.org/Scout/Concepts/Client_Notification}
 +
 
 +
This means, that you have to open latex file ''./tex/ScoutClient/ScoutClient.tex''. In that file you find the corresponding chapter:
  
 
   % =========================================================================== %
 
   % =========================================================================== %
Line 320: Line 362:
 
   \end{itemize}
 
   \end{itemize}
  
Obviously, there is a lot of room for improvement. As some initial guideline you find the pointers to existing documentation in the itemized list.  
+
Obviously, there is a lot of room for improvement. As some initial guideline you find the pointers to existing documentation in the itemized list. It will make sense to have read and understood the listed items to make sure that your suggested content will reflect the already existing information.
  
 
To contribute to an initially empty chapter/section, please use the latex include mechanism to put your contribution into an additonal file. As an example we create a new (and intially empty) file ''ClientNotification.tex'' in directory ''ScoutClient'' that we can include as follows:
 
To contribute to an initially empty chapter/section, please use the latex include mechanism to put your contribution into an additonal file. As an example we create a new (and intially empty) file ''ClientNotification.tex'' in directory ''ScoutClient'' that we can include as follows:
Line 376: Line 418:
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (matthiaszimmermanntest-client_notification)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (matthiaszimmermanntest-client_notification)
   $ git status
+
   $ <font style="color:blue">git status</font>
 
   # to check the list of files you want to include to your commit
 
   # to check the list of files you want to include to your commit
 
    
 
    
   $ git add <file1> <file2> <...>
+
   $ <font style="color:blue">git add <file1> <file2> <...></font>
   $ git commit -m '<your commit message goes here>'
+
   $ <font style="color:blue">git commit -m '<your commit message goes here>'</font>
  
 
To push your local topic branch (and/or changes in it) to your public remote repository use the following command
 
To push your local topic branch (and/or changes in it) to your public remote repository use the following command
  
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (matthiaszimmermanntest-client_notification)
 
   a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (matthiaszimmermanntest-client_notification)
   $ $ git push origin matthiaszimmermanntest-client_notification
+
   $ <font style="color:blue">git push origin matthiaszimmermanntest-client_notification</font>
  
 
This will make your work visible in the GitHub webui.
 
This will make your work visible in the GitHub webui.

Revision as of 10:22, 17 January 2013

The Scout documentation has been moved to https://eclipsescout.github.io/.

The Eclipse Scout Book

The Eclipse Scout Book project described here is an attempt/experiment to significantly improve the state of the documentation of the Eclipse Scout framework. The goal of this effort is to have written a substantial part of the book by Kepler release date (June 2013 - the content of the book will target Scout 3.9)

To allow for participation by the community, the book will be written in the open from it's very first version (as of now, December 14th 2012) there is hardly more than the proposed table of contents with some pointers to existing forum entries.

Bsi eclipse scout crowdwriting 2.png Eclipse scout crowdwriting raspberrypi.jpg

How do I contribute?

Repository and Download

The current repository is located at the following github repository.

There is also a continuous integration environment setup at BSI that is building the book on a regular basis. To check for the current state of the book you may visit tools.bsiag.com/scoutbook/

Each build will create a directory with the following structure

 yyyy-mm-dd_hh_MM-SS
   epub
     book.epub
   html
     book.zip (all files in a single zip)
     book.html (main html file for online browsing)
     ... many more files
   pdf
     book.pdf

The most recent copies of the Scout book are available from directory latest:

Your Contribution

To demonstrate our acknowledgment of community contributions we decided to give away a Raspberry Pi to anyone handing in a meaningful contribution before May 3rd 2013 (Kepler M7 +0).

In the above context, 'we' is defined as the set of Scout committers where the contribution needs to get some +1 and no -1. The other part that needs an explanation is the term 'meaningful' contribution which is subjective, of course. We would roughly want to see the following items:

  • Acceptance of the licencing terms (detailed below)
  • Following the contribution workflow (detailed below)
  • A pull request to discuss the topic you write about
  • An updated pull request with a couple of pages worth of text
  • Text shows understanding of the topic
  • Text shows the author cares about the reader
  • Text adds new material to the book
  • Text is not a random copy paste effort
  • Text does not necessarily need to end up in the 3.9 version of the book

Licencing Terms for Contributions

If you intend to contribute to the Scout book, please note that only material will be accepted, that is explicitely provided under the Creative Commons (CC-BY)/"Eclipse Public Licence (EPL)" terms described below.

Text and illustrations will be published according to Appendix A "Copyright" of the book. Specifically the following text: This work is licensed under the Creative Commons Attribution License. To view a copy of this li- cense, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA

Code snippets should only be referenced in the book from complete and working applications. In order to encourage copy/paste of code provided in the book your code needs to be released under the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html.

Scout Book Contribution Workflow

The chosen contribution model for the Scout book is nicely summarized in chapter 5.1 Distributed Git - Distributed Workflows of the book Pro Git. As Github provides public repositories for free and allows for efficient communication between contributors and committers this is setup we will use for the first edition of the Scout book.

The illusatration below (copied from Pro Git) illustrates the setup we will create.

Scoutbook git repos setup.png

Overview for the Scout book contribution workflow

  1. Set up you Github account
  2. Fork the Scout book and clone it to your local repository
  3. Build the Scout book locally
  4. Create a branch for your contribution
  5. Describe your planned contribution including approx size and content
  6. Open a pull requestand explicitly express your acceptance of the licencing terms
  7. Do the writing/coding/illustrating
  8. Regularly interact to make sure your contribution will find its way into the Scout book

The contribution workflow outlined above is explained step-by-step in the reminder of this article. It would be great if you would find the time to contribute to the Scout book and help us to foster a healthy and growing community around Eclipse Scout.

Why LaTeX?

There are many valid approaches to professionally write a book. Our choice of LaTeX is primairly based on the following properties:

  • Good previous experience with documents significantly larger than 100 pages
  • Possibility to have PDF, HTML, EPUB outputs from a single source
  • Text based format makes it ideal to use with version control (Git in our case)
  • Possiblity to link to code snippes directly from project workspaces (this helps to make sure that the code in the book actually compiles)
  • Professional quality output for printing

If your are new to LaTeX, think of it as Scripting language to write a book. Here are a couple of high-level recommendations:

  • If you need to have some specific layout, first try to find an existing example in the book. Then, do the same.
  • You might want to have a look at tutorial first. Start with The Not So Short Introduction to LaTeX (if you would like to recommend other sources, please add them here).
  • Don't try too hard to manipulate the layouting.
  • Try to let LaTeX do as much as possible.

Setting Things Up

Create your Github Account

In case you don't yet have a Github account, this is your first step. The text below provides a quick overview. Some more details are provided

  1. Browsing to the sign up page"
    1. The account matthiaszimmermanntest is used in the examples below
  2. Install git on your local computer according to GitHub help
    1. Installing git using the standard options in all installation steps
    2. This should provide two local applications: GitHub and GitShell: Github gitshell local.png

Fork the Book Project

  1. Glance over the github forking procedure
  2. Log into your github account
  3. Search for the scoutbook project. Once you have found the book project:
  4. Click on the fork button (as shown in the picture below). Fork book project.png

With the above command you created the light green developer public repository according to the illustration provided here.

Login and Default Shell

Log into your local GitHub app. The blue icon: Github gitshell local.png

Signing in on local machine.png

For the explanation below, we set Git Bash as our default shell. This can be done in the GitHub app using menu tools, and then options in the section default shell.

Local Repository and Cloning

Open the GitShell. The black icon: Github gitshell local.png

Create a target directory in the shell and switch into it

 a@1 ~/Desktop/oss/github
 $ mkdir matthiaszimmermanntest
 
 a@1 ~/Desktop/oss/github
 $ cd matthiaszimmermanntest/

Clone the fork into your local repository

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest
 $ git clone https://github.com/matthiaszimmermanntest/scoutbook.git
 Cloning into 'scoutbook'...
 remote: Counting objects: 568, done.
 remote: Compressing objects: 100% (263/263), done.
 Receiving objects:  85remote: Total 568 (delta 157), reused 560 (delta 149)
 Receiving objects: 100% (568/568), 450.77 KiB | 198 KiB/s, done.
 Resolving deltas: 100% (157/157), done.

You can copy the link for the git clone command from your github account

Copy git link.png

Then, verify the content

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest
 $ cd scoutbook/
 
 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ ls -l
 total 2.0k
 -rw-r--r--    1 mzi      Administ      132 Nov 29 22:04 README.textile
 drwxr-xr-x    4 mzi      Administ        0 Nov 29 22:04 code/
 -rw-r--r--    1 mzi      Administ     2.5k Nov 29 22:04 makefile
 drwxr-xr-x    5 mzi      Administ        0 Nov 29 22:04 out/
 drwxr-xr-x   26 mzi      Administ        0 Nov 29 22:04 tex/

With the above cloning operation you have added the dark green repository developer private, according to the illustration provided here.

Linking with the "Blessed" Repository

This step adds a link of your local repository to the remote Scout book (that you forked previously).

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ git remote add upstream git@github.com:BSI-Business-Systems-Integration-AG/scoutbook.git

With the above command you created the gray arrow from the blessed repository to your local repository according to the illustration provided here. Now, list your remotes for verification. That should look similar to the output below:

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ git remote -v
 origin  https://github.com/matthiaszimmermanntest/scoutbook.git (fetch)
 origin  https://github.com/matthiaszimmermanntest/scoutbook.git (push)
 upstream        git@github.com:BSI-Business-Systems-Integration-AG/scoutbook.git (fetch)
 upstream        git@github.com:BSI-Business-Systems-Integration-AG/scoutbook.git (push)

Building the Book Locally

This section holds the necessary installation/setup that is required to build the book out of the sources.

It is recommended (but not strictly necessary) to build the book on your own machine to verify your contribution does not break the build. To do this you will need working installations of the following programs

  • latex (for PDF and HTML version)
  • calibre (for creation and viewing of EPUB version)
  • make (for building the book using a make file)
  • zip/unzip (for packaging of the HTML version into a single zip file)

In the sections below, necessary download and installation steps of a working setup are described for Windows (if you have a working setup for Mac or Linux, please consider to amend a corresponding section.

Windows Installation

For Windows, please follow the steps indicated below:

  • Download and install LaTeX
    • visit (basic-miktex-2.9.4521-x64)
    • download the installer file
    • execute the installer file and take note of the installation path (you will later need to adapt the makefile)
  • Download and install Calibre
    • visit (calibre version 0.9.5)
    • download the installer file
    • execute the installer file and take note of the installation path (you will later need to adapt the makefile)
  • Download and install make
    • visit (GNU Make 3.82)
    • download the executable and put it into a folder of your preferences
  • Download and install 7-Zip
    • visit (7-Zip)
    • download the installer file
    • execute the installer file and take note of the installation path (you will later need to adapt the makefile)

Mac Installation (TODO)

Linux Installation (TODO)

Fixing "makefile"

Most likely, you will need to update the paths in your makefile to the executable files from your local installation.

Specifically, the following variables in the makefile need to be adjusted according to your local setup:

  • BIN
  • LATEXROOT
  • EBOOKCONVERT
  • ZIP
  • UNZIP
  • COPY

There might be some other commands that don't work cross platform out of the box. If you are on a mac/linux box you might need to replace the following os-commands in the makefile

  • rmdir
  • mkdir
  • del

"make" the Book

Building the book is done using make in the main folder of your local book repository (make sure to edit the makefile in the root path of the git repository to account for the installation paths of the downloaded software). To create the pdf version of the book use

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ make pdf

The complete sequence of commands to generate all three output formats is

 make clean
 make pdf
 make html
 make epub

The output will then be moved to the following locations

 out\pdf\book.pdf
 out\html\book.zip (containing the html and other necessary files)
 out\epub\book.epub

Create a Topic Branch

Sync with the "Blessed Repository"

Before you create a new topic-branch it is recommended that you get up to date with the upstream book. For this, switch to your local master branch an pull in the upstream changes.

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ checkout master
 $ git pull upstream master

Next, bring you public repository up to date

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ git push origin master

Create your Local Branch

Now you can create your topic branch on the up-to-date local master branch as follows:

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ git branch matthiaszimmermanntest-client_notification
 $ git checkout matthiaszimmermanntest-client_notification

Please use the following naming scheme for your topic branches <githubuser-meaningful_contribution_name>. Managing pull requests will get significantly simpler (In the example above matthiaszimmermanntest is contributing the material to describe the client_notification mechanism of Scout.

See here to read more about topic branches. The first two sections are relevant in this context (instead of first branching and then checking out the two commands are folded into a single one: git checkout -b <branchname>).

Work on your Contribution

When you have checked out your topic branch you can start to add and edit the files needed for your contribution.

Source Organisation

Do your writing in the latex source files, and your coding in the java codefiles. Whenever you need to include some code snippets in your text, please do this by reference only using the Listings package. Do not put code directly into the latex sources. This setup helps to ensure that all code snippets come from real projects, that actually compile and run using the described version of Eclipse Scout.

The latex and scout sources are roughly organized as follows:

 code
   workspace 1
     plugin 1
     plugin 2
     ...
   helloworld
     org.eclipse.scout.helloworld.client
       src
         ...
   ...
   workspace n
 tex
   Chapter1
     Chapter1.tex
     Someincludefile.tex
     ...
   Introduction
     figures
       sdk_helloworld_messagefield.png
     Introduction.tex
   ...
   Chapter n
   ...
   book.tex (the books' root tex)

An Example Contribution

Let's assume that you will be describing the client notification mechanism of Scout. During browsing of the table of contents you find that this topic is to be covered in a separate chapter in part "User Interface" of the book. Starting with the file ./tex/book.tex (the root file of the book) you find the following latex "code":

 % --------------------------------------------------------------------------- %
 \part{The Frontend}
 % --------------------------------------------------------------------------- %
 \include{ScoutClient/ScoutClient}

Alternatively you can search (grep command) for any string in the GitHub shell as shown below (in the example we search for notification)

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (master)
 $ grep -r -i "notification" ./tex | grep ".tex:"
 ./tex/ScoutClient/ScoutClient.tex:\chapter{Client Notification}
 ./tex/ScoutClient/ScoutClient.tex:  \item concept wiki: \url{http://wiki.eclipse.org/Scout/Concepts/Client_Notification}

This means, that you have to open latex file ./tex/ScoutClient/ScoutClient.tex. In that file you find the corresponding chapter:

 % =========================================================================== %
 \chapter{Client Notification}
 needs text
 
 \noindent Existing Documentation
 \begin{itemize}
   \item presentation: \url{http://wiki.eclipse.org/images/e/ea/20121022_BahBah_Slides.pdf}
   \item concept wiki: \url{http://wiki.eclipse.org/Scout/Concepts/Client_Notification}
   \item forum: \url{http://www.eclipse.org/forums/index.php/t/241053/}
 \end{itemize}

Obviously, there is a lot of room for improvement. As some initial guideline you find the pointers to existing documentation in the itemized list. It will make sense to have read and understood the listed items to make sure that your suggested content will reflect the already existing information.

To contribute to an initially empty chapter/section, please use the latex include mechanism to put your contribution into an additonal file. As an example we create a new (and intially empty) file ClientNotification.tex in directory ScoutClient that we can include as follows:

 % =========================================================================== %
 \chapter{Client Notification}
 
 \include{ClientNotification.tex}
 
 \noindent Existing Documentation
 \begin{itemize}
   \item presentation: \url{http://wiki.eclipse.org/images/e/ea/20121022_BahBah_Slides.pdf}
   \item concept wiki: \url{http://wiki.eclipse.org/Scout/Concepts/Client_Notification}
   \item forum: \url{http://www.eclipse.org/forums/index.php/t/241053/}
 \end{itemize}

In this file ClientNotification.tex you can then write our latex code. To help later refinement/merging please try to put each sentence on a separate line as shown with the "dummy" ClientNotification.tex file:

 % =========================================================================== %
 % Chapter Client Notification
 % =========================================================================== %
   
 % start your contribution by stating the following in a box
 \fbox{
   \parbox{12cm}{
     The goal of this section is ...
     The approximate size of this contribution is ... n words - or m pages
     Necessary links/prerequisites with other parts of the book
     Proposed links to external material
   }
 }
 
 Here comes the content of the contributed chapter.
 This sentence is awfully long, of course this has its reasons, as for this topic we need to describe a many different aspects, interfaces, and classes - but most likely it is just bad style to do such long sentences.
 Third sentence goes here.
 
 % =========================================================================== %

Considering the above example, please try to keep sentences to readable lengths. If its getting too long, you need to rephrase.

When you Need Additional Latex Packages

First: Try to get away with existing concepts from the current book by looking at the latex source code.

If you are concvinced that the Scout book would be geatly improved by making use of additional latex packages please do the following:

  1. Consider that the different chapters should have a consistent look at the end
  2. Make sure (using your local build infrastructure) that your proposal works for pdf, html, and epub formats
  3. Post your proposal to the Scout forum and explain your idea
  4. If encouraged, go ahead.

Save your Work

From time to time you want to commit your changes to your local and public repository. For this, you first get the list of changed files and add all those that need to be included in your commit before you commit to the local repository.

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (matthiaszimmermanntest-client_notification)
 $ git status
 # to check the list of files you want to include to your commit
 
 $ git add <file1> <file2> <...>
 $ git commit -m '<your commit message goes here>'

To push your local topic branch (and/or changes in it) to your public remote repository use the following command

 a@1 ~/Desktop/oss/github/matthiaszimmermanntest/scoutbook (matthiaszimmermanntest-client_notification)
 $ git push origin matthiaszimmermanntest-client_notification

This will make your work visible in the GitHub webui.

Open a Pull Request

Initiate a Pull Request

As soon as you have some working code and/or a clear picture of the intended content of your contribution document that intent in your contribution, commit to your local repository and push the current status of your feature branch to your public repository as described above.

Your first content to initiate a pull request might look similar to the example provided below

Example of content for initial pull request.png

To achive this the following latex code was used

 % --------------------------------------------------------------------------- %
 \section{Java SE Basics}
 \applabel{javase_basics}
 
 \fbox{
   \parbox{12cm}{
     Section waiting for contribution (2'000-3'000 words)
     
     The goal of this section is to provide the reader with a solid overview of the non-trivial
     Java concepts relevant for scout applications and central aspects of the framework itself.
     The focus of this section is on the Java Standard Edition (Java SE).
     Where appropriate, provide links to high quality online material, that is likely to exist for at least the next year or two.
   }
 }

Then, login to your GitHub account, and (as shown with the arrows in the screenshot below):

  1. Switch to your topic branch
  2. Click on the Pull Request button

Switch to branch open pull request.png

Review and Complete your Contribution

Make sure that the text in the titel of your pull request properly describes the topic of your intended contribution. Please also state your acceptance of the Scout book's licencing terms that will apply to your contribution.

The necessary steps to complete the pull request are described very well in this GitHub article. Please start reading in Section "Previewing The Pull Request". Once you have submitted your pull request, we will review it and work jointly in refining the contribution before it will be merged into the "Blessed repository".

Once the pull request becomes visible, we can start the discussion about goal, content, code etc. of your contribution. This process provides as much information as early as possible. This will help others to see who is intending to contribute where and how far the writing has progressed. It also helps to minimize frustration as we can avoid having to argue with you over content and quality after a significant effort from your side.

Back to the top