UML System Analysis and Design 04-"hierarchy" of Architecture Design"

Source: Internet
Author: User

I am not an architect. Writing this content is just a personal summary for your reference.

 

When talking about system architecture, we often hear statements like "three-tier architecture" and "multi-tier architecture, however, the strict UML design does not directly describe the "layer" image; in a typical architecture design document based on the "4 + 1 View", there is also no explicit requirement for "layer" image analysis.

[Note: If you like "layer", you can add a detailed description of "layer" to the logical view in the 4 + 1 view.]

In UML-based design, we often break down the concept of "layering" into "components" and "packages", but as a person. NET developers, however, have a long history of their love for "Layers", and their visual methods cannot be replaced. I personally like to use them very much. In the past, I used ppt files to draw this part of content. Since vs2010, I have been able to unify it into one place.

 

I,PetshopLayered Architecture

If you have been in business for many years. net programmers should have a little understanding of the petshop history. Since petshop2.0, each upgrade will be accompanied by a typical "layered architecture diagram ", from that time on, I began to like "layered architecture diagram.

Layered Architecture of petshop 2.0

 

Layered Architecture of petshop 3.0

 

Layered Architecture of petshop 4.0

 

 

II,NlayerLayered Architecture

As another typical release by Microsoft, nlayer. net technical solutions are refreshing in the layered architecture. Of course, looking at the source code (solution) to understand the layered architecture may be clearer than the architecture diagram given here, or you can provide a more detailed "layered architecture diagram ".

It may be the layered architecture diagram provided by nlayer, which aims to demonstrate. Net's powerful technical system (as described in "Mapping Technologies") rather than introducing architecture ideas. However, in any case, we have to say that the nlayer layer is quite good and representative.

Friends interested in nlayer projects can learn more from http://microsoftnlayerapp.codeplex.com.

The "multi-layer architecture diagram" of this project is as follows ":

 

III,Another style based on Layered Architecture

I once saw someone raise a question about the layered architecture on the csdn forum, which references the following layered architecture diagram. It is found that it actually comes from.

IV,Visual StudioLayered support

Although the "layered" approach has been around for a long time, but it really supported in IDE, but it started with vs2010. In vs2010, the architect not only provided support for UML (not completely), but also added his own concept of "layering. In addition, some typical architecture models also provide Visual Studio-based plug-ins to help designers quickly and easily draw layered architecture diagrams. You can download and install the vs2010 and vs2012 extensions at the following addresses.

For vs2010: Http://visualstudiogallery.msdn.microsoft.com/9c8051f8-e8f7-45b1-8d04-dad6afc697d2

For vs2012: Http://visualstudiogallery.msdn.microsoft.com/94ca6b70-539c-4f49-98c9-0550a4c044bf

 

The following are the plug-ins installed from vs2010 and 2012rc respectively.

1. vs2010 architecture Template

2. vs2010 Mobile Application

 

3. vs2010 rich client application

 

4. vs2010 rich Internet Application

 

5. vs2010 Services Application

 

6. vs2010 Web Application

 

7. vs2012rc architecture Template

 

8. vs2012rc common application pattern

 

9. vs2012rc service archetype Pattern

The above Hierarchical Architecture templates are based on the "best practices" and are very representative. For some small and medium systems, you can use them directly, or make some modifications. Of course, you must fully understand the meaning and functions of each layer. If you are interested, refer to Microsoft application architecture guide, 2nd edition.

Http://msdn.microsoft.com/en-us/library/dd673617.aspx,http://apparchguide.codeplex.com/

V,DIYOne Music StoreLayered Architecture

Because the original intention of musicstore in codeplxe is mainly used to describe and practice the Asp.net MVC technology, we artificially expand the demand to better illustrate the architecture and hierarchy.

1. musicstore is a system based on B/S and C/S hybrid modes.

2. musicstore is a distributed system that supports joining. In addition, each franchise store uses the C/S method for data management to provide a better user experience. (Of course, B/S has the same function)

3. The musicstore project needs to support handheld devices to manage end data of records (for example, regular checks on records to confirm loss or damage ), the information is verified to interact with the PC wirelessly.

4. You can use GIS information to find the album store for attachments.

5. You can print Custom reports or charts.

(Khan! Is it a bit outdated ?)

 

Next we will simply design a layered architecture Diagram for these needs:

1. Layered Architecture

 

2. Brief Description

Business Layer provides unified distributed application services for C/S and B/S-based applications. Both winform presentation layer and WEB presentation layer use the WCF technology to communicate with business layer.

For rich clients, we use winform for uidesign and introduce a third-party devexpress control library for beautification. to better implement unit testing, we use MVP mode for implementation.

In terms of web, the front-end uses the extjs script library and ASP. net mvc 3 as the main framework.

The business logic layer is mainly implemented based on domain services and provides application services for clients through unified encapsulation. The system adopts the DDD design, and the domainentity serves as the main object transmission between layers.

The storage layer mainly uses Ms sqlserver to provide data services for large chain stores. Of course, MS Access can also be used to provide data services for a single store. The warehouse layer adopts the adapter design mode to support different database systems and works with IOC for dynamic configuration. At the same time, the implementation of the SQL Server-based database system is implemented using Asp.net Entity Framework technology, and the access-based database system is implemented using ADO. NET technology.

The public part: Communication Service, GIS service, and report service are independent subsystems. The specific implementation can be divided and designed independently. Security provides security for the system. msel is a micro-Software Enterprise Library and can provide the IOC framework, cache mechanism, and ADO-based.. NET database access operations, exception handling, UI verification, etc. nlog is a log management framework provided by the system.

 

VI,Layered ArchitectureMain role

No matter how complicated a system is, if a circular reference is formed at the end, it can be concluded that the layer is not properly designed at the design time. The benefits of layered architecture are not described in detail. Let's just talk about the main role of "layered architecture diagram.

1. Although UML is defined as a unified modeling language, its theoretical and technical implementation still requires a certain language base in terms of its operations and explanations. Compared with UML, "layered architecture diagram" is more easy-to-use. For some specific customers, "layered architecture diagram" is unique in describing technical directions, system operations, and coping with changes.

2. The simple and clear form of "layered architecture diagram" not only gives non-technical personnel a clear impression. There is also a kind of High-level building experience for technical staff, so that developers can immediately understand the architect's main intentions and ideas.

3. The "layered architecture diagram" can first intuitively describe the main subsystems, main components and their relationships of the system, and provide guidance for the division of the "component diagram and package diagram" in the subsequent UML.

4. In the formation of a "layered architecture diagram", architects often need to analyze which public component modules should be used. Some modules may not exist yet, but can be formed after implementation of this project. Some may already exist and can be used directly. The accumulation of public components is often accompanied by the growth of a company's software development. Good Component Design and achievements are also an important fortune of the company.

 

VII,Layered Architecture diagram is similar

When I attended a review, someone asked, "How does your layered architecture look similar to the template provided by Microsoft ?" Actually, this is true! Not all projects around us are big projects and strategic. They must be unique in Architecture Design to address complex requirements and performance requirements. Most projects are some small and medium-sized application systems, and even some small programs used for "scientific research, for this part of the project, we can use a common layered architecture template to save design time. Since these templates are based on the summary of practices, their overall ideas, ideas, and solutions are mature, that is, from a macro perspective, it is a general solution of "Three layers to multiple layers, that is, Datong! Slight differences are based on the characteristics of the project and the differences in details, so as to analyze specific problems. For example, we can use webform or ASP. net MVC can be implemented as the presentation layer; sqlserver 2005 can be used, or oracol 10 Gb can be used as the database system; similarly, we can decide to adopt the "anemia mode" or "congestion mode" based on the project deployment, which cannot be generalized.

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.