The “best practices” and Return On Investment

One thing that recently occupies my mind is how people tend to over-engineer their code to do things “the right way”. Development is a very creative process, involving countless hours of thinking, discussing and trying out different approaches to achieve the same thing – working software. There’s probably no two developers that would agree on … More The “best practices” and Return On Investment

Autofac OnActivated for all registrations

Nowadays, I’m working with WPF using MVVM pattern. To manage NHibernate session in viewmodels, I’m using the approach shown by Ayende, where session is a property of viewmodel. The problem is simple – sessions need to be disposed of and replaced after they throw an exception. That means we cannot use constructors to inject sessions … More Autofac OnActivated for all registrations

Testing email functionality in development environment

Many of the systems I have been working on required sending email messages as part of certain use cases: email address confirmation, notifications, system monitoring reports, etc. When working for a company, I usually use their SMTP server to send testing emails when running in the development environment. But for my own projects, that’s not … More Testing email functionality in development environment