Model-View-Controller Architectures

In this chapter, we will dive into one of the most common architectural patterns used by frameworks today.

The Model-View-Controller (MVC) architectural pattern was formulated in 1979 by Trygve Reenskaug. This was one of the first attempts to create an organized method for working on graphical user interfaces. Although many years have passed since then, this pattern continues to be quite popular even in the most modern UI frameworks. This is because it is designed to build almost any type of application, including the most common types of applications, such as mobile, desktop, and web applications.

The popularity of this pattern mostly comes down to the ease of understanding it. MVC provides an excellent way to separate applications into three different components, which we will review in this chapter.

In this chapter, we will cover the following topics:

  • The elements of MVC:
    • Model
    • View
    • Controller
  • The benefits of using MVC architectures
  • Common pitfalls
  • Implementing applications using MVC:
    • Spring MVC
    • Testing
    • UI frameworks: Thymeleaf
    • Securing an MVC application:
      • Basic authentication
      • HTTP and HTTPS
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.35.194