31 Jul
2009

Exception Logging with EntLib Made Simple

Logging application exceptions is like getting a new muffler. It isn’t exciting. It isn’t very fulfilling. It just costs time and money. Also, it is something that needs to be done. So, can we make exception logging as frictionless as possible? Roll your own logging library. Repeat the same code a lot in your application […]

Read More
3 Jul
2009

WPF Multithreading: Using the BackgroundWorker and Reporting the Progress to the UI.

I can’t count the number of times someone has asked me about running a time consuming task on a separate thread, but at the same time show a progress dialog with up-to-the-second percentage updates being displayed to the user. Multithreading can be confusing at first, but if you just take it one step at a […]

Read More
14 May
2009

Write a Sortable ObservableCollection for WPF

You probably have had the need to sort an ObservableCollection at some point in one of your applications by either ascending or descending order.  Of course, you can always use the ObservableCollection.OrderBy and ObservableCollection.OrderByDescending, but these methods just return a new collection of IOrderedEnumerable, which forces you have to rebind the DataContext/ItemsSource in your UI, […]

Read More
25 Mar
2009

FubuMVC From Scratch – Part 4 Persistence

Previous posts in series: FubuMVC From Scratch Part 1 ? Basic project structure setup FubuMVC From Scratch Part 2 ? FubuMVC configuration and Controller setup FubuMVC From Scratch ? Part 3 (Adding View to project) Persistence is a requirement in virtually every application that we write today, and now the time has come for us […]

Read More
21 Mar
2009

Be Careful With the var Keyword and Expression Builders

I just want to point out a small tidbit I ran into earlier this week. I was using the following simplified expression builder that provides a fluent interface for creating an instance of a Product. public class Product { public Double Price { get; private set; } public String Name { get; private set; } […]

Read More