Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc.
Architecture logicielle #4 : mvc
-
Upload
jean-michel -
Category
Software
-
view
149 -
download
4
Transcript of Architecture logicielle #4 : mvc
Architecture logicielle : MVC
1. Theory
Real MVC vs Fake MVC
Fake MVC
MVC is a software architecture that separates business logic from the rest of the user interface. It does this by separating the application into three parts: the model, the view, and the controller.Source : Dave Jarvis, http://programmers.stackexchange.com/questions
Fake MVC - Components & collaboration
User
Controller
ViewModel
HTTP
HTML
RenderAsk
Datas
Real MVC - definition
Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.Source : http://en.wikipedia.org
Real MVC - Components & collaboration
User
ControllerView
Model
UsesSees
Updates Manipulates
Le Model
Game of thrones - The wall
Rôle du Model
Gérer le stockage des données
Assurer l’intégrité des données
Répondre aux requêtes du controller
Notifier les changements d’états
La view
Game of thrones - Final Season 3 Scene
Rôle de la view
Afficher les données
Gestion du format d’affichage
Gestion de la logique d’affichage
Le controller
Game of thrones - The Iron Throne Room in King's Landing
Rôle du Controller
Traiter les interactions avec l’utilisateur
Collecter les informations pour le Model
Charger et alimenter la view
2. Practice
Exemples d’implémentation PHP
http://www.sitepoint.com/the-mvc-pattern-and-php-1/
https://blog.udemy.com/php-mvc-framework-tutorial/
http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/
https://github.com/panique/mini
To be continued …