Well it’s about time. Due to certain events (like me relocating to the other part of the world) it’s later than planned but it’s here – beta 1 of Castle Windsor 2.5 is available for download.
There’s been quite a lot of changes in the release. Not just in the code but in the entire Castle Project.
We migrated from Subversion to Git, and you can now access the repositories on github. Hopefully this will make things easier for anyone who wants to contribute features and patches to get going, and will raise the level of community contributions to the project (actually it already has, although not as much as I’d like).
We moved from out previous documentation to the new open wiki engine. The documentation is still being migrated and updated but I can say that for Windsor the documentation is already pretty complete and it covers all the new features in version 2.5. The wiki is open for anyone to register and contribute, either by proofreading and fixing spelling errors, expanding existing topics or adding new ones.
Also it’s worth mentioning the awesome work that Andy Pike’s been doing on CastleCasts. The website (built on Castle stack obviously) contains free short screencasts that will help you learn different aspects of the Castle stack. While most of the screncasts are dedicated to Monorail, Andy recently started covering Windsor as well. And the best part is – CastleCasts is an open place for Castle-related screencasts so if you want to record one, and share your knowledge with others go ahead.
What’s in it – Core (now incl. DynamicProxy and Dictionary Adapter)
Here are some of the highlights of the release for Castle.Core.dll
- Castle.DynamicProxy.dll got now merged into Castle.Core.dll (same with Dictionary Adapter) so now you need to reference just single assembly instead of two.
- Supports .NET 4 (and .NET 4 client profile)
- DynamicProxy has now new kind of proxies – Class proxy with target. I blogged about limitations of this approach, so use this with caution
- DynamicProxy will now let you intercept explicitly implemented interface methods on class proxy
- DynamicProxy will now let you intercept calls to methods on System.Object (ToString, Equals, GetHashCode) – the default ProxyGenerationHook will still opt out of this though
- Dictionary Adapter performance improvements. Proxy class are cached so DA no longer traverses assemblies to find type
- Dictionary Adapter automatic support for NotifyPropertyChanged. EditableObject, IDataErrorInfo, and validation capabilities. Just extend from the interface(s) and feature is enabled
- Dictionary Adapter support for custom HashCode/Equals strategy so you can better support persistence in which and Id usually used for equality
- Ability to coerce one Dictionary Adapter into another and/or copy properties from one to another.
- Integrated support for Xml/XPath using standard Xml Serialization attributes – this gives you strongly typed config files (for example)
Plus many more minor fixes, features and improvements. You can see the entire list in changelog.
What’s in it – Windsor
The main dish is obviously Windsor, and there are plenty interesting new features and improvements as well.
- Castle.MicroKernel.dll is now merged into Castle.Windsor.dll. This means that to use Windsor you now need to reference just two assemblies, instead of 4.
- Supports .NET 4 (and .NET 4 client profile)
- Ability to specify dependencies by type, not just name.
- Due to popular demand added delegate based typed factories to Typed Factory Facility
- Numerous smaller improvements in interface based factories in Typed Factory Facility
- Improved support for using installers (including performance optimizations for using Three Container Calls pattern)
- Added fluent API for Event Wiring facility
- Improved support for advanced proxying including mixins, additional interfaces both from code and config
- Numerous improvements in XML config support:
- Improved debugger view of container, simplifying diagnostics
- Multiple improvements to the fluent registration API.
- New, deferred mode for StartableFacility
And heaps of other smaller improvements and general polish.
This is a point-five release, which means it is highly compatible with previous release and upgrading should be pretty straightforward and quick. There are some changes though, and we tried to document all of them in breakingchanges.txt file included in the release. Read the file to see the list of breaking changes and upgrade path for each of them. If you find any breaking change not described in the file, or some information that is inaccurate of missing let us know, so that we can improve that for the final release.
In addition to that also some API was made obsolete in this release (most notably the old registration API) to discourage users from its usage. It is not going away anytime soon, but it is highly recommended to migrate code using the now-obsolete API to the alternatives.
This is beta 1 release. It means that before the final release no new major features will be added and no breaking changes will be introduced (unless necessary to fix a critical bug, which is unlikely). This release contains only .NET version of Windsor. Version for Silverlight is still in works and will be part of beta 2 release. We’re also working on some sample applications to help you get started using Windsor. The samples will be also included in beta 2 release. So far we have a winforms sample almost ready. If you’d like to contribute a web sample feel more than welcome to contribute.
ETA for beta 2 is in two weeks, if no big issues are found, final release will be out around two weeks after.