-
Model–view–controller (MVC)Modeling/DesignPattern 2020. 2. 23. 19:26
1. Overview
Model–view–controller (usually known as MVC) is a software design pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of information from the ways information is presented to and accepted by the user. This kind of pattern is used for designing the layout of the page.
Traditionally used for desktop graphical user interfaces (GUIs), this pattern has become popular for designing web applications. Popular programming languages like JavaScript, Python, Ruby, PHP, Java, C#, and Swift have MVC frameworks that are used for web or mobile application development straight out of the box.
2. Description
2.1 Model 1
In Model 1, a request is made to a JSP or servlet and then that JSP or servlet handles all responsibilities for the request, including processing the request, validating data, handling the business logic, and generating a response. The Model 1 architecture is commonly used in smaller, simple task applications due to its ease of development.
2.2 Model 2
JSP Model 2 is a complex design pattern used in the design of Java Web applications which separates the display of content from the logic used to obtain and manipulate the content. Since Model 2 drives a separation between logic and display, it is usually associated with the model–view–controller (MVC) paradigm. While the exact form of the MVC "Model" was never specified by the Model 2 design, a number of publications recommend a formalized layer to contain MVC Model code. The Java BluePrints, for example, originally recommended using EJBs to encapsulate the MVC Model.
3. Reference
https://www.javatpoint.com/model-1-and-model-2-mvc-architecture
https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
'Modeling > DesignPattern' 카테고리의 다른 글
Builder (0) 2020.02.24 Singleton (0) 2020.02.24 Categorizing Design Pattern (0) 2019.09.29 Abstract factory (0) 2019.08.23 Factory Pattern (0) 2019.08.22