Web application architecture
A web application is exposed to multiple concurrent users over a public or private network as opposed to a standalone application. Let's get started developing a basic web application that uses the well known Model-view-controller (MVC) pattern to build a three-tier application. The MVC pattern is known for its separation of concerns by decoupling presentation logic (what the user sees in a browser), routing and business logic (what the application needs to accomplish), and persistence (where the data is finally stored). This has made MVC a very developer-friendly pattern as different tiers of an application can be developed and tested by experts in that area independently and without knowledge of the other tiers.
For example, a user interface (UI) developer can work on the presentation while a database administrator works on database optimization. Also, this layering has made maintenance easier than in conventional web applications, which usually have spaghetti code without any layering.
In this chapter, Spring Web MVC Framework will be used to implement the MVC pattern inside our web application. Let's have a look at the workflow of Spring Web MVC in detail.