Idea of ​​the three-story architecture

xiaoxiao2021-03-05  54

Three-layer architecture knows that the sub-data layer business layer performance layer

I think it can also refine three layers when writing .NET SQLSERVER programs.

1 is the data layer

All operations (Query Add Delete Modification) Writing with the Storage Procedure

2 is a dedicated data interface layer

Define the class of the dedicated database operation database, such as defining a connection database class

ClasssqldbProvider

One of the functions SQLDBConnection

Connect the database using the SqlConnection

3 is the data interface layer

Define classes that ignore database types, such as classes

ClassdbProvider

One of the functions dbconnection

Use layers 2 custom class SQLDBConnection

The above three layers are traditional data layers.

4 is the business logic layer

Package specific operation classes, such as custom classes of user registration class calling layer 3

5 is a template operation

Package template operation

6 is a performance control layer

Control data filled with 4 data

The above three are traditional business layers are classes

7 template layer

That is some template

8 control layer

Some web controls page

Is the ASPX page or ASCX page

9 performance layer

According to the class output page of the client or environment 6

ASPX.CS or ASCX.CS

This is 9 floors

Do the following:

Layer 2 does not have any SQL statement

Layer 3 does not have anything related to a certain database type

Layer 4 does not have any related things related to database operations

Layer 9 does not have any HTML code

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

New Post(0)