Blog

  • Coproject - a RIA Caliburn.Micro demo, part 9

    by Augustin Šulc

    In this part, we will add a toolbar and handle data saving. Toolbar It is a typical scenario that screens have toolbars. These are usually shown somewhere else in the application than their respective view model’s views. In this case, we will benefit from Caliburn.Micro’s feature of having more than one view attached to a view model. You can describe what view you want to show by setting ‘context’ of the view. So, open the Coproject solution where we finished the last … more

  • Coproject - a RIA Caliburn.Micro demo, part 8

    by Augustin Šulc

    In this part, we will create ToDoItem detail. Context lifetime The main question when considering lists and details is whether to share context among all screens or create a new context per screen. Both ways have their pros and cons and you will probably have to choose depending on the situation. But most likely, you will use both of them depending on the scope of entities. Shared context In this case, you would probably create a service in the application and all screens would access it to get … more

  • Coproject - a RIA Caliburn.Micro demo, part 7

    by Augustin Šulc

    In this part, we will add filtering to ToDo list and create several useful extension methods. Extension methods In the client project root, create a new static class called Extensions and put following functions into it: public static bool IsNullOrWhiteSpace(this string value) { return string.IsNullOrWhiteSpace(value); } public static string FormatWith(this string formatString, params object[] args) { return string.Format(formatString, args); } public static IResult ToSequential(this … more

  • Coproject - a RIA Caliburn.Micro demo, part 6

    by Augustin Šulc

    In this part, we will load data from database and start using Caliburn.Micro coroutines. Remember that you can get latest news and source code from Coproject Codeplex site. ToDoListsView Create a new Silverlight User Control called ToDoListsView in the Views folder. Then replace the original LayoutRoot grid with this one: <Grid x:Name="LayoutRoot"> <Grid.ColumnDefinitions> <ColumnDefinition Width="6*" /> <ColumnDefinition Width="5*" /> … more

  • Coproject - a RIA Caliburn.Micro demo, part 5

    by Augustin Šulc

    In this part, we will add some module metadata. Note that you can get the most recent Coproject source codes from its Codeplex site. Metadata As you probably noticed, modules are not loaded into shell in any specified order. And since we don’t want the modules be in arbitrary order, we need to add some metadata. You can read more about MEF metadata here. The easiest way is to use ExportMetadataAttribute. We would update HomeViewModel as: [Export(typeof(IModule))] [ExportMetadata("Order", … more

  • Coproject - a RIA Caliburn.Micro demo, part 4

    by Augustin Šulc

    In this part, we will dig a little bit into Caliburn.Micro and create application modules. Note: some information are intentionally simplified to make the whole concept easier to understand. Once you master it, go ahead and read more detailed articles. Screens As I indicated in the last part, we will describe Coproject structure and hierarchy of application screens via ViewModels. And then, we will let C.M to take care of wiring it to views and showing it to the user. You will see that this … more

  • Coproject - a RIA Caliburn.Micro demo, part 3

    by Augustin Šulc

    In this third part, we will set up Caliburn.Micro to our client project and add some cool styles :-). 1. Project cleanup Let’s create some structure in the project. Delete MainPage.xaml and create folders Assets, ViewModels, ViewModels/Interfaces, and Views. Your Solution Explorer should look like this: Finally, to make the solution build, make function Application_Startup in App.xaml.cs empty (we have deleted MainPage). 2. Add Caliburn.Micro Open Coproject client in Solution Explorer, … more

  • Coproject - a RIA Caliburn.Micro demo, part 2

    by Augustin Šulc

    In this part, we will create a domain model and a RIA service so that the client application will be able to access data in Coproject database. For those of you, who would like to see the code running but don't have time to write it, check Coproject codeplex site. 1. Create domain model In Coproject.Web, create a new folder called Models. Add a new Entity Data Model called CoprojectModel to it. In Entity Data Model Wizard, choose Generate from database. Choose the proper database … more

  • Coproject - a RIA Caliburn.Micro demo, part 1

    by Augustin Šulc

    In this part, I would like to describe the Coproject application, overview its architecture, and prepare its database. What will Coproject do If you know BaseCamp, the idea of Coproject should be familiar to you. For others, let’s say we want to create a simple project management tool. It should help you track current state and progress of a project. We want it to have four modules: Home and overview, Messages, To-Do lists, and Milestones. Since I want this tutorial to be as simple and … more

  • Coproject - a RIA Caliburn.Micro demo, part 0

    by Augustin Šulc

    At the presentation about Rapid RIA development in .NET, I promised to publish a tutorial about using WCF RIA Services and Caliburn.Micro. So here it is! In this part, we will get our computer ready for development. You will need Visual Studio 2010 to follow this tutorial. Express edition of Visual Studio is not supported by RIA Services.You will also need a MS SQL Server instance. Locally running Express edition is fine. On the other hand, you should be able to use any data store supported by … more