Automatic INPC using dynamic proxy and Ninject

There has been lots of talk in the Silverlight community about what is the best way to implement the INotifyPropertyChanged interface. During Christmas I blogged about how you can use dynamic proxies to get INPC implemented automatically. Since then both Einar Ingebrigtsen and Justin Angel have blogged about an interesting approach to INPC using MSIL weaving. I really recommend checking out Justin’s post, as he covers some of the pros and cons of different INPC implementations, as well as purposing an elegant solution using post-build MSIL weaving. »

Automatic change notification for dependent properties

Yesterday I published a post showing how we can use AOP and Castle Dynamic Proxy to get automatic change notification for ViewModels by intercepting property setters. One of the comments I got was from Krzysztof Koźmic who suggested that I should use ProxyGenerationHook to narrow down the scope of the proxy. By implementing the IProxyGenerationHook we get to choose which methods to intercept. In my original implementation this logic was handled by the interceptor itself. »

Automatic INotifyPropertyChanged using Dynamic Proxy

As a WPF or Silverlight developer chances are you have implemented the INotifyPropertyChanged-interface more than once. The interface is simple enough, consisting of a single PropertyChanged-event. The data binding infrastructure in WPF and Silverlight will look for this interface and subscribe to the PropertyChanged-event. As a developer you have to write code in your property setters to raise the event whenever some property is changed. This is boring and repetitive code to write, that often contains magic strings (property names) and can really clutter your ViewModels. »

Some food for thought on a Saturday morning

This blog post is not about software development. Or maybe it is. I will leave that up for you to decide. On the flight home from Frankfurt last night I was reading D2, a magazine that comes out every Friday as part of the Norwegian newspaper Dagens Næringsliv. I haven’t read D2 before, but I was surprised by the quality of design and print as well as the great feature stories. »

My UX prototyping presentation from Smidig2009

Last month I was lucky enough to attend and speak at the Smidig2009 (Agile 2009) conference in Oslo. This was my first time attending the conference, and I’m really impressed with the content, speakers, organizers and attendees. The format of the conference was four lightning talks per hour in three simultaneous tracks before lunch, and open spaces after lunch. The formatted worked out really well – and I got to see several inspiring and educational talks, as well as taking part in some interesting discussions in open spaces. »