Wednesday, May 25, 2022

[ASP.NET MVC] 3 layer architecture vs MVC

July architect or vessels model-view-controller very often we can hear a question is to like architecture the same as MVC the answer is no but we need to know why this is to upload for design and software architecture are not the same but off we describe mine difference first if to our client player user interface never communicate .

Directly with the data liar our communication must be true the middle liar in other word we can say communication is dinner while NBC is drink cooler Trinculo communication means that review user interface send a request to the controller controller modification read model and the view gets updated directly from the model in .

Other words we can say clear player user interface can communicate directly with the data layer model second three layer architecture has following class presentation is the user interface in a web application it is a part which can receive HTTP request and return HTML response web for plus code behind this is user interface liar business liar .

Business logic and rules for example validation this is this liar and the access communicate with the database by modification read data prepare SQL query and sell to the database this is data like MVC has the following tire model holding data is this model if you this is a user interface and controller this controller .

Get the request execute business logic read modification data pass model to the view let's see how this work let's see how this look in 2000 this is July architect this is user interface layer this is view business logic layer communicate and communicate with attack right I'm controller communicate model and if you end and you can't win great .

Model so now we know the difference between these two approach or design and software but we also need to answer the question what is to decide which approach to chose for our project this question is about software architecture and the choice belong to the requirement feel as it can be logical or it can be physical on the other hand in the cecum .

The only logical that means an application based on friller architecture we can't divide between different physical servers but we see we can divide between different servers because this design pattern divides up through application into only logical Liars it determines that MVC is more suitable for application that our .

Presentation oriented like web application freely architectural is for application which are not presentation oriented example business logic client doesn't know anything about presentation view

RELATED ARTICLES

Most Popular