Intro
Building a Simple Web App with Spring MVC
Securing our Spring MVC Web App
Session Management
Finishing Up

Summary: Introduction to Spring MVC

  • Web Applications:
    • Web applications are crucial in the digital landscape, facilitating user interaction through HTTP.
    • They cover various domains such as e-commerce, social media, online banking, and content management.
    • Their versatility allows the presentation layer to be ported to native mobile and desktop apps, making them a popular choice for full-stack enterprise applications.
    • The development of robust, secure, and maintainable web applications is a top priority for developers.
  • Spring Web:
    • Spring Web is a vital component of the Spring Framework, simplifying web development.
    • It abstracts and simplifies the usage of servlets, and provides tools for testing and mocking, making it easier to write unit and integration tests for web components.
  • Spring Boot Starter Web:
    • Spring Boot Starter Web supercharges Spring Web development by offering Spring Boot autoconfiguration, automatically including Spring Web MVC, and including an embedded Tomcat container.
    • This integrated setup eliminates the need to install and run an external Tomcat server separately, enhancing development efficiency.
  • The Model-View-Controller (MVC) Pattern:
    • The MVC pattern is a widely used design pattern that separates applications into three interconnected components: Model, View, and Controller.
    • The Model is responsible for data and business logic, the View presents data to users, and the Controller handles user input, processes requests, and controls the application flow.
    • This separation of concerns makes code more organised and easier to maintain.
    • Each component can be reused, promoting code reusability.
    • Additionally, components can be tested independently, ensuring the application’s reliability.
    • The modular architecture allows for scalability and the addition of new features without impacting existing functionality.
    • Flexibility is also a key advantage, as changes to one component do not affect the others.
  • Spring MVC:
    • Spring Web MVC, a part of Spring Boot Starter Web, extends Spring Web by supporting the MVC pattern.
    • It efficiently handles HTTP requests and responses, ensuring data retrieval, processing, and presentation in web applications.
    • Spring MVC architecture involves the DispatcherServlet, Handler Mapping, Controller, View Resolver, and View.
    • This approach provides an organised and efficient way to build web applications using the MVC pattern, separating concerns and promoting code maintainability.