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:
- WPF application based on MVVM
- Telerik Usercontrol Suite
- Use of ServiceStack to retrieve data from a webserver
- Use of SimpleInjector for IoC
- NLog for logging
- TCP/IP Connection to remote server
- FW 4.0 with Microsoft.BCL.Async
- The application is similar to Visual Studio (Docking)
Now that almost is clear the structure I'll start with my questions:
- My models are filled via ServiceStack.OrmLite so they're POCO with property and not dependency property-like , since the models are shared on the webserver and WPF part I don't want to inherit from ModelBase, should I have to re-create the object what inherits from modelbase when data arrives on the WPF part?
- The data shown in the RadGridView are bound to a Model Property,as far as I've seen here , I've to pass to the ViewModel the Model how can I bind those data to the Grid or view in general?
- I find quite usefull in CM the Convention so if I name a TextBox x:Name="Surname" it looks for a property Surname, in Catel should I do ? or does something similar exist?
- In my application I make large use of async can do this with Catel?
- I've read that I can substitute the Catel's default Ioc provider with SimpleInjector ... anyone has got succed with it?
Thanks
UPDATE #1
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
- If I've to use classical Binding for properties, for event binding have I to use Commands? what if I've got a usercontrol that doesn't have a command for it?
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??