Practice-Architecture Design

Source: Internet
Author: User

In the Microsoft camp, the technical solutions proposed by Microsoft in different fields are connected by a project. For example, EF is used at the underlying layer, MVC is used at the presentation layer, and a business layer is customized, concatenating the two into a simple three-tier architecture, which is the internal strength of other multi-tier architectures.

Programming in a good architecture is not only a pleasing thing for developers, but more importantly, the software can show a healthy posture. The architecture design is unreasonable, not only is it hard for developers to suffer, but the quality of the software itself is also seriously threatened.

Architecture Design Diagram

Architecture Description

A standard layer-4 architecture consists of the following four parts:

    1. Presentation layer, responsible for system and customer interaction
    2. Business logic layer, responsible for processing system business
    3. The data access layer is responsible for processing data and dealing with different databases.
    4. Service layer, responsible for data interaction and business integration with other systems

On the basis of this layer-4 architecture, we perform some expansion, that is, to abstract the business logic methods out of the business interface layer (ibll ).

See the following figure for the call relationship:

The presentation layer (APP) calls the business interface layer (ibll). The business logic layer (BLL) implements the interface layer (ibll) and business logic layer (BLL) the data access layer (DAL) is called, while the common component is an abstract part that can be shared and reused in the system. Each layer can be called.

In addition, a service layer (wcfhost) is added to expose the interface layer (ibll) to other systems to facilitate data interaction and business integration with other systems.

Note: The presentation layer (APP) is not allowed to call the service layer (wcfhost) for performance consideration.

Component Design Diagram

Component Description
    1. App-page display

Is a BS architecture project. Select the latest MVC framework and use the jquery script library.

    1. Bll-business logic

Business logic operations, including business processing and transactions.

    1. Dal-Data Access

Database Access operations, data entities, business entities, data validation, using Entity Framework.

    1. Ibll -- business interface

APIs and service contracts exposed by methods at the business logic layer.

    1. Common -- public component

Entire ApplicationProgramThe public auxiliary method used.

    1. Modelingproject -- Model Design

The legend of the design project, such as the structural diagram.

    1. Wcfhost -- service host

Provides a host for external services, using Microsoft WCF technology.

    1. Wfactivitys -- workflow activity Layer

Defines workflow activities and uses Microsoft WF technology.

    1. Wfdesigner-workflow designer

The implementer configures the workflow designer freely and uses Microsoft WPF technology.

The above nine components are designed under the framework of the Architecture diagram. We will analyze them together with the architecture diagram:

    1. Display layer, including app and wfdesigner Projects
    2. Business logic layer, including Bll, ibll, and wfactivitys
    3. Data access layer, including the Dal Project
    4. Service layer, including wcfhost Project
    5. Public Component layer, including common project

"Data entity" is an entity automatically generated by Entity Framework in the Dal layer;

"Business Entity" is an entity that is extended or customized based on "data entity. Because it is a data entity automatically generated based on Entity Framework, it is also placed in the Dal layer. In addition, data entities and business entities integrate the role of data verification.

Note: because the "Business Entity" is also placed in the Dal access layer, the presentation layer (APP) also needs to reference the data access layer, but it is agreed that database operations are not allowed on the presentation layer.

Next let's look at mongo2datamer.doc.

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.