Software Engineering and Enterprise Application Architecture with .Net

Overthinking Coarse Grained Contracts

One of the recommended practices in web services development (or any message-based distributed computing paradigm) is the use of coarse grained contracts.

The problem with this recommendation is that “coarse grained” is a qualitative measure, and I have often seen application developers create difficult to consume services in a misguided attempt to meet this tenet distributed computing. [Continue reading]

Codes as Enumerations in XML Schemas

Code Lists, specifically those that change infrequently are often represented as enumerations in code. One major problem in working with enumerations in service contracts occurs when the list of codes is modified, which can break compatibility. When … [Continue reading]

Using using? Never say never

I was having a discussion with a colleague of mine regarding use of the using statement as it applies to WCF calls. I always wrap using statements around any IDisposable (except in a few cases, like instantiating the Unity container instance for the … [Continue reading]

NegativeCompareAttribute For Asp.Net MVC 3

The Asp.Net MVC 3 Framework includes the CompareAttribute, which is great for scenarios such as where a password must match a confirm password. There are instances however, where you want the opposite - two fields must not match. A common example is … [Continue reading]