Thursday, May 27, 2010

Grouping Is Domain Specific Too

Complex domains have large models...

As an advanced user of domain-driven modeling you may have experienced that you find yourself soon dealing with a huge set of domain-specific elements: A description of a complex domain can need hundreds of elements. Having all these elements as a flat list is no longer convenient. Fortunately, actifsource lets you group your elements -- which are simply called Resources in actifsource -- into so-called Packages (similar to Java packages).

Packages enable a simple hierarchical structuring and are currently the all-embracing grouping element:
  • A Package can contain Resources
  • A Package can contain nested Packages
In the domain meta-model we use Packages to group our Classes. Packages do a perfect job there. However, when the task is to group the domain elements themselves, we found that packages have a problem: The are not domain-specific! Instead of Packages, it would be desirable to have domain-specific grouping elements... 'FunctionalAreas', 'Epics', 'EntitySpaces'  are possible names. But this name is always specific to the domain so we cannot choose it universally!

 ... and need to be grouped domain-specifically!

So, after some discussion, we came to the following idea to solve the problems mentioned above: We need to have a way to define grouping elements on the domain meta-level! All the grouping concepts have something in common:
  • A grouping element can contain nested grouping elements of some grouping types
  • A grouping element can define dependencies to other grouping elements
Inside Eclipse, the groupings would still be displayed as folders containing elements. But you could fully customise the folders (icons, decorations, ..). Further, the folder would be validated to contain only the correct element types and the dependencies could be used to narrow the scope of references: Resources contained in a grouping are only allowed to have references to other Resources which are in the scope defined by the dependencies on the grouping!

So, the current concept of Packages containing Classes would be only a realization of the more general grouping concept!

No comments:

Post a Comment