| |||||
| Auteur | Sujet : Model View Controller (MVC) - Architecture des applications PHP |
|---|---|
skeye | Reprise du message précédent :
--------------- Can't buy what I want because it's free - |
Publicité | Posté le 05-03-2008 à 15:57:11 ![]() ![]() |
dwogsi Défaillance cérébrale... | En ce qui me concerne, j'ai bien ma vue d'un côté et mon modèle de l'autre. La dessus aucun problème ils sont complètement indépendant et il n'y a pas d'échanges entre les deux.
--------------- -- Debian -- Le système d'exploitation universel | Le gras c'est la vie! | /(bb|[^b]{2})/ |
skeye |
--------------- Can't buy what I want because it's free - |
FlorentG |
|
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
FlorentG |
|
skeye |
et alors? Message cité 1 fois Message édité par skeye le 05-03-2008 à 16:03:27 --------------- Can't buy what I want because it's free - |
dwogsi Défaillance cérébrale... |
Message édité par dwogsi le 05-03-2008 à 16:05:18 --------------- -- Debian -- Le système d'exploitation universel | Le gras c'est la vie! | /(bb|[^b]{2})/ |
drasche |
--------------- Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top) |
FlorentG |
|
Publicité | Posté le 05-03-2008 à 16:05:29 ![]() ![]() |
skeye |
bah c'est bien ce que je dis.
Message cité 2 fois Message édité par skeye le 05-03-2008 à 16:09:20 --------------- Can't buy what I want because it's free - |
FlorentG |
|
skeye |
--------------- Can't buy what I want because it's free - |
FlorentG |
|
drasche |
Message cité 2 fois Message édité par drasche le 05-03-2008 à 16:18:28 --------------- Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top) |
skeye |
--------------- Can't buy what I want because it's free - |
FlorentG |
|
skeye |
Perso je pense que la validation de l'input doit être fait dans la vue. Message cité 2 fois Message édité par skeye le 05-03-2008 à 16:26:29 --------------- Can't buy what I want because it's free - |
FlorentG |
|
FlorentG |
Après la View définit ses propres règles :
Et enfin le controller réuni les deux :
Ainsi on peut changer le modèle et la view, rajouter des champs ou des validations, le controller restera le même, on a une séparation correcte Message cité 1 fois Message édité par FlorentG le 05-03-2008 à 16:35:55 |
masklinn í dag viðrar vel til loftárása |
Il serait plus logique d'avoir la validation qui fait partie du model en permanence (model "virtuel" si besoin, sans backing dans une datastore) Message cité 2 fois Message édité par masklinn le 05-03-2008 à 16:44:00 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
FlorentG |
|
ratibus |
--------------- Mon blog |
skeye |
--------------- Can't buy what I want because it's free - |
FlorentG |
|
skeye |
--------------- Can't buy what I want because it's free - |
skeye |
--------------- Can't buy what I want because it's free - |
FlorentG |
|
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
skeye |
--------------- Can't buy what I want because it's free - |
FlorentG |
|
skeye |
Ca reviendrait pas un poil à ce que je disais sur la vue dans un mvc "strict", ça? Message cité 1 fois Message édité par skeye le 05-03-2008 à 17:22:46 --------------- Can't buy what I want because it's free - |
masklinn í dag viðrar vel til loftárása |
(en gros, ils considèrent que le controller c'est le dispatcher d'URLs + quelques trucs autour qui font globalement partie du framework, donc le controller n'est pas défini par l'utilisateur, qui définit le modèle, la vue et la/les template(s). D'où MTV Model Template View) Message cité 1 fois Message édité par masklinn le 05-03-2008 à 17:25:17 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
skeye |
--------------- Can't buy what I want because it's free - |
ratibus |
theredled ● REC | Détail : dans tous les cas en MVC, la template fait bien partie de la vue nan ? --------------- Contes de fées en yaourt --- █ --- zed, souviens-toi de ma dernière lettre. --- Rate ta musique |
Publicité | Posté le ![]() ![]() |






