Chapter 2 Organizational Model of the design scheme using Micrisoft.net,

Source: Internet
Author: User

Chapter 2 Organizational Model of the design scheme using Micrisoft.net,

Chapter 2 Organization Model

The mode depends not only on the smaller mode it contains, but also on the larger mode it contains. It is a system method used to describe complex software.

The objective of this chapter is to let us know the following:

1. How to identify the relationship between modes

2. How to organize a mode into a mode set

3. How to use different abstract-level division Modes

4. How to Use the mode to solve all aspects involved in the system

5. Describe the solution in a mode

Modes and modes

The mode can describe the relationship. Object-oriented software is composed of classes. If the relationship between classes is put aside, the model cannot solve any problem. Mode organizes a group of classes into a set of modes that are easy to manage.

When designing a system, we will find that there are more patterns than the classes used. So how can we understand the role of patterns? The key issue is to understand the relationship between projects. The mode is closely related to the mode. Therefore, the mode is organized according to the relationship.

Mode cluster

We can easily switch from one mode to another, but we do not know how to use these modes in the system, or which modes should be learned. Therefore, this leads to another concept: mode cluster. A mode cluster is a set of modes involving a specific topic. Through mode clusters, we can understand how modes are combined and how enterprise-level solutions are built. Mode clusters are divided into five categories:

Problems solved by the cluster type

Web indicates creating a dynamic website

The distributed system solves the problem of communication between different computers or processes.

Deploy and resolve hierarchical applications to hierarchical hardware

Performance and security provide a reliable protection mechanism for some important specific operations

Services use external services and provide external services

Different levels of abstraction

Divide the mode into clusters for convenient management. For example, you only need to start from the Web Cluster to build a Web front-end. However, different people may be interested in different projects at different stages. For example, developers prefer the Page Control mode, while system designers prefer the Layer mode. Therefore, we classify patterns at the abstract level, so that different people can find the directions they are interested in. Traditionally, patterns are divided into three categories at the Abstraction Level:

Architecture mode: describes the basic structure of the software, and sets the relationship, principles, behaviors, and functions between subsystems or components in advance. For example, Layer

Design Mode: optimize the relationship between subsystems or components. It mainly solves the problems that occur repeatedly in the upper and lower layers. For example, the MVC design mode and Singleton Mode

Implementation Mode: The design mode specific to a language or platform, such as the Page Control mode of Microsoft. Net.

Viewpoint

The Code cannot fully reflect all aspects of the solution, such as hardware, network, and deployment. Therefore, a name corresponding to the design pattern is required, so the viewpoint concept is introduced. The viewpoint does not describe the hierarchy, but provides different ways to view things. The software system is generally divided into four points of view:

1. Database viewpoint: a persistent layer of software used to store data

2. Application viewpoint: it is the executable part of the solution, including the domain model, class, assembly, process, etc.

3. Infrastructure Viewpoint

4. Deployment Viewpoint

Mode framework

As a reference point and navigation assistant, it provides descriptions with each independent mode and sets a set of meaningful sub-category organization modes. The pattern framework is as follows:

1. Online Transaction Processing: it manages the database subsystem of transaction processing and provides atomic operations for business processing.

2. Object-oriented

3. Layered applications

4. Hierarchical Distribution System

Usage mode description Solution

The constrained pattern framework and its contained patterns provide enough data points to start using patterns to describe the entire solution. In fact, the quotation examples in Chapter 1 can be described in terms of patterns. Recall that a Web-based quote application is specified in the requirement. Users who describe the solution architecture may make the following statements:

First, let's take a look at this quote application at the abstract architecture level. From the Application point of view, the quote Application is an object-oriented Application, which is logically constructed into Three-Layered Services Application. (layer-3 service Application ). From the database point of view, applications are based on the OLTP processing model. From the perspective of infrastructure, the hardware and network architecture is based on Four-Tiered Distribution (Level 4 Distribution), which requires that the Web server function and application server function have different physical levels. Finally, from the Deployment perspective, the Team has created a Deployment Plan based on complex Web applications to map components to servers.

 

From all these four points of view, this article briefs the architecture of the solution to readers who are familiar with the reference model. Move down an abstraction level and you may see the Author describe the system design as follows:

 

From the Application perspective, let's consider each layer of Three-Layered Services Application.

The presentation layer is constructed around the Web representation Framework Based on Model-View-Controller (MVC. Although MVC separates the business layer from the presentation logic layer, each page contains a large number of public logic. To eliminate this redundancy, we use Page Controller to present public header and tail injection information and set friendly display names for users.

The business layer includes customers, quotations, orders, Series items, and inventory domain objects. Because the development speed is an important requirement, these domain objects are implemented using the Table Module. The Deployment Model (Deployment Model) of a complex Web application requires the separation of Web-level and application-level. Therefore, the two levels communicate through a proxy program. The business entity acts as Data Transfer Objects, which is used to encapsulate information transmitted between these two levels.

The Data layer uses Data Table Gateway to access the OLTP database subsystem, and uses a large number of Data access components to support the persistence requirements of domain objects.

From the perspective of infrastructure: to meet business operation requirements, we add the Load-Balanced Cluster and Failover Cluster) based on the basic Four-Tiered Distribution (Four-level Distribution) model. To meet the requirements of high-level concurrent users, we have added the load balancing function at the Web level. To meet availability requirements, we added a cluster at the database level.

You can continue to describe the data and deployment viewpoint at the same abstraction level. To this end, move down an abstraction level and you may see the implementation of the solution described by the author as follows:

 

Let's look at the solution from the application perspective. The solution is built using Microsoft. NET technology. The presentation layer is based on the built-in Web representation framework in ASP. NET. ASP. NET uses the built-in code hiding page function to simplify Model-View-Controller implementation. We use the built-in Page Controller mechanism in ASP. NET to implement the presentation logic. The domain object in the business layer is a. NET hosted object. Because the presentation layer and business layer are deployed at different levels, we use the server activation object to implement Broker through. NET Remoting. Finally, the data layer provides database access based on the ADO. NET class in the. NET Framework. Table Modules and business entities are constructed using the dataset component of ADO. NET. The rest of the data access component is provided by the Microsoft Application Blocks for. NET build block.

 

From the perspective of infrastructure: Microsoft SQL Server? It runs in the Failover group and is used in the OLTP database subsystem. Microsoft Network Load Balancing clusters provide load balancing between Web servers.

 

All these sessions are often referred to in various modes. Initially, this may be a little daunting, but when you understand the mode you are using, you will realize that even a brief description will give you a detailed understanding of how the system works. Please note that you do not have to read a large number of documents or gradually execute endless code lines to understand this. Imagine the work involved in describing the solution without using the mode, and it is not difficult to understand the communication benefits brought by the mode.

Related Article

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.