| |||||
| Auteur |  Sujet : Model View Controller (MVC) - Architecture des applications PHP | 
|---|---|
masklinn í dag viðrar vel til loftárása | Reprise du message précédent : 
 
 --------------- 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?  | 
Publicité  | Posté le 04-10-2005 à 14:41:56   ![]() ![]()  | 
uriel blood pt.2 | 
 
 --------------- IVG en france  | 
skeye  | 
 
 --------------- Can't buy what I want because it's free -  | 
uriel blood pt.2 | 
 
 --------------- IVG en france  | 
skeye  | 
 
 --------------- Can't buy what I want because it's free -  | 
omega2  | 
 Je vérifierais ce soir, mais de toute maniére, je te croirais pas avant d'avoir vérifier.  | 
uriel blood pt.2 | 
 
 --------------- IVG en france  | 
skeye  | 
 
 Message édité par skeye le 04-10-2005 à 14:46:35 --------------- Can't buy what I want because it's free -  | 
FlorentG  | 
 
  | 
Publicité  | Posté le 04-10-2005 à 14:46:31   ![]() ![]()  | 
multani Dépressionnisé | Préciser de quelle version de php vous parlez là, c'est un peu un dialogue de sourds   | 
skeye  | 
 
 --------------- Can't buy what I want because it's free -  | 
FlorentG  | PHP4, bien-sûr, mais je compte passer au 5... pour des soucis de rapidité tant en OO qu'en XML  | 
uriel blood pt.2 | 
multani Dépressionnisé | 
 
 
 
  | 
push /dev/random | 
FlorentG  | 
skeye  | (pour aller avec les interfaces, on gagne aussi les classes abstraites, la visibilité des membres, etc...en php5!  --------------- Can't buy what I want because it's free -  | 
skeye  | 
 
 --------------- Can't buy what I want because it's free -  | 
FlorentG  | 
 
 
 
  | 
push /dev/random | 
masklinn í dag viðrar vel til loftárása | 
 
 Prenons un exemple: tu as des classes de chocolat, un chocolat blanc, un chocolat noir et un chocolat au lait. Ce sont des objets différents instancés à partir de classes différentes (c'est illogique, je sais, normalement ils devraient tous avoir la même classe et différer par les valeurs des membres mais c'est comme ça), mais tous ont une partie commune. Maintenant imaginons un mélange utilisant n'importe quel chocolat, en le faisant fondre par exemple (la méthode "fondre" étant présente dans tous les chocolats). Dans un langage à typage statique, soit tu crées n fois la fonction utilisant le chocolat (pour chaque type de chocolat) soit tu te simplifies la vie en créant une interface IChocolat implémentée par tous tes chocolats, et tu vas définir ta fonction comme  
 
 
 
 Donc l'interface est nécessaire et simplifie grandement la logique de l'application. Maintenant dans un langage dynamique, tout ce que tu écris c'est 
 
 Si la méthode "fondre" n'existe pas, exception (c'est pas du chocolat) que tu catches proprement  Mieux, si un jour tu te rends compte que tu peux remplacer ton chocolat par du sucre, suffit que ton sucre puisse fondre (ce qu'il peut faire, sinon tu pourrais pas remplacer ton chocolat) et tu peux le balancer à la place du chocolat (tu redéfinis le protocole utilisé, mais dans la mesure où ce n'est qu'une représentation logique de l'implémentation physique ça n'a aucune importance). Alors qu'avec tes interfaces statiques tu l'auras dans l'os, parce que personnellement je vais pas demander à mon sucre d'implémenter IChocolat  Message cité 1 fois Message édité par masklinn le 13-05-2008 à 19:52:36 --------------- 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  | non rien. Message édité par skeye le 04-10-2005 à 14:58:31 --------------- Can't buy what I want because it's free -  | 
push /dev/random | 
 
  | 
omega2  | 
 C'est bizare, t'étais le seul à parler de php4.
  | 
FlorentG  | 
FlorentG  | 
 
  | 
skeye  | Machine> http://www.nexen.net/docs/php/anno [...] inting.php --------------- Can't buy what I want because it's free -  | 
masklinn í dag viðrar vel til loftárása | 
 
 
 Message cité 1 fois Message édité par masklinn le 04-10-2005 à 15:01:21 --------------- 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 -  | 
omega2  | Tiens, conaissais pas ça. La classe, faut que je regardes de plus prés pour m'en servir.   | 
skeye  | (bon, ok, une erreur fatale c'est un brin moins pratique qu'une exception... --------------- Can't buy what I want because it's free -  | 
push /dev/random | c'est pas moins pratique c'est logique, tu respectes pas l'interface ça doit se vautrer, pas commencer à se catcher c'est n'importe quoi ça  Message cité 1 fois Message édité par push le 04-10-2005 à 15:07:28  | 
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  | 
 
  | 
push /dev/random | 
 
  | 
masklinn í dag viðrar vel til loftárása | 
 
 
 
 Message cité 3 fois Message édité par masklinn le 04-10-2005 à 15:19: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?  | 
push /dev/random | 
 
  | 
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  | Faut pas désespérer, PHP6 p-e? --------------- Can't buy what I want because it's free -  | 
Publicité  | Posté le    ![]() ![]()  | 




  

