[Collection] DUWAMISH architecture analysis

xiaoxiao2021-03-05  28

Duwamish is Microsoft to provide an enterprise-class distributed system architecture. If you develop an enterprise-class distributed system, you can imitate this architecture. If you develop some simple systems, you can simplify.

I have learned the Duwamish paradigm before, just find different times, different experiences, and different experiences. Just as Lu Yan said: Through the study of Duwamish examples, the master can understand the design idea of ​​the .NET application architecture, and the low-handed programming skills can be learned. It is really old.

Therefore, learn again and experience a duwamish example.

1, DUWAMISH 7.0 structure is divided into four logical layers (from MSDN):

Web layer - Presentation

The Web layer provides access to the application for the client. This layer is implemented as a Web project in the duwamish.sln solution file. The Web layer consists of an ASP.NET web form and code hidden file. The web form is just a user operation with HTML, and the code hidden file implements event processing of various controls.

Business Appearance - Business Facade

The business appearance layer provides the web layer to process the account, category browsing, and books. This layer is implemented as the BusinessFacade project in the duwamish.sln solution file. The business appearance layer is used as an isolation layer that isolates the user interface to the implementation of various business functions. In addition to the low-level systems and support functions, all calls to the database server are made through this assembly.

Business Rule Layer - Business Rules

The business rule layer is implemented as the BusinessRules project in the duwamish.sln solution file, which contains various business rules and logic implementations. Business rules complete this task such as the verification of customer accounts and book orders.

Data Access Layer - Data Access

The data access layer provides data services for the business rules layer. This layer is implemented as a DataAccess project in the duwamish.sln solution file.

In addition to the above four logic layers, DUWAMISH 7.0 also includes shared functions in the COMMON project encapsulated in the duwamish.sln solution file. The "common" layer contains a data set for delivering information between the layers. The Common project also includes application configuration and tracking classes in the SystemFramework project in the Duwamish.sln solution file.

2, the relationship between the various logic layers (from MSDN) and its call sequence map example:

Below is the entire calling process of the Categories.aspx web page gets the Description of the Description of Category.

(1) Instantiate the ProductSystem object

(2) Call the getCategories () method () method of ProductSystem

(3) Legacy of detection parameters

(4) Creating a categories :: DataAccess object instance

(5) Return to the above object

(6) Call Categories :: DataAccess object's getcategories () method

(7) Creating a CategoryData :: Common Object instance

(8) Returns the above object

(9) Returns the CategoryData :: COMMON object instance, which already contains the data required

(10) Return CategoryData :: Common Object Example to Web / Client

(11) Legacy of detection data

(12) Read and display the result: Category's DescriptionSystemFramework project contains some configuration parameters required by Application, ApplicationLog log class, and ApplicationASsert parameter check classes. The SystemFramework project is cited for all other projects.

The Common project contains data sets for delivering information between the layers, such as the CategoryData described above inherits System.Data.DataSet, neither the so-called Typed Dataset, not a general Dataset, but simple and practical, this is based on .NET Remoting Develop a method of interacting data between the distributed system to interact between TIERs and TIER. The Common project is also referenced by other projects, except the SystemFramework project.

All Classes in the BusinessFacade project inherits MarshalByrefObject Class, apparently to prepare BusinessFacade Tier to REMOTE OBJECTS. However, it is actually the default here to deploy it as Remote Objects, and the web layer still calls local objects ("DUWAMISH Deployment Scheme" will analyze this issue).

3, Summary

When developing the .NET Framework enterprise-class distributed system, the above architecture is worth recommending, but it is not perfect, and there is actually some places worthy of improvement. Obviously, it is impossible to have an example for all the actual conditions, it is too harsh. In fact, another sample of Enterprise Samples Fitch and Mather 7.0, its architecture and duwamish are somewhat different.

If it is developing a local system, do not imitate the Duwamish architecture (see if you get Category's Description calling process, too hard.), Such as Business Facade and Business Rules, Classes should use Fine-Grained Interface Design, Layers and Layers The interaction parameters do not have to use Dataset, which can be used when using setter / getter, which can not only improve the development efficiency, but also help to improve Performance, Maintainability and Reusability.

References:

1, Lu Yan, duwamish deeply analyzed - structure articles, http://www.microsoft.com/china/community/program/originalarticles/techdoc/duwamish.mspx

2, MSDN, DUWAMISH

The SystemFramework project contains some configuration parameters required by Application, ApplicationLog log class, and ApplicationASsert parameter check classes. The SystemFramework project is cited for all other projects.

The Common project contains data sets for delivering information between the layers, such as the CategoryData described above inherits System.Data.DataSet, neither the so-called Typed Dataset, not a general Dataset, but simple and practical, this is based on .NET Remoting Develop a method of interacting data between the distributed system to interact between TIERs and TIER. The Common project is also referenced by other projects, except the SystemFramework project.

All Classes in the BusinessFacade project inherits MarshalByrefObject Class, apparently to prepare BusinessFacade Tier to REMOTE OBJECTS. However, it is actually the default here to deploy it as Remote Objects, and the web layer still calls local objects ("DUWAMISH Deployment Scheme" will analyze this issue). 3, Summary

When developing the .NET Framework enterprise-class distributed system, the above architecture is worth recommending, but it is not perfect, and there is actually some places worthy of improvement. Obviously, it is impossible to have an example for all the actual conditions, it is too harsh. In fact, another sample of Enterprise Samples Fitch and Mather 7.0, its architecture and duwamish are somewhat different.

If it is developing a local system, do not imitate the Duwamish architecture (see if you get Category's Description calling process, too hard.), Such as Business Facade and Business Rules, Classes should use Fine-Grained Interface Design, Layers and Layers The interaction parameters do not have to use Dataset, which can be used when using setter / getter, which can not only improve the development efficiency, but also help to improve Performance, Maintainability and Reusability.

References:

1, Lu Yan, duwamish deeply analyzed - structure articles, http://www.microsoft.com/china/community/program/originalarticles/techdoc/duwamish.mspx

2, MSDN, DUWAMISH

Below is the entire calling process of the Categories.aspx web page gets the Description of the Description of Category.

(1) Instantiate the ProductSystem object

(2) Call the getCategories () method () method of ProductSystem

(3) Legacy of detection parameters

(4) Creating a categories :: DataAccess object instance

(5) Return to the above object

(6) Call Categories :: DataAccess object's getcategories () method

(7) Creating a CategoryData :: Common Object instance

(8) Returns the above object

(9) Returns the CategoryData :: COMMON object instance, which already contains the data required

(10) Return CategoryData :: Common Object Example to Web / Client

(11) Legacy of detection data

(12) Read and display results: Category's Description

The SystemFramework project contains some configuration parameters required by Application, ApplicationLog log class, and ApplicationASsert parameter check classes. The SystemFramework project is cited for all other projects.

The Common project contains data sets for delivering information between the layers, such as the CategoryData described above inherits System.Data.DataSet, neither the so-called Typed Dataset, not a general Dataset, but simple and practical, this is based on .NET Remoting Develop a method of interacting data between the distributed system to interact between TIERs and TIER. The Common project is also referenced by other projects, except the SystemFramework project. All Classes in the BusinessFacade project inherits MarshalByrefObject Class, apparently to prepare BusinessFacade Tier to REMOTE OBJECTS. However, it is actually the default here to deploy it as Remote Objects, and the web layer still calls local objects ("DUWAMISH Deployment Scheme" will analyze this issue).

3, Summary

When developing the .NET Framework enterprise-class distributed system, the above architecture is worth recommending, but it is not perfect, and there is actually some places worthy of improvement. Obviously, it is impossible to have an example for all the actual conditions, it is too harsh. In fact, another sample of Enterprise Samples Fitch and Mather 7.0, its architecture and duwamish are somewhat different.

If it is developing a local system, do not imitate the Duwamish architecture (see if you get Category's Description calling process, too hard.), Such as Business Facade and Business Rules, Classes should use Fine-Grained Interface Design, Layers and Layers The interaction parameters do not have to use Dataset, which can be used when using setter / getter, which can not only improve the development efficiency, but also help to improve Performance, Maintainability and Reusability.

References:

1, Lu Yan, duwamish deeply analyzed - structure articles, http://www.microsoft.com/china/community/program/originalarticles/techdoc/duwamish.mspx

2, MSDN, DUWAMISH

The SystemFramework project contains some configuration parameters required by Application, ApplicationLog log class, and ApplicationASsert parameter check classes. The SystemFramework project is cited for all other projects.

The Common project contains data sets for delivering information between the layers, such as the CategoryData described above inherits System.Data.DataSet, neither the so-called Typed Dataset, not a general Dataset, but simple and practical, this is based on .NET Remoting Develop a method of interacting data between the distributed system to interact between TIERs and TIER. The Common project is also referenced by other projects, except the SystemFramework project.

All Classes in the BusinessFacade project inherits MarshalByrefObject Class, apparently to prepare BusinessFacade Tier to REMOTE OBJECTS. However, it is actually the default here to deploy it as Remote Objects, and the web layer still calls local objects ("DUWAMISH Deployment Scheme" will analyze this issue).

3, Summary

When developing the .NET Framework enterprise-class distributed system, the above architecture is worth recommending, but it is not perfect, and there is actually some places worthy of improvement. Obviously, it is impossible to have an example for all the actual conditions, it is too harsh. In fact, another sample of Enterprise Samples Fitch and Mather 7.0, its architecture and duwamish are somewhat different. If it is developing a local system, do not imitate the Duwamish architecture (see if you get Category's Description calling process, too hard.), Such as Business Facade and Business Rules, Classes should use Fine-Grained Interface Design, Layers and Layers The interaction parameters do not have to use Dataset, which can be used when using setter / getter, which can not only improve the development efficiency, but also help to improve Performance, Maintainability and Reusability.

References:

1, Lu Yan, duwamish deeply analyzed - structure articles, http://www.microsoft.com/china/community/program/originalarticles/techdoc/duwamish.mspx

2, MSDN, DUWAMISH

转载请注明原文地址:https://www.9cbs.com/read-35285.html

New Post(0)