Implementing Domain Driven Architecture with OSGi
From Opentaps Wiki
Jump to navigationJump to searchThis document is not finished yet.
Goals
Move data model out of the database to the middleware tier.
Mixed data sources -- cloud or database.
Segregate the applications by segregating the data model.
Prevent bloated software by making it truly modular: no unnecessary dependencies between modules.
Concepts
Domain classes are the nouns: a Person, a Product, an Order.
Services are verbs: CreateOrder, UpdateProduct. They create or modify the domain classes. Services should be used as first class objects and passed around to perform these actions.
Rules
No foreign keys between domains (ie, OrderItem.productId should not FK to Product.productId). The Product data source might not be your database!