OneTrueError - Automated exception handling

Tag Archives: patterns

Double check pattern

I just answered a question at SO about lazy loading which involved the double check pattern. It’s a really useful pattern for lazy loading since it hurt performance a lot less than always locking. I thought that I should share … Continue reading

Posted in Architecture, CodeProject | Tagged , | 1 Comment

Protect your data!

The introduction of OR/M libraries and strongly typed views/view models has made a lot of programmers to switch to the dark side. Let’s fight this evil! What evil am I talking about? Public setters in your domain/business model (or whatever … Continue reading

Posted in Architecture | Tagged | 32 Comments

Generic repositories – A silly abstraction layer

This post is all about GENERIC repositories as in Repository, not about all types of repositories. Repositories are a great way to abstract away the data source. Doing so makes your code testable and flexible for future additions. My recommendation … Continue reading

Posted in Architecture, CodeProject | Tagged | 5 Comments

Repositories, Unit Of Work and ASP.NET MVC

There are a lot of posts discussing repository implementations, unit of work and ASP.NET MVC. This post is an attempt to give you and answer which addresses all three issues. Repositories Do NOT create generic repositories. They look fine when … Continue reading

Posted in Architecture, CodeProject | Tagged , | 3 Comments