DEV Community

Cover image for What is Model View Controller AKA MVC 🖥
NIKHIL GAUTAM
NIKHIL GAUTAM

Posted on • Updated on

What is Model View Controller AKA MVC 🖥

WHAT IS MVC?

  • Model View Controller
  • Software Architectural Design Pattern
  • One of the most frequent used patterns
  • Seperates application functionality
  • Promotes organized programming MVC Diagram

Some Web Framework That Use MVC Concepts

  1. Ruby on Rails (Ruby)
  2. Sinatr(Ruby)
  3. Laravel (PHP)
  4. Codeifniter(PHP)
  5. Zend(PHP)
  6. Express(JS)
  7. Backbone(JS)
  8. Angular(JS)
  9. Django(Python)
  10. Flask(Python)

Model

  • Data related logic
  • Interactions with database (SELECT,INSERT,UPDATE,DELETE)
  • Communicates with controller
  • Can sometimes update the view (Depends on framework)

View

  • What the end user sees (UI)
  • Usually consists of HTML/CSS
  • Communicates with the Controller
  • Can be passed dynamic values from the controller
  • Template Engines

Controller

  • Receives input (from view,url)
  • Processes requests (GET,POST,PUT,DELETE)
  • Gets data from the model
  • Passes data to the view

Diagram of MVC

Top comments (0)