WHAT IS MVC?
- Model View Controller
- Software Architectural Design Pattern
- One of the most frequent used patterns
- Seperates application functionality
- Promotes organized programming
Some Web Framework That Use MVC Concepts
- Ruby on Rails (Ruby)
- Sinatr(Ruby)
- Laravel (PHP)
- Codeifniter(PHP)
- Zend(PHP)
- Express(JS)
- Backbone(JS)
- Angular(JS)
- Django(Python)
- 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
Top comments (0)