hands on mvc - mastering the web
DESCRIPTION
Web programming workshop for the web programming class at University of Brescia, Italy.TRANSCRIPT
![Page 1: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/1.jpg)
Hands on MVC
Mastering the Web
![Page 2: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/2.jpg)
Chi siamo?Michele Caprasviluppatore freelance.Netmail: [email protected]
twitter: @piccoloaiutante
Claudio Gandellisviluppatore freelancePHPmail: [email protected]
twitter: @cgandelli
![Page 3: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/3.jpg)
www.flickr.com/photos/justinbaeder/5317820857
![Page 4: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/4.jpg)
![Page 5: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/5.jpg)
WEB
![Page 6: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/6.jpg)
Web
www.flickr.com/photos/loungerie/1471835306
![Page 7: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/7.jpg)
Web1990 - Tim Berners-Lee
Pool of Human Knowledge
Web Browser WorldWideWeb
Web Server
Web Page
![Page 8: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/8.jpg)
WebInternet
URL Uniform resource locator
HTTP Hypertext Tranfer Protocol
HTML Hypertext Markup Language
CSS Cascading Stylesheet
![Page 9: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/9.jpg)
HTTP
www.flickr.com/photos/kryptyk/125244997
![Page 10: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/10.jpg)
HTTP
REQUEST | RESPONSE
![Page 11: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/11.jpg)
HTTP
![Page 12: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/12.jpg)
HTTP
![Page 13: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/13.jpg)
HTML
www.flickr.com/photos/tz1_1zt/3202641220
![Page 14: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/14.jpg)
HTMLLinguaggio di markup
Annotation & Presentation Semantic<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>Html</title></head><body>
<h1 id=“header”>HTML</h1><div class=“slide”>
<h2>Linguaggio di markup</h2><p>Annotation & presentation semantic</p>
</div></body>
</html>
![Page 15: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/15.jpg)
HTMLDocument Type Declaration
Attributi
Entità
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>Html</title></head><body>
<h1 id=“header”>HTML</h1><div class=“slide”>
<h2>Linguaggio di markup</h2><p>Annotation & presentation semantic</p>
</div></body>
</html>
![Page 16: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/16.jpg)
CSS
www.flickr.com/photos/r80o/43381087
![Page 17: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/17.jpg)
CSS
Regole per la formattazione
Selettori
Override a cascata
Priorità dei selettori
![Page 18: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/18.jpg)
www.flickr.com/photos/90921086@N00/56844581
![Page 19: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/19.jpg)
WEB 2.0
![Page 20: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/20.jpg)
WEB 2.0
![Page 21: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/21.jpg)
WEB 2.0
http://www.flickr.com/photos/respres/3231178720
![Page 22: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/22.jpg)
?
![Page 23: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/23.jpg)
ProgettazioneIntegrare servizi disponibili
![Page 24: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/24.jpg)
Progettazione
![Page 25: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/25.jpg)
Scelta degli strumenti adattiValutare alternative
![Page 26: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/26.jpg)
Linguaggi di Programmazione
www.flickr.com/photos/tuinkabouter/497701866
![Page 27: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/27.jpg)
Definire l’architettura del sistema
Realizzare codice modulare e
riusabileRiutilizzare codice già scritto
Non “reinventare la ruota”
![Page 28: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/28.jpg)
Architettura Software
www.flickr.com/photos/thomashawk/43213643
![Page 29: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/29.jpg)
Identificare i dati in giocoPersistere i dati in maniera intelligente
Utilizzo di storage online
Alternative ai DB relazionali: NoSQL
![Page 30: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/30.jpg)
Storage
www.flickr.com/photos/thomashawk/24089964
![Page 31: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/31.jpg)
Cloud Computing or not Cloud Computing?
![Page 32: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/32.jpg)
Cloud
www.flickr.com/photos/8525214@N06/3884240503
![Page 33: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/33.jpg)
Lavoro di squadraRispettare la pianificazione
Gestire le risorse
![Page 34: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/34.jpg)
Team
www.flickr.com/photos/atomicshed/161716498
![Page 35: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/35.jpg)
Produrre software di qualitàRobustezza Affidabilità Correttezza
![Page 36: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/36.jpg)
Test
www.flickr.com/photos/jeffkrause/5636722378
![Page 37: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/37.jpg)
Benchmarking
Ottimizzazione
![Page 38: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/38.jpg)
Performance
www.flickr.com/photos/luciano_meirelles/3461860276
![Page 39: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/39.jpg)
Cavalcare il cambiamentoAdattare alle innovazioni
![Page 40: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/40.jpg)
Mobile
www.flickr.com/photos/jdhancock/3420540107
![Page 41: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/41.jpg)
Caso di studioRealizzare un guestbook
2 Gli utenti devono poter inserire i propri messaggi
1 La pagina deve mostrare i messaggi dei visitatori
![Page 42: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/42.jpg)
Mock upIl prototipo HTML
![Page 43: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/43.jpg)
![Page 44: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/44.jpg)
Mock upIl foglio di stile
![Page 45: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/45.jpg)
Mock upIl foglio di stile
![Page 46: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/46.jpg)
Mock upIl foglio di stile
![Page 47: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/47.jpg)
![Page 48: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/48.jpg)
Caso di studio
La programmazione
![Page 49: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/49.jpg)
www.flickr.com/photos/36182550@N08/3347465868
![Page 50: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/50.jpg)
Spaghetti CodeDevo realizzare il blog
Preparo l’html necessario
Introduco le interrogazioni al database
Realizzo la gestione degli inserimenti
==
Una pagina di codice per realizzare il blog
![Page 51: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/51.jpg)
Spaghetti Code
DEMO
![Page 52: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/52.jpg)
Spaghetti CodePro
Veloce da scrivereVeloce da eseguire
Contro Scarsa manutenibilitàScarsa espressività
Difficile riuso del codiceImpossibile il Testing
![Page 53: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/53.jpg)
Separiamo
www.flickr.com/photos/bitzcelt/3892962709
![Page 54: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/54.jpg)
SepariamoBusiness Logic
Presentazione
Separiamo il layer logico (ASP .net)
da quello di presentazione (HTML)
![Page 55: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/55.jpg)
SepariamoLogica e presentazione in file distinti
![Page 56: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/56.jpg)
Separiamo
DEMO
![Page 57: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/57.jpg)
SepariamoAbbiamo ottenuto:
Controller contiene la logica
dell'applicazione
Vista presenta i risultati forniti dal controller
![Page 58: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/58.jpg)
Separiamo
Percorso Request – Response
Con architettura View - Controller
![Page 59: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/59.jpg)
Refactoring MVC
www.flickr.com/photos/19724636@N00/3297328910
![Page 60: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/60.jpg)
Refactoring MVCModello gestisce il comportamento e i dati del
dominio applicativo, risponde a richieste di informazioni di stato e a istruzioni di cambio di stato.
Vista traduce le informazioni ottenute dal modello in un formato adatto all'interazione.
Controller serve a coordinare il processo di interazione: riceve gli input dell'utente e scatena le chiamate verso gli oggetti del modello, per poi passare alla vista il necessario a fornire l'output corretto.
![Page 61: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/61.jpg)
Refactoring MVC
![Page 62: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/62.jpg)
MVC
DEMO
![Page 63: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/63.jpg)
Refactoring MVCPro
Riusabilità del codice
Astrazione dei dati
Ordine
ControNumero di file
Codice da scrivere
Pattern architetturale da implementare
![Page 64: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/64.jpg)
ASP .Net MVC
![Page 65: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/65.jpg)
ASP .Net MVC
Primo esperimento open source di Microsoft
Nasce da Asp.net
Implementazione nel .Net Framework
del pattern MVC.
![Page 66: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/66.jpg)
ASP .Net MVCSistema di routing
Scaffolding
Template
ActionFilter
Validazione automatica lato client
Caching delle pagine
![Page 67: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/67.jpg)
ASP .Net MVC
DEMO
![Page 68: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/68.jpg)
ASP .Net MVC
Url RoutingModule
Controller
ControllerFactory
Mvc RouteHandler
ViewEngine
Mvc Handler
View
Richiesta
Risposta
![Page 69: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/69.jpg)
ASP .Net MVC
Ottima testabilità del codice
Separazione delle responsabilità di ogni layer
Completo controllo dell’html
![Page 70: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/70.jpg)
PHP Way
www.flickr.com/photos/dragonbe/3411273755
![Page 71: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/71.jpg)
Devo realizzare il blog
Preparo l’html necessario
Introduco le interrogazioni al database
Realizzo la gestione degli inserimenti
==
Una pagina di codice per realizzare il blog
Approccio Naive
www.flickr.com/photos/lrargerich/3187525211
![Page 73: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/73.jpg)
Refactoring MVC
www.flickr.com/photos/nrivera/3988954350
![Page 74: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/74.jpg)
Refactoring MVCSeparazione View - Controller
![Page 75: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/75.jpg)
Refactoring MVCAggiunta del Model
![Page 76: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/76.jpg)
Refactoring MVCUn semplice Framework MVC
![Page 78: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/78.jpg)
Symfony Framework
![Page 79: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/79.jpg)
SymfonyWeb Application Framework per progetti PHPSetup semplice
Design “pulito”
Tools di Testing, Debugging, Documentazione
Generatori automatici di codice
Gratuito e licenziato MIT
Symfony 1 (1.4)
Symfony 2
![Page 80: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/80.jpg)
Symfony
![Page 81: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/81.jpg)
SetupSi scarica il Framework o si clona dall’SVNSi genera un nuovo progetto con gli strumenti CLI messi a disposizione
$ php lib/vendor/symfony/data/bin/symfonygenerate:project webprog-symfony
$ php symfony generate:app frontend
Si configura il webserver per puntare alla catella pubblica “web”
![Page 82: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/82.jpg)
Struttura del Progetto
![Page 83: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/83.jpg)
Cartella Web
Contiente i FrontController per
ciascuna applicazione
Contiene le risorse pubbliche
del sito
![Page 84: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/84.jpg)
Cartella AppsContiente le applicazioni web che insistono
sul modello di riferimento
Ogni applicazione contiene le configurazioni(e.g. routing) e tutti i Controller
![Page 85: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/85.jpg)
Cartella ConfigConfigurazione del progetto
Configurazione di accesso al database
Schema dei dati per l’ORM
![Page 86: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/86.jpg)
Creazione del modelloGrazie all’ORM a partire dalla descrizione dello schema il modello e la persistenza verranno generati automaticamente
$ php symfony doctrine:build –model$ php symfony doctrine:build --sql
![Page 87: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/87.jpg)
Creazione di un moduloUn modulo suddivide l’applicazione per
“funzionalità”Per introdurre la funzionalità di gestione dei
nostri messaggi creiamo il modulo “message”
$ php symfony doctrine:generate-module frontend message Message
![Page 88: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/88.jpg)
Elenco dei messaggi
ControllerView
Model
![Page 89: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/89.jpg)
RoutingIl documento di Routing permette al Front Controller di indirizzare al Controller corretto le richieste
![Page 91: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/91.jpg)
Generazione di CodiceL’Admin-Generator è lo strumentofondamentale per il RAD
Permette la creazione di un pannellodi amministrazione dal Modello deidati
$ php symfony generate:app admin
$ php symfony doctrine:generate-admin admin Message --module=message
![Page 92: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/92.jpg)
Admin Generator
DEMO
http://webprog.symfony.local/admin.php/message
![Page 93: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/93.jpg)
Grazie
Michele [email protected]
twitter: @piccoloaiutante
Claudio [email protected]
twitter: @cgandelli
www.flickr.com/photos/donbuciak/3151055123
Hands on MVC
Mastering the Web
![Page 94: Hands on MVC - Mastering the Web](https://reader033.vdocuments.site/reader033/viewer/2022051313/5484c4ef5806b595588b46aa/html5/thumbnails/94.jpg)