您的位置:首页 > 运维架构

Coproject - a RIA Caliburn.Micro demo, part 1

2015-09-03 06:55 399 查看
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 clear as possible, we will focus on To-Do lists only. We want the application to show list of To-Do items, filter the list, show detail of selected To-Do item, and edit the item. I believe that for now, it is enough
to keep you focused on our goal and I hope I will be able to show how to handle many issues that you usually encounter while developing business applications.




Architecture

Based on the analysis illustrated in the original presentation, Coproject will be a three layered application based on a SQL database, ADO.NET Entity
Framework 4, WCF RIA Services and Silverlight 4.


Data source

In this tutorial. we will use a simple SQL database for data storage because this is probably the typical case. Nevertheless, you may use any other data source that is supported by Entity Framework 4. The most important part of the database schema is shown
below:




To make it a little more complicated than simple list of items, ToDoItems are grouped by ToDoLists.


Web server

On the application server side, we will use Entity Framework 4 to access data source. If you are not familiar with it, check thissite.

To make the data available for the Silverlight client, we will use WCF RIA Services. You c
c56c
an learn more about it here.

The client itself and the services will be hosted in an ASP.NET Web application and thus the client application will be accessible via browser. However, we will also support out-of-browser running.


Client

The client will be implemented as a Silverlight 4 application. It will follow M-V-VM design pattern using Caliburn.Micro framework.
It should handle typical business scenarios like: asynchronous loading of data, loading indication, opening and editing of more than one entity at a time, validation, dirty checking, etc.


Getting ready for development

We need to create a database for Coproject. Although you can create a database file in Visual Studio, it is not possible to execute a script on a database through VS. So you can either create an ordinary database on your server (or local Express server) and
execute Create script attached to this article, or download already prepared database file Database.mdf and put into App_Data folder of web server that we created last time.




You should be able to double-click it and have it opened in Server Explorer:




Rebuild the solution to make sure there are no errors.

That’s all for now. The next time, we’ll create a RIA service.

 
Script and Database
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: