Ten modules of. Net L3 applications

Source: Internet
Author: User

Any access to. NET development should first understand the important idea of a three-tier architecture. I will not talk much about the three-tier architecture. I believe everyone has understood it.

The three-tier Application divides the entire business application into: presentation layer (UI), business logic layer (BLL), and data access layer (DAL ).

The purpose of hierarchy differentiation is the idea of "high cohesion and low coupling.

1. Presentation layer (UI): The interface displayed to the user, that is, what the user sees when using a system.

2. Business logic layer (BLL): operations for specific problems can also be said to be operations on the data layer and data business logic processing.

3. Data access layer (DAL): This layer operates databases directly and adds, deletes, modifies, updates, and searches data.

Shows the relationship between layers:

After I entered the company, all my projects were built on ten modules. The so-called ten modules are actually the specific applications of the three-tier architecture.

Added the network communication module for remote calls. The server is runningWindowsService.

In the C/S mode, when the underlying method changes, you only need to update the corresponding DLL on the server, instead of synchronously updating the client host,

Reduces maintenance costs.

The following describes the functions of each module and the relationship between modules in the ten modules.

0l module: the start module. It is used to control the startup of the main screen in the screen module.

Namespace companyName. application. UI.

1u module: screen UI module. Create a user interface. Namespace companyName. application. UI.

2C module: The image logic module. Process the logic control related to the screen and encapsulate the lower-Layer Method for the UI module.

Namespace companyName. application. controller.

3E module: screen entity module. Design the corresponding entity class or enumeration type based on the image.

Namespace companyName. application. entity.

4A module: the business logic module. Processing of business logic and Data Conversion between upper and lower modules. It is an intermediate module.

Namespace companyName. application. Access.

5G module: network module, also known as remote call module. Obtain the objects on the remote server for remote calls.

Namespace companyName. application. remoting. Mediation.

6o module: interface module. Defines interfaces to regulate the method design at the data access layer. Sub-classes can be sealed and split, which is also convenient for network transmission.

Namespace companyName. application. remoting. interface.

7D module: Database entity class. The classes defined by this module define attributes completely according to the table structure in the database. Unlike the 3E module,

The 3E module class has some class methods, such as clone (), compare (), equals (), and so on. In addition to the get {} set {} method, the D module provides additional methods.

Namespace companyName. application. remoting. paramdata.

8 p module: Database logic module. Inherits the O Module Interface and encapsulates the R module method. Process some data serialization and conversion.

Namespace threehigh. application. remoting. bussiness.

9R module: database access module. You can directly access the database to add, delete, modify, update, and search data.

Namespace companyName. application. remoting. Dao.

A specific projectProgramAs shown in.

By the way, the reference relationship between each module is emphasized:

L-> U: The L module references the U Module assembly. Similar to the following.

U-> 2C 3E.

C-> 3E 4A.

E-> do not refer to other modules.

A-> 3E 5g 6O 7d.

G-> 6O.

O and d do not refer to other modules.

P-> 6O 7d 9R.

R-> 7d.

Because the company's programs are related to the company's database, and many common classes and methods are called, there is no way to run them separately, so the programSource codeYou will not upload any more.

I think the key technologies are mainly Remote Call objects and server generation objects. NextArticleI will focus on the working principles of the G-layer and server-side services.

This is the first time I have published an article. I hope you can correct me and criticize me more.

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.