My current favorite libraries
I use a lot of frameworks and 3rd party libraries – but I am getting increasingly picky which gets to stay for more than a brief acquaintance. Below, I’ll describe which and why I use them:
Testing
- NUnit – A classic. Really, I could have used MS’ own test-framework, but I just don’t trust it yet. I don’t use anywhere near 1% of the framework (the attributes, Assert… and that’s pretty much it), since my projects are simply not that advanced… well, they are in terms of WPF, but NUnit has no inherit support for WPF-testing (a.k.a. VisualTree-walking).
- Rhino Mocks v. 3.5 – also a classic. I’m a huge fan of the new AAA style although I tend to apply it with StoryQ’s approach. Also, the new .AssertWasCalled combined with lambda expressions makes for really nicely condensed code. I have yet to find a better mocking framework.
- StoryQ – the new-comer. Basically StoryQ is a way for Acceptance-tests to make their way into your test-code. It plays well with NUnit and is a relatively light-weight API, that really lends well to minimizing the number of small interface-driving spec-tests. I was skeptical at first, but now, I’m convinced that it makes for better and more condensed code and also, to keep that red thread throughout my test-procedures making it far more readable.
Persistence
- NHibernate – also a classic. I started out using NHibernate when I started using ORM’s. I have yet to find a fatal flaw in the design. Usually it has been my ignorance that lead to the problems introduced. I’m currently reading NHibernate In Action (which has lead to a few realizations – more info on that later) and my usage is still far from ideal due to limited understanding of the architecture.
WPF
- WPF Toolkit – I use this sparringly due to a number of irritating errors in the implementations. I primarily use the DataGrid and the DatePicker. Sadly, it shines through that it is a glorified CTP-version out there.
- Prism – my favorite among the frameworks emerging for WPF. Very light-weight framework for supporting pluggable architectures. Some problems, of course, but 3-4 of the ideas are usefull out of the box and the rest only need minor tweaking.
IoC
- Windsor – most thoroughly tested. Feature-list is far beyond my skills as I use IoC mainly for Service Locating problems. I tend to favour fluent configuration and a static service locator for the small hobby’ish applications.
- Unity – MS’ try at IoC container. Have yet to find any bugs and is the default container in Prism – so usually end up using Unity while the project is in the early stages. Usually shift to Windsor when the going gets tough and I need run-time evaluation of services. Has the most annoying exception-handling of the IoC containers I’ve tried. Wrapping the exception every GD time it is rethrown… that just makes for dull debugging in VS.
I use other libraries, but so far they are easy come – easy go. They usually don’t end up staying. Going to attend a meeting comparing NHibernate and Entity Framework – very much looking forward to seeing the giraffe. Otherwise, my main focus will probably shift from Prism (pretty much exploiting every corner of it at the moment – so nothing much left to discover) towards a new series of Usability challenges. I will begin reading up on it and probably attend a few courses over the next 6-9 months. Very much looking forward to that. And I’ll try to keep you updated with my findings.