The ACME Project
Let us start with a very simple service and use it to cycle quickly through all the phases of service development: configuration, implementation, building, and deployment. Let us call it SampleService and, following a long-standing tradition, think of it as a produce of the notorious | ACME.
Structuring the Service
A first important question to settle concerns the structure you should give to the implementation components of SampleService. Creating a project for it in Eclipse allocates a folder for them under BUILD_LOCATION, say we call it the service location. But how should you organise things right below the service location? The advice is to stick to the following folder structure which besides being as simple as it gets, it is perfectly aligned with the build facilities offered by gCore:
- a folder etc for all the configuration files of the service.
- a folder schema for the interfaces and supporting type definitions of the service port-types.
- a folder for the actual Java implementation hierarchy named in accordance with its package structure.
If we assume ACME to own the namespace acme.org, then it makes sense to consider a package structure for SampleService rooted in org.acme.sample':
|-etc |-org |--acme |---sample |-schema
Organising Dependencies
The next important question is how to organise the dependencies of SampleService. There are at least two kinds of dependencies we should cater for:
- gCore dependencies, i.e. dependencies to code which ships with the gCore distrubution (first and foremost the gCF binaries!).
- additional dependencies, i.e. all the other dependencies.