We now define a DomainStructure
instead of just a "Domain". This reflects the design philosophy of Molecule that a domain has two basic aspects:
- Structural: entities and attributes describing "things" and "concepts" of our domain
- Behavioral: business processes that use the structural elements (outside Molecule scope)
In Molecule we define the slower changing structural aspect of our domain with Entities and Attributes (and if the domain is large or complex we can even group segments of entities in Scala objects).
To express these semantics clearly, we therefore now extend DomainStructure
:
object Person extends DomainStructure(3) {
trait Person {
val name = oneString
val age = oneInt
}
}
Internally, we have now also clarify that a molecule builds a DataModel
instead of just a "Model". This doesn't affect end-users.