Last month, the development team of Catel has been working very hard to provide a brand new release of Catel, namely 3.0.
We decided to jump from 2.5 to 3.0 because this gave us the opportunity to introduce breaking changes. We hate to introduce breaking changes, but we have added all changes into this release so you only have to go through the breaking changes once.
This blog posts covers the most important changes to Catel 3.0, and why you should definitely upgrade as soon as it becomes available.
New assemblies
All versions before Catel 3.0 had different assembly names for WPF, Silverlight and WP7. We have now created exactly the same libraries for all target frameworks. So even when you don’t want to use the MVVM framework of Catel, you can still use the IoC container, the weak event listener, message mediator, etc.
Non-generic views
One of the arguments of people not using Catel is because the base classes for the views were generic. To use them in combination with Blend or Silverlight forced you to use a very nasty “intermediate” class construction.
Starting with Catel 3.0, we introduced non-generic versions of the views. This means that you can now use the Catel views directly and no longer need to create intermediate classes. So, a control that supports a nested scenario now has this code behind:
1: public partial class HouseView : Catel.Windows.UserControl
2: {
3: public HouseView()
4: {
5: InitializeComponent();
6: }
7: }
Then, the xaml looks like this:
1: <catel:UserControl x:Class="Catel.Examples.SL4.NestedUserControls.Views.HouseView"
2: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4: xmlns:catel="http://catel.codeplex.com">
5:
6: <!-- Your content -->
7:
8: </catel:UserControl>
ViewModelLocator and ViewLocator
With the removal of the generic base classes, we had to think of a better way to resolve views and view models. This is done via the ViewModelLocator and the ViewLocator. These are classes that are internally used by Catel to resolve the right view model for a view and vice versa. However, the locators are available in the ServiceLocator so you can use them as well!
FluentValidation
We have introduced an extension for FluentValidation. This means that by simply adding the extension assembly, you can have full FluentValidation support for the DataObjectBase and ViewModelBase.
When is it being released?
So, when will it be released? We plan to release mid March, but we want to await the first beta feedback to make sure everything works like we planned. If you are interested in grabbing a beta, you can use NuGet or simply create a new discussion and we will gladly provide you with a new version.
Event the documentation is in beta, as you can see here:
http://catel.catenalogic.com/3.0-beta/
It contains a guide on how to move from an earlier version of Catel to the latest and greatest.