Composite Object (CO)

Architecture > Application Tier > Domain Layer > Composite Object

“… flexibility is the justification used for the most ineffective coding and design practices. … Programs should be flexible, but only in ways they change.1

Composite Objects2 (CO) let you treat a group of fields as a single entity without an identity.  They are a Java Bean representation of a cross-domain or cross-technology entity.  A CO is often encapsulates Domain Entities, although not necessarily.

A PED CO typically:

  • Encapsulates state that has a natural business affinity
  • Exists to solve a specific technical constraint
  • Is *not* used as a behavioral substitute for a Business Façade
  • Has no identity

Design

This representative CO coming soon:

[Class Diagram image goes here]

RefApp Source

  • tbd

SOAj Source

References

  1. Kent Beck, Implementation Patterns, p. 12.
  2. The PED CO pattern largely ignores the more advanced elements typically including in formal definitions.

Leave a Reply