Dependency Injection (DI) makes it easy scaling out/up a system, making the code testable and easier to maintain. You don’t have to worry so much about class dependencies and initializing objects, properties in classes and implementing smart and easy to use constructors.

I will state an example below to point out the power of the DI support in Spring.NET.

Continue reading »

 

In my previous post I declared I was keen on to learning Dependency Injection, using the frameworks listed. First up is Spring.NET, an open source .NET (C#) implementation of Spring Framework for Java.

I decided to just scratch a little bit on the surface of the framework and therefore went ahead following the first example/tutorial on the Spring.NET site. This covered the basics of Dependency Injection and the framework’s IoC (Inversion of Control) features. I’ll demonstrate it using a similar example below.

Continue reading »

 

A couple of hours ago I decided to learn how to use Dependency Injection. Some googling later and I had found a handful of frameworks for the .NET environment.

I will try a couple of the frameworks and state my personal opinions on them:

More information in upcoming posts.

 

eventLately I’ve been developing standalone WPF applications using Visual Basic. To make a WPF application somewhat easy to maintain and extend it is extremely important to use some design pattern. The most popular design pattern around when developing WPF applications is the MVVM pattern (Model-View-ViewModel).

Developing a single view application is really really straight forward using the MVVM pattern, but when it comes to multiple views application there is no simple solution to update one or more views from another view and still make the Views and ViewModels behind them loosely coupled. When I say update I mean making some property change in the ViewModels behind the Views to be affected by the change of something in another View or ViewModel.

In this post I will show how I’ve solved the problem using events and delegates. Before I describe my solution, please read about the basics in the MVVM design pattern. There are a lot of good publications around, e.g. THE MODEL-VIEW-VIEWMODEL (MVVM) DESIGN PATTERN FOR WPF and Model View ViewModel (Wikipedia).

To make it easier to understand this post and to make it easier for me to write it, please read the following article if you’re not familiar with WPF data binding and the usage of INotifyPropertyChanged: http://coredotnet.blogspot.com/2006/05/wpf-data-binding-tutorial.html.

Continue reading »

© 2011 freddes.se Suffusion theme by Sayontan Sinha