Latest News
Ok, we are going to discuss the different reasons to query one by one and determine whether a distributed domain model is suitable for the purpose. I've chosen to start the discussion with Reporting as a lot has allready been said by others on the topic.
I'm definitely not the first to say that domain models suck for reporting, and a distributed one is even worse.
A domain model is made to deal with the complexity of the rules that need to to an entity needs to attain to. Besides the regular domain rules a distributed domain model also keeps track of what happens to an entity and why by means of tracking all the messages to and from the model.
Reporting is interested in an aggregated view of the system at a certain point in time. Notice the difference? Domain models are interested in what is going on, aka the transactions, reporting is interested in the results, aka a snapshot. A single model cannot be suitable for all of these aspects as each has very different needs.
So seperate the commands from the queries in case of reporting, create a specific model for this purpose, an OLAP Cube. Microsoft has a nice product for this, called SQL Server Reporting Services.
The name says it all ...
Posted by Yves on Sunday, August 17, 2008, 0 Comments
Distributed Domain Driven Design is all about combining the concept of Command Query Separtion with a Domain Model. So far we have only covered how commands become part of the model and what issues arise with this change in programming model.
Now it's time to start discussing the second part of CQS, queries. Obviously a lot can be said about this topic, so expect a number of blog posts appearing in the near future. Today we will have a first look at why queries are actually required in any system...
Posted by Yves on Friday, August 15, 2008, 0 Comments
By default WCF generates the wsdl files as separate files for each namespace and separate files for each xsd and imports them into the main wsdl. Even though the specification for wsdl imports already exists for a few years, a lot of tools don’t seem to cope with them; among others the old xsd.exe doesn’t resolve them by default as you can read in the msdn library...
Posted by Yves on Thursday, August 14, 2008, 0 Comments
WCF uses IIS metabase information, more specifically host header names, from the server it’s hosted on when exporting wsdl files for its services. If you did not configure any host header values it will default to the machine name for the given host.
In several scenarios, like load balancers, reverse proxies, SSL accelerators etc… the address that you wish to publish is not necessarily the same as what is configured as host header value on the host and definitely not the true machine name. This makes the default export mechanism of wsdl export unsuitable for these scenarios.
There are several ways to deal with this, where the first solution would be not to use the automated export mechanism but include the wsdl’s and xsd’s statically in your deployment. This can be done using the externalMetadataLocation attribute on the serviceMetadata configuration option.
Another option is to manipulate the wsdl export mechanism by implementing an IWsdlExportExtension. This extension gives you access to the WsdlExporter class that contains all of the metadata used for exporting the wsdl files and xsd’s. Just replace all address information for in all wsdl ports, wsdl imports and xsd imports. There exists an open source project on codeplex, called WCFExtras, which includes an IWsdlExportExtension implementation that does exactly that, so you don't even have to implement it yourself.
Posted by Yves on Wednesday, August 13, 2008, 0 Comments
By now you probably know that I'm actively participating in the belgian alt.net user group and that I hope to promote the 'alt.net concepts' to the belgian microsoft community. But there is a darker side of alt.net as well, one that I definitly distantiate from in any way.
There is a very thin line between promoting certain concepts and practices, and bashing on the rest of the world. It has happened before, even to such an extent that really big names like Sam Gentile officially stepped away from the alt.net movement. Even today you see several posts on the net that really abuse the alt.net way of thinking as an excuse to start a flame war.
Any practice, concept or framework has it's appliance in a certain scenario, otherwise no one would have bothered to create it in the first place. I just wanted to let you know that bashing is not what alt.net is all about and that I only want to bring good practices to our community.
Hope to see you at any of our gatherings...
Posted by Yves on Tuesday, August 12, 2008, 0 Comments