IT:AD:Patterns:Version Your Messages Strategy


You can't get your message schemas back once others have invested time and effort into mapping them into their application.

You'll simply get a lot of irate 3rd party developers. Probably vocal irate 3rd party developers.


External APIs

  • MUST: never ever let your API's directly expose Domain Entities/. No matter how simple they start out, Domain Entities/ will change over time to address new business needs. If your api's remote clients are tightly bound, and you go through with the changes, they will all break. Not a good scenario. A long term strategy is to map your Domain Entities/ to API IT/#DTO/s (DTOs are more appropriate than Domain Entities/ anyway as you can't serialize Behaviour/ over the wire anyway, just properties – which is all that DTOs are.

Internal APIs

  • COULD: probably do not need to version your WCF calls across tiers of your own DDD application. Can't think of a reason why yet, but there may be a case to consider if the application is being hosted in totally different Hosts Products. To Consider.