Using apworks to develop applications based on cqrs architecture (I): Preface

Source: Internet
Author: User
Tags microsoft sql server 2005

InApworksFramework releaseAlphaAt the time of version, I have developed a case for it:Tiny library cqrsI wrote the walkthrough document:Http://apworks.org/custom/documents/wlkthr_BuildAppsUsingApworks/. To take the international path, this articleArticleIt is in full English,CommunityMany netizens said it was hard to understand. These days are not very busy. I took the time to translate it back to Chinese and add more approval content for my friends who love DDD, cqrs, and architecture design to read the reference, we also hope that you can actively participate in the discussion.

 

Introduction

Apworks is a set of applicationsProgramThe development framework allows software architects and developers to develop domain-centric applications based on cqrs architecture. In this series of articles, I will introduce how to use apworks to develop a domain-oriented, loosely coupled distributed application system.

The cases used in this series of articles are described previously.Tiny library cqrsApplication. There was also a series of articles that introduced this project. However, these articles all introduce some functional points and Implementation ideas of tiny library cqrs, and they are not a complete set of how to practice documents. The series has not been written until this article is written, but after I finish this series, I will continue to update and improve it.

This series of articles will show you how to use apworks to develop applications from scratch.

 

Business scenarios

Friends who have previously learned about the tiny library cqrs project should be very familiar with business scenarios and can skip this section directly. In the following chapters, we will develop an application through which users can manage "readers" and "books. Readers can "borrow books" from the library. After reading the books, they can "return them" to the library. System users can create information for "readers" and "books", and query the "borrow books" and "return books" of "readers" and the lending history and return status of "books.

 

Prerequisites

To ensure that you can follow the instructions in this series of articles and gradually create applications that can run, your system must meet the following prerequisites:

    • Microsoft. NET Framework 3.5 SP1
    • Microsoft Visual maxcompute 2010
    • Microsoft patterns & Practices Enterprise Library 5.0 (rjl 2010)
    • Microsoft SQL Server 2005 (Express) or above
    • Microsoft ASP. NET MVC
    • Apworks development framework, You Can 【Click here] Direct download (License for lgpl 2.1 must be agreed)

 

Create a solution in Visual Studio

Now, we start to create a solution in Visual Studio 2010. For ease of description, we give the solution a name called "tinylibrarycqrs". The namespace of all projects is based on this name. To better use the apworks framework to develop applications, our solutions generally include the following items:

    • Tinylibrary. domain (C # Library)-This project contains the domain model
    • Tinylibrary. Events (C # Library)-This project contains definitions of all domain events
    • Tinylibrary. eventhandlers (C # Library)-This project contains the processor definitions for all domain events
    • Tinylibrary. commands (C # Library)-This project contains the definition of all client commands
    • Tinylibrary. commandhandlers (C # Library)-This project contains all the command processor definitions that process client commands
    • Tinylibrary. queryobjects (C # Library)-This project provides a query mechanism and an object for the entire application.
    • Tinylibrary. Services (C # WCF Service Application)-a c # WCF Service Project, used to provide the application service interface to the client.
    • Tinylibrary. webapp (C # ASP. net mvc application)-a client program developed using ASP. NET MVC

Now, let's create a tinylibrarycqrs solution in Visual Studio 2010:

    1. Open Microsoft Visual Studio 2010
    2. ClickFile | new | ProjectMenu, which will openNew projectDialog Box
    3. InInstalled templatesUnder the tab, selectOther project types | Visual Studio SolutionsAnd then selectBlank Solution
    4. Make sure that the Framework Version selection area is selected in the dialog box.. NET Framework 4.0
    5. InNameIn the text box, enterTinylibrarycqrsClickOKButton

At this point, the Solution Explorer of Visual Studio only displays one node, which is the tinylibrarycqrs solution we just created. In subsequent articles, we will understand the entire development process of the project.

 

Additional instructions

    1. in the operation step description of this series of articles, the name of the interface element is still in English. This is because of work requirements, and my development environment is in English, in order not to produce ambiguity, I didn't translate the names of these interface elements into Chinese and wrote them here. I didn't have time to build a Chinese environment for comparison. So now I can only write down the names of the English language, I don't think it will cause too many reading barriers to readers.
    2. apworks currently releases alpha and the next version is under development. Therefore, the content of this article is only applicable to Alpha.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.