![Mastering Spring 5.0](https://wfqqreader-1252317822.image.myqcloud.com/cover/64/36701064/b_36701064.jpg)
上QQ阅读APP看书,第一时间看更新
Model 1 architecture
Model 1 architecture is one of the initial architecture styles used to develop Java-based web applications. A few important details are as follows:
- JSP pages directly handled the requests from the browser
- JSP pages made use of the model containing simple Java beans
- In some applications of this architecture style, JSPs even performed queries to the database
- JSPs also handled the flow logic: which page to show next
The following picture represents typical Model 1 architecture:
![](https://epubservercos.yuewen.com/9A5966/19470407701638406/epubprivate/OEBPS/Images/a74fb9ad-d01d-4d70-93fa-f980215c48f1.png?sign=1739304750-tGrkWxbF8hNXO3wBUe5deH8hhu7u7qXA-0-d1a4a05ad0a61e9f3f009f8ac354c1d9)
There are a lot of disadvantages in this approach, leading to quick shelving and the evolution of other architectures. A few important disadvantages are listed as follows:
- Hardly any separation of concerns: JSPs were responsible for retrieving data, displaying data, deciding which pages to show next (flow), and sometimes, even business logic as well
- Complex JSPs: Because JSPs handled a lot of logic, they were huge and difficult to maintain