Version 5 code is being introduced into the v4 and v4.5 systems via modules. This document addresses both the issues involved in doing that, and the development conventions and standards for v5 code in general.
All new packages will have a prefix of com.partnersoft.v5.* and are always in lowercase. This firmly distinguishes the v5 API from other versions; we will continue this if we ever get to v6 with a v6 designator.
The platform is subdivided into major sub-platforms, which we call “frameworks”. They are as follows:
These are further subdivided by the Java runtime the code will work in. These roughly correspond to operating systems or Java environments:
Note that this isn’t the same as the operating system (OS); operating-system-specific code goes in subpackages named os.FOO where FOO is the operating system name:
Non-framework modules must follow the same rules, but packages go under com.partnersoft.v5.modules.MODULE where MODULE is the name of the module in lowercase.
So - to distill - packages in frameworks follow this naming pattern:
com.partnersoft.v5.FRAMEWORK.RUNTIME.FOO.BAR...
and OS-specific code goes in something like:
com.partnersoft.v5.FRAMEWORK.RUNTIME.os.OPERATINGSYSTEM...
and module code goes in something like:
com.partnersoft.v5.modules.MODULE...
and module OS-specific code goes in:
com.partnersoft.v5.modules.MODULE.os.OPERATINGSYSTEM...
All code must be written to be compatible with BOTH 4.4 and 4.5 branches.
The v5 in the package naming should prevent any conflicts between class names etc. Third-party code is more problematic; we need to work with the third-party code already standard in v4.x.
Module names need to be very predictable. Use these guidelines:
We can retain our simple names for modules like Tracing, Gps, etc. Ideally if you look at an alphabetical listing of modules, you should see associated modules next to the modules associated with them - e.g. Gps, GpsMapset, GpsTest, GpsMapsetTest, etc.
V5 code lives in standard v4-style modules in http://developer.partnersoft.com/modules/branches/5/.
When code is branched for testing, projects, or release, modules are placed in subdirectories based on the original code branch - so e.g.
modules/releases/4.13/5/FOO modules/releases/4.13/5/BAR modules/releases/4.13/4/BAZ modules/releases/4.13/4/WOBBLE