...
When building data-oriented application, you will find that some code is obviously specific for the domain, some is domain-specific but following coding patterns that make the coding pretty trivial and some is completely generic. For instance, suppose you are writing a form-based application for personell data. You'll write This will include
- writing classes for OrgUnit, Person and Role and
...
- providing get, set, add and remove methods for manipulating the structure of OrgUnit, Person and Role instances
...
- implementing validation for attributes like name (no digits or special characters) and date of birth (no employee is 200 years old), as well as structural validation, e.g.
...
- every OrgUnit
...
- must have a Person with a leader Role
...
- ensuring consistency, e.g. that if a Person belongs to an OrgUnit, both objects refer to each other, and if a Person is removed from an OrgUnit, none of them refer to the other
...
- supporting the UI
...
- by making the domain objects observable, i.e. provide a mechanism to listen for changes
...
- selecting form elements
...
- based on attribute types
...
- and multiplicity
- triggering appropriate validation
...
- during editing
- persisting the data, perhaps in a file using XML or JSON
...
- format, or in a database
.
Learning the basics of the Eclipse Modeling Framework (EMF).
...