Supported Models
Synopsis
The Harbormaster architecture is a Model Driven Architecture and as such requires a model to generate a project. The model should capture:
-
- The name of each important thing found in the requirements:
Employee, Account, Company, Order, Product, etc...
- The data attributes for each thing:
first_name, last_name, ssn, dob, etc...
- Enumerated types that encapsulate a group of like data:
VolumeLevel : High, Medium, Low
- The parent name for a thing with a parent that represents an “is-a” relationship:
PlasmaTV is-a TV
- All relationships between things. These relationships can be in one direction (uni-directional) or in both directions (bi-directional) and have varying multiplicity:
1-to-1, 1-to-Many, Many-to-1, and Many-to-Many
- The name of each important thing found in the requirements:
Supported Model Formats
Type | extension | example | details | purpose | ||||
---|---|---|---|---|---|---|---|---|
YAML | yaml, .yml | Link | Link |
|
||||
JSON | json | Link | Link |
|
||||
Eclipse Modeling Framework | emf | Link | Link |
|
||||
UML | uml | Link | Link |
|
||||
XMI | xmi | Link | Link |
|
||||
SQL Script | sql | Link | Link |
|
||||
POJOs (Plain Old Java Objects) |
jar, war | N/A | Link |
|
||||
Git Repository | git | Link | Link |
|
What To Consider
Primary Keys
In a model, it is best to exclude a primary key attribute. Harbormaster will auto-generate a primary key attribute and name it using the format {className}Id. If you create a primary key field, you should follow this naming convention so Harbormaster will detect it.
Compound Primary Keys
It is best NOT to use compound primary keys. Harbormaster has been designed to handle compound keys but the level of complexity it introduces does not normally warrant their usage. There is no guarantee each supported tech stack will effectively accommodate a compound primary key. Therefore, it is suggested to avoid them.
Model File Extension
It is important the name of a model file have the appropriate extension so Harbormaster can deduce its type. Each supported model type and expected extension is detailed above.