The following separation is to consider the 2nd floor or a 3-layer architecture?

I have a web application, which is deployed on the web hosting as follows:

>Code (without separate BLL, DAL, etc.) is uploaded to the web hosting
>Upload the database (MSSQL backup file) to the web hosting database

Is this considered a 2-tier architecture or a 3-tier architecture?

I have seen different explanations from different sources

>If the code and the database reside on the same server, it is 2 layers. If the code and the database reside on different On the server, it is 3-tier.
>Web applications with a database have at least 3-tier architecture
>This is a 2-tier architecture.

This source defines 2-tier
In the 2-tier architecture, the web server responds to requests for web pages, while the database server provides back-end data storage
define multiple layers through this source
In the 3-tier architecture, the web server links To the middle layer, this layer usually includes a series of application servers that perform specific tasks, and the back-end layer of existing enterprise systems

I hope someone can clarify.

It really depends on what you understand in the term “level” in the question.

From the infrastructure/physical point of view of most web applications, you will have 3 layers:

>Client (browser)<->application server<->database

< p>In contrast to most desktop applications consisting of 2 tiers:

>Customer<->Database

Please note that by this definition, websites are not always 3-tier – For example, you may not have any persistence in a simple website that only counts compound interests.

From a logical point of view in the web application architecture itself, you often have layers that abstractly represent the upper layers-for example In MVC, you will have the model corresponding to the database, the controller corresponding to the logic executed on the server, and the corresponding view to present to the customer.

So, on the infrastructure, you There is a 3-tier architecture (because you are obviously in the first case), but from what you have described, your website itself may not follow a strict multilayer approach, which unites multiple logical layers into one.

See this wikipedia article, it will be clearer.

Update: this thread also seems to clarify this issue.

I have one The web application is deployed on the web hosting as follows:

>Code (without separate BLL, DAL, etc.) is uploaded to the web hosting
>Database (MSSQL backup file) is uploaded to the web hosting Database

Is this considered a 2-tier architecture or a 3-tier architecture?

I have seen different explanations from different sources

>If the code and the database reside on the same server, it is 2 layers. If the code and the database reside on different On the server, it is 3-tier.
>Web applications with a database have at least 3-tier architecture
>This is a 2-tier architecture.

This source defines 2-tier
In the 2-tier architecture, the web server responds to requests for web pages, while the database server provides back-end data storage
define multiple layers through this source
In the 3-tier architecture, the web server links To the middle tier, this tier usually includes a series of application servers that perform specific tasks, as well as the back-end tier of existing enterprise systems.

I hope someone can clarify.

It really depends on what you understand in the term “hierarchy” in the question.

From the infrastructure/physical perspective of most web applications Look, you will have 3 layers:

>Client (browser)<->application server<->database

and most desktop applications consisting of 2 layers The procedure is the opposite:

>Customer<->Database

Please note that by this definition, the website is not always three-tier-for example, you may be in a simple There is no persistence in the website.

In the web application architecture itself, from a logical point of view, you often have an abstract representation of the upper layer-for example, in MVC, you will have a model corresponding to the database , The controller corresponding to the logic executed on the server and the corresponding view are presented to the client.

So, on the basic architecture, you have a 3-tier architecture (because you are obviously the first Case), but from what you have described, your website itself may not follow a strict multi-layer approach, which unites multiple logical layers into one.

See this wikipedia article, it will go further Clear.

Update: This thread also seems to clarify this issue.

Leave a Comment

Your email address will not be published.