designpattern Archives - SoftUni Global https://softuni.org/tag/designpattern/ Learn Programming and Start a Developer Job Thu, 31 Mar 2022 13:44:09 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.3 https://softuni.org/wp-content/uploads/2022/04/cropped-SoftUni-Global-Logo-Square-notext-32x32.png designpattern Archives - SoftUni Global https://softuni.org/tag/designpattern/ 32 32 Model-View-Controller (MVC) [Dev Concepts #20] https://softuni.org/dev-concepts/model-view-controller-pattern/ https://softuni.org/dev-concepts/model-view-controller-pattern/#respond Fri, 17 Dec 2021 11:47:00 +0000 https://softuni.org/?p=9468 In this video from the Dev Concepts series, we take a look at the MVC pattern!

The post Model-View-Controller (MVC) [Dev Concepts #20] appeared first on SoftUni Global.

]]>

In this episode, we take a look at the MVC pattern. In short, MVC stands for ModelViewController. It is a design pattern used to help us build frameworks for applications. The MVC splits the application into three different sections. Each section represents one word from the abbreviature.
The lesson includes a small example, which uses the MVC pattern, so make sure to check it out.

mvc-logo

What are Models, Views, and Controllers?

Each component has a specific responsibility and has a link to the others. That creates a solid structure for our web application.

  • Model is the lowest level, responsible for maintaining the data. Each model has a connection to the database and can have relationships to other models. If any data changes, the model will notify the controller.
  • The view is the only part of the app the user interacts with directly. It represents the visualization of the data that a model contains. The model never directly communicates with the view.
  • A controller is the go-between for model and view. It relays data from browser to app and from app to browser. The controller receives user input, translates it to match the model, and then passes those inputs onto a view.

Using the MVC pattern correctly can help you as a developer. It ensures a smooth and easy-to-follow user experience. Although it takes time to understand how MVC works, it will pay off when creating future applications.

In the end, MVC is not hard to understand. Just keep in mind these key points:

  • MVC is an architectural pattern consisting of three parts: Model, View, Controller.
  • Model: handles data logic.
  • View: displays the information from the model to the user.
  • Controller: controls the data flow into a model object and updates the view whenever data changes.

Lesson Topics

In this video we review the following topics:
  • Model-View-Controller Patter
  • Web MVC Frameworks

Lesson Slides

The post Model-View-Controller (MVC) [Dev Concepts #20] appeared first on SoftUni Global.

]]>
https://softuni.org/dev-concepts/model-view-controller-pattern/feed/ 0