Archive For The “.NET” Category
If someone asked you, what are the building blocks of MVVM, what would you say? Models, Views, and ViewModels, of course. It’s in the name. But really, there are two others: Models Views ViewModels Commands Events If Commands and Events aren’t strongly represented in your application, I’d say there is a strong chance it isn’t [...]
Can’t decide whether to host your WCF service in IIS or a Windows Service? Consider the additional steps you’ll need to perform, explain, troubleshoot, and write documentation for if you follow the IIS route: Ensure IIS is installed. Run aspnet_regiis -i to install .NET ISAPI module. Run ServiceModelReg –i to install handlers for *.svc file [...]
This week I’ve been working on a brownfield Castle-powered WCF service that was creating a separate NHibernate session on every call to a repository object. Abusing NHibernate like this was playing all sorts of hell for our app (e.g. TransientObjectExceptions), and prevented us from using transactions that matched with a logical unit of work, so [...]
Lately I have become a big opponent of a popular anti-pattern: people insisting on splitting up their application tiers/layers into 5-10 separate Visual Studio projects and adding references between them. Double that number of projects if you want corresponding unit test project for each layer. In fact, removing them has become one of the first [...]
Here’s a super quick little powershell snippet to strip regions out of all C# files in a directory tree. Useful for legacy code where people hide long blocks in regions rather than encapsulate it into smaller methods/objects. Run this in your solution folder and support the movement against C# regions!


