Wednesday, January 02, 2008

Key Learnings: Canonical Models vs. Domain Models

In this blog my attempt is to provide some definitions and in turn to get feedback on the differentiation between the parameters traded between a service consumer and a service provider (Canonical Models) vs. the parameters traded between the various internal architectural layers of an application (i.e. the Domain Models).


Canonical Models

Example of canonical models - Customer Preferences, Supplier Profile , Vendor Service Offerings and Accepted Service Bid

1) Shared as parameters for trading between service consumers and service providers
2) In SOA context these are typically transformed into syntax agnostic and platform neutral XML
3)Business Service usage context is associated (for example, information about a quote vs. a final offer that has legal implications is embedded in the canonical model)
4) No real business logic is embedded giving service provider the freedom to alter the behavior without breaking the service contract
5) Cross-business domain relationships formulated by representing multiple business concepts are included so that the consumer can avoid making multiple remote calls

Domain Models
Example of domain entity - Purchase Order and Customer

1) Shared as parameters between persistence layer and business logic layer
2) May or may not be expressed as XML especially if traded within the business domain applications/components
3) Domain context and domain internal relationships are captured
4) Domain specific business logic may be encapsulated as the model is traded within the business application or within the business domain. Also, the business logic in the domain entity has relevance internally to the business domain alone.
5) Single business context and only relevant amount of information in terms of attributes and relationships are represented so as to avoid hydrating a large volume of information into memory.


Thanks in advance for your feedback.
surekha -
Post a Comment