From the course: Spring: Design Patterns

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

The Model-View-Controller (MVC) pattern

The Model-View-Controller (MVC) pattern

From the course: Spring: Design Patterns

Start my 1-month free trial

The Model-View-Controller (MVC) pattern

- [Instructor] In Spring the ModeL-View-Controller Pattern is one of the first patterns that most developers actually interact with when they're using the framework. In fact my first course here on Linkedin Learning had some very strong use cases of the Model-View-Controller. So throughout the Spring framework you will see that the Model-View-Controller Pattern is the de facto core standard, for how all of Spring web works. It's used not only for traditional web pages, but also for RESTful web service calls. Now how does this pattern work in a nutshell? So responsibilities are broken into three distinct components. The first is the model, which delivers data to the view. The second is the view, which delivers the experience to the consumer. And finally, the controller populates the model, selects the view, and merges them together, or delegates that to some other operation as in Spring MVC, where the template engine actually does that merging. So why would we actually want to use the…

Contents