Progress report: Castle integration
There hasn't been much news about Cuyahoga lately. However, this doesn't mean that nothing is happening. I've been preparing the core of Cuyahoga to make the coming development efforts easier. One of those steps involved integrating the Castle Windsor IoC container. This container introduces the concept of Inversion of Control, which allows to develop components in a much more loosely coupled way. On top of that, Castle offers nice additional facilities like automatic transaction management and NHibernate integration.
And now I can hear you all thinking: "fine, but what do we gain with this stuff?". Well, in fact, a lot! Especially for module developers, things are getting much easier. A Cuyahoga module is now managed via the Castle container which automagically resolves all dependencies to external components. This can be services for data access, file access, authorization, search indexing, versioning, etc. Another new feature offered by Castle is automatic transaction management.
Imagine a scenario where you want to upload a file and manage some meta-data in a database. If something goes wrong, you'll end up with a record in the table for a non-existing file or a file without any meta-data. It takes quite a bit of code to handle this properly, but now, a simple .NET attribute is enough to make it safe. Don't believe it? Take a look at the Downloads module in SVN. Ok, it also involved creating a file service that can participate in transactions, but hey, as a module developer, you don't have to worry about that :).
4/2/2006 10:29:00 AM
Published by
Martijn Boland
Category
Cuyahoga
Back