1 / 32

Développement d’application web

Développement d’application web. L’architecture. Problématique. Comment faire une application qui soit: F acilement maintenable Évolutive Avec une gestion simple du contenu . Solution. La séparation des « problèmes » ( separation of concerns ) Architecture en couches

fred
Télécharger la présentation

Développement d’application web

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Développement d’application web L’architecture

  2. Problématique • Comment faire une application qui soit: • Facilement maintenable • Évolutive • Avec une gestion simple du contenu

  3. Solution • La séparation des « problèmes » (separation of concerns) • Architecture en couches • Couche présentation • Couche données • Couche métier • Les couches données et métier ne doivent pas dépendre de la couche présentation

  4. Solution • Modèle MVC

  5. Solution • Structurer soi-même l’application • Utiliser un framework • Force à structurer son application • Communauté: • Toute personne connaissant le framework comprendra plus vite le code de l’application • Présence d’extensions et d’aides facilitant la mise en place de certaines tâches récurrentes et rébarbatives • Coût d’apprentissage non négligeable

  6. Qui ?

  7. Quel ?

  8. Avantages ? Maintenu, communauté Séparation des couches Modulaire Utilitaires de debug et d’analyse de performances Faciliter les tests …

  9. Ce que nous utiliserons Obligatoire ? • Système d’exploitation: Linux • Serveur web: Apache2 • Framework: Symfony2 • SCM: Git • Base de données: MySQL

  10. Symfony • Composer • Gestionnaire de dépendances PHP • Twig • Système de template • Doctrine • ORM (Object RelationalMapping)

  11. Sources d’information • La documentation officielle: • http://symfony.com/doc/current/index.html • Le forum officiel: • http://forum.symfony-project.org/ • Google

  12. Symfony: structure

  13. Symfony: app/

  14. Symfony: app/config/

  15. Symfony: src/

  16. Symfony: vendor/

  17. Symfony: web/

  18. Symfony: création d’un bundle

  19. Bundle: ressources

  20. Création de pages Header Contenu M E N U Footer

  21. Création de pages Page 2 Page 3 Page 1 Header Header Header Contenu Contenu Contenu M E N U M E N U M E N U Footer Footer Footer

  22. Création de pages • PHP: Header include Contenu M E N U include include Footer

  23. Création de pages header.php

  24. Création de page menu.php

  25. Création de pages footer.php

  26. Création de pages index.php

  27. Création de pages Header • Twig index.html.twig base.html.twig Contenu Contenu MENU extends Footer

  28. Création de pages base.html.twig

  29. Création de pages base.html.twig (cont)

  30. Création de pages base.html.twig (cont)

  31. Création de pages Index.html.twig

  32. Questions ?

More Related