Reading blogs on the Internet is a good way to keep updated on what happens in the industry and to get short introductions to specific topics. When it comes to deeper, elaborated analysis however, there is nothing as a good book. The single book that has meant the most to me within coding is the… Continue reading How GoF Brought my Understanding of Object Orientation to Another Level
Category: Architecture
IQueryable Read Model Extension Methods
The normalized data model of the database is often not suitable for reading and displaying data. A separate read model used to represent all the data needed to display a page improves performance. Defining the read model is only half the work though, to make it really usable the read model should accept queries in… Continue reading IQueryable Read Model Extension Methods
Separating the Read Model
A typical architecture of a .NET web application is to use EF Code First for data access and MVC to render the web pages. The data model in the database is usually (and should be!) normalized. A normalized data model is also great for updates, but when displaying data it is not enough. E.g. in… Continue reading Separating the Read Model
Comments are not Version Control
In really old legacy code it is common to find comment blocks with complete revision history of each function and old, inactive code that has been commented out. It was fine 20 years ago, when version control systems where not wide spread. Today it’s a code smell. An old legacy system I used to work… Continue reading Comments are not Version Control
Send SmtpClient Mails to Disk
When developing a system that sends mails, often the mails shouldn’t be sent for real when testing. Instead they should be made available for investigation. Fortunately, that functionality is built in with the .NET SmtpClient. There is even no need to change the code. It’s just a matter of configuration. Add the following lines to… Continue reading Send SmtpClient Mails to Disk