The way we develop Java web applications has evolved during the last couple of decades. We will discuss the different architectural approaches to developing Java web applications and see where Spring MVC fits in:
- Model 1 architecture
- Model 2 or MVC architecture
- Model 2 with Front Controller
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:
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...