AWG Blogs

Monday, April 30, 2012

Middleman Pattern

The DCI paradigm, specifically the canonical example of the account transfer seems unnatural. If I'm not mistaken, in most business domains the act of transferring resources between entities is performed by a middleman entity. Behavior is no more injected into entities than are entry-level checking account clerks trained on the spot to make transfers to investment accounts (imagine this is a bank in the pre-computing days).

So I propose the "Middleman Pattern." The following is an example. Note: the example could be abstracted in that concrete classes could be decoupled via interface implementation and dependency injection.

Edit: See also suggestion of "money transferrer" at

Tuesday, April 24, 2012

SharePointMVC Note

When following the Deployment.docx, the instructions say to put the DLLs in the SharePoint website _app_bin. Well, I had to also put the web app DLL in the SharePoint website bin folder to get it working; otherwise I'd get the error: Could not load type 'SampleWebApplication.xxxxxx'.   at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
   at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
   at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)

Sunday, April 15, 2012

UML Aggregation Vs DDD Aggregate

The same root term "Aggregate" in DDD does not correspond to the UML "Aggregation" notation (filled diamond).

DDD use of root term "Aggregate":
OrderLines have no reason to exist without their parent Order, nor can they belong to any otherOrder. In this case, Order and OrderLines would probably be an Aggregate, and the Order would be the Aggregate Root