OganizationConventions » History » Version 8

Version 7 (J. Wienke, 10/14/2011 05:15 PM) → Version 8/9 (J. Wienke, 02/27/2012 06:21 PM)

h1. OganizationConventions

_Feel free to add any thoughts or suggestions._

h2. Naming

* Do not include artifacts of the current communication pattern for one type. I.e. if you currently send events of images, your type must not be @ImageEvent@, but solely @Image@, as the @Image@ type might later be reused in an RPC communication.
* java_outer_class_name will always be @<file name w/o ext>Type@
* Follow the rules in http://code.google.com/intl/de-DE/apis/protocolbuffers/docs/style.html

h2. Directory Layout

The current policy for filenames of data definitions in RST is as follows:
* The directory (relative to the @proto/{stable,sandbox}@ directory in the project root) in which the proto-file resides must match the package name with all "."s replaced with "/"s
* The filename must match the name of the "primary" message definition (with ".proto" appended)
* There should only be one "primary" message definition in each proto-file
** Groups of related messages should reside in individual files and refer to each other using @import@
* Directory names are all lowercase and without word separations, e.g. @imageprocessing@.

h2. Rationale

* Facilitate easy documentation and reuse via @import@
* Data definitions can be treated as resources with unique URLs
** These URLs can be derived from a qualified message name
E.g. @.rst.ImageMessage -> https://code.cor-lab.org/svn/rst/trunk/proto/rst/ImageMessage.proto@

h2. Automatic Checking

Is performed in a "CI job":https://ci.cor-lab.de/job/rst-trunk-static-analysis/.