Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Proposed Generic Structure


PackageScopeNotes
1apiall classes that are required for northbound interfaces
2api\featureall API classes that are specific to a given feature
3api\feature\modelsall data-holder type classes for the API specific to the featuredo NOT add data objects that are only used in the impl!
4api\feature\exceptionsall exception classes that are specific to a given featuredo think 'ahead': is the exception rally going to be unique for this feature! 
If in doubt it probably should go into api\exception. Because moving it later would be a backward incompatible change!
5api\modelsall data-holder type classes for the API that can be shared between features
6api\feature\exceptionsall exception classes that can be shared between features and at least oen feature exposes on the API
7implall classes that are NOT exposed on the northbound interface and are unique to just one featuresince these classes are NOT exposed on the API it is OK to move them to the common utils\ package only when needed (i.e. later) since this would not be backward incompatible
8
api
impl\featureall implementation classes that are specific to a given feature
9exceptionsall exception classes that are can be shared between given features and are NOT exposed on any API
10utilsall  implementation classes that can be shared between features


Code Block
titleGeneric folder (package structure)
api\feature1\SomeService.class
api\feature1\models\SpecificModelClass
api\feature1\exceptions\SpecificException.class
api\feature2\SomeService.class
api\feature2\models\SpecificModelclass
api\feature2\exceptions\SpecificException.class
api\models\CommonModel.class
api\exeptions\CommonException.class

impl\feature1\SomeServiceImpl.class
impl\feature1\helperPackage\SpecificHelper.class
impl\feature2\SomeServiceImpl.class

exceptions\someInternalException.class
utils\CommonHelper.class

...