I was evaluating to migrate a quite new project from Caliburn Micro to Catel.. I want to share with you my thought and get a feedback from you
Let's start with my app structure:
Now that almost is clear the structure I'll start with my questions:
Thanks
Explanation about models
Consider an object of type Person for simplicity which will be loaded from webservice via Servicestack
[Alias("Person")]
public class Person
{
[Alias("NAME")]
public string Name {get;set;}
[Alias("SURNAME")]
public string Surname {get;set;}
}
This will be returned as a IList and maybe loaded in a GridView
Now the user wants to edit it so I'll load this Person into another viewmodel called UpdatePersonViewModel (shown in a popup)
If I have not implemented it as you've done in your sample I won't be able to use Catel Validation and so on right? so maybe I've to create a PersonModel that takes a Person as Constructor parameter and then creates the object, is this right?
5.For the SimpleInjector I stared using it a long time ago after having read this post
in Caliburn I can attach a Message in the form
cal:Message.Attach="[Event DataLoading] = "[Action Something($eventArgs)"] .
In Catel how should I bound that event??
btw. you might be interested in Orchestra, it's a shell we built on top of Catel for WPF apps (NET 40 and NET 45) which contains a lot of nice feature such as fully customizable keyboard shortcuts, splash screen, etc)
3.1: See EventToCommand or any of the many other behaviors and triggers that ship with Catel.
Benchmarking is very good, but you should keep in mind how much you are actually doing. You are probably injecting 2 / 3 vm's at most a second, you won't notice any difference. But if you really want to, check out this documentation on how to replace the default components.
You can still use validation but you must implemented it inside your view model. This is complex for your grids, so then it might be best to create a wrapper that can validate itself. So you could indeed create a ValidatablePerson class that will validate the person and wraps it's properties (or just implements the validation only). Can easily be done using T4 templates.