SlideShare une entreprise Scribd logo
1  sur  19
Soutenance Vincent Composieux
About Epixelic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Environnement de travail ,[object Object],[object Object],[object Object],[object Object]
Bug tracking : Flyspray
Projets sur lesquels j’ai travaillé ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction aux frameworks PHP ,[object Object],[object Object],[object Object],Légende des mots-clé  :  symfony      zend framework     code igniter     cake php
Pourquoi ? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Modèle MVC + Abstraction de la base de données Ne pas réinventer la roue
Le modèle MVC
Mapping objet-relationnel Objets Base de données ,[object Object],[object Object],[object Object],DELETE   FROM   user   WHERE   id  = '5'; $user = new User( 5 ); $user->delete();
Mise en place d’un projet <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot &quot;/var/www/monprojet&quot; ServerName monprojet.local ErrorLog &quot;logs/ monprojet.local-error.log&quot; CustomLog &quot;logs/ monprojet.local-access.log&quot; common </VirtualHost> ,[object Object],[object Object],Symfony  :  root@laptop:~/var/www$ symfony generate:project monprojet Zend Framework  : root@laptop:~/var/www$ zf create project
Mise en place d’un projet
Architecture Zend Framework (INI) Symfony (YAML) apps/frontend/ modules/ index/ actions/ actions.class.php templates/ indexSuccess.php contact/ lib/ model/ application/ controllers/ IndexController.php FooController.php models/ views/ scripts/ index/ index.phtml contact/
Configuration Zend Framework (INI) Symfony (YAML) [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH &quot;/../library&quot; bootstrap.path = APPLICATION_PATH &quot;/Bootstrap.php&quot; bootstrap.class = &quot;Bootstrap&quot; appnamespace = &quot;Application&quot; resources.frontController.controllerDirectory = APPLICATION_PATH &quot;/controllers&quot; resources.frontController.params.displayExceptions = 0 resources.view[] = default: http_metas: content-type: text/html metas: title:  Titre de mon projet description:  Description de mon projet keywords:  Mots-clés de mon projet language:  fr robots:  index, follow stylesheets:  [main.css] javascripts:  [jquery-1.4.2.min.js] has_layout:  true layout:  layout class frontendConfiguration extends sfApplicationConfiguration { public function configure() { } } class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initDoctype() { $this->bootstrap('view'); $view = $this->getResource('view'); $view->doctype('XHTML1_STRICT'); } } Bootstrap ProjectConfiguration
Gestion des droits sous Zend Framework Définition des droits d’accès : $acl = new Zend_Acl(); $acl->add(new Zend_Acl_Resource('index')); $acl->add(new Zend_Acl_Resource('backend')); $acl->allow('guest', 'index'); $acl->deny('guest', 'backend'); Zend_Registry::set('acl', $acl); class Plugin_Acl extends Zend_Controller_Plugin_Abstract { public function preDispatch(Zend_Controller_Request_Abstract $request) { $acl = Zend_Registry::get('acl'); $auth = Zend_Auth::getInstance(); if(!$auth->hasIdentity()) { $roleName = 'guest'; } else { $roleName = $auth->getIdentity()->role; } $privilegeName = $request->getActionName(); if(!$acl->isAllowed($roleName, null, $privilegeName)){ $request->setControllerName('Error'); $request->setActionName('index'); } } } Création du plug-in de test :
Gestion des droits sous Symfony ,[object Object],index: is_secure:  on credentials: administrator all: is_secure:  off ,[object Object],[object Object],[object Object]
Utilisation des ORM ,[object Object],[object Object],[object Object],[object Object],class Commande extends Zend_Db_Table_Abstract { protected $_name = 'commande'; protected $_primary = 'id'; } ,[object Object],symfony doctrine:build-model symfony doctrine:build-sql
Utilisation des ORM ,[object Object],$table = new Commande(); $commande = $table->find(5); ,[object Object],$commande = Doctrine::getTable('commande')->find(5); $nom = $commande->utilisateur->nom; $commande->delete();
Les plus des frameworks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Présentation de symfony - Human talks aux docks le 8 juillet 2014
Présentation de symfony - Human talks aux docks le 8 juillet 2014Présentation de symfony - Human talks aux docks le 8 juillet 2014
Présentation de symfony - Human talks aux docks le 8 juillet 2014
Tony Galmiche
 
Exposer des services web SOAP et REST avec symfony 1.4 et Zend Framework
Exposer des services web SOAP et REST avec symfony 1.4 et Zend FrameworkExposer des services web SOAP et REST avec symfony 1.4 et Zend Framework
Exposer des services web SOAP et REST avec symfony 1.4 et Zend Framework
Hugo Hamon
 
Presentation Symfony2
Presentation Symfony2Presentation Symfony2
Presentation Symfony2
Ahmed ABATAL
 

Tendances (20)

Présentation symfony epita
Présentation symfony epitaPrésentation symfony epita
Présentation symfony epita
 
Orchestrez vos projets Symfony sans fausses notes
Orchestrez vos projets Symfony sans fausses notesOrchestrez vos projets Symfony sans fausses notes
Orchestrez vos projets Symfony sans fausses notes
 
Symfony 2 : chapitre 2 - Les vues en Twig
Symfony 2 : chapitre 2 - Les vues en TwigSymfony 2 : chapitre 2 - Les vues en Twig
Symfony 2 : chapitre 2 - Les vues en Twig
 
Formation Symfony2 par KNP Labs
Formation Symfony2 par KNP LabsFormation Symfony2 par KNP Labs
Formation Symfony2 par KNP Labs
 
Symfony Best Practices
Symfony Best PracticesSymfony Best Practices
Symfony Best Practices
 
Atelier Symfony2- Introduction
Atelier Symfony2- IntroductionAtelier Symfony2- Introduction
Atelier Symfony2- Introduction
 
Présentation de symfony - Human talks aux docks le 8 juillet 2014
Présentation de symfony - Human talks aux docks le 8 juillet 2014Présentation de symfony - Human talks aux docks le 8 juillet 2014
Présentation de symfony - Human talks aux docks le 8 juillet 2014
 
Exposer des services web SOAP et REST avec symfony 1.4 et Zend Framework
Exposer des services web SOAP et REST avec symfony 1.4 et Zend FrameworkExposer des services web SOAP et REST avec symfony 1.4 et Zend Framework
Exposer des services web SOAP et REST avec symfony 1.4 et Zend Framework
 
Cours php & Mysql - 5éme partie
Cours php & Mysql - 5éme partieCours php & Mysql - 5éme partie
Cours php & Mysql - 5éme partie
 
Application web php5 html5 css3 bootstrap
Application web php5 html5 css3 bootstrapApplication web php5 html5 css3 bootstrap
Application web php5 html5 css3 bootstrap
 
Symfony 2 : chapitre 4 - Les services et les formulaires
Symfony 2 : chapitre 4 - Les services et les formulairesSymfony 2 : chapitre 4 - Les services et les formulaires
Symfony 2 : chapitre 4 - Les services et les formulaires
 
Php & My Sql
Php & My SqlPhp & My Sql
Php & My Sql
 
Une application en deux heure - PHP Québec Janvier 2009
Une application en deux heure - PHP Québec Janvier 2009Une application en deux heure - PHP Québec Janvier 2009
Une application en deux heure - PHP Québec Janvier 2009
 
Presentation Symfony
Presentation SymfonyPresentation Symfony
Presentation Symfony
 
Symfony 2 et le Web
Symfony 2 et le WebSymfony 2 et le Web
Symfony 2 et le Web
 
Un exemple élémentaire d'application MVC en PHP
Un exemple élémentaire d'application MVC en PHPUn exemple élémentaire d'application MVC en PHP
Un exemple élémentaire d'application MVC en PHP
 
Cours php & Mysql - 4éme partie
Cours php & Mysql - 4éme partieCours php & Mysql - 4éme partie
Cours php & Mysql - 4éme partie
 
Symfony3 overview
Symfony3 overviewSymfony3 overview
Symfony3 overview
 
Presentation Symfony2
Presentation Symfony2Presentation Symfony2
Presentation Symfony2
 
Presentation du framework symfony
Presentation du framework symfonyPresentation du framework symfony
Presentation du framework symfony
 

En vedette

Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2
Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2
Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2
Sofien Benrhouma
 
Internationaliser un formulaire zend form
Internationaliser un formulaire zend formInternationaliser un formulaire zend form
Internationaliser un formulaire zend form
Geozend
 
Développement d'un moteur de recherche avec Zend Search
Développement d'un moteur de recherche avec Zend SearchDéveloppement d'un moteur de recherche avec Zend Search
Développement d'un moteur de recherche avec Zend Search
Robert Viseur
 
Presentation pfe 2012
Presentation pfe 2012Presentation pfe 2012
Presentation pfe 2012
Sellami Ahmed
 
Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...
Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...
Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...
Arnold Stellio
 

En vedette (9)

Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2
Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2
Rapport Projet De Fin D'étude Développent d'une application web avec Symfony2
 
Internationaliser un formulaire zend form
Internationaliser un formulaire zend formInternationaliser un formulaire zend form
Internationaliser un formulaire zend form
 
Développement d'un moteur de recherche avec Zend Search
Développement d'un moteur de recherche avec Zend SearchDéveloppement d'un moteur de recherche avec Zend Search
Développement d'un moteur de recherche avec Zend Search
 
Presentation pfe 2012
Presentation pfe 2012Presentation pfe 2012
Presentation pfe 2012
 
Conception et réalisation d’un Système d’information des étudiants du départe...
Conception et réalisation d’un Système d’information des étudiants du départe...Conception et réalisation d’un Système d’information des étudiants du départe...
Conception et réalisation d’un Système d’information des étudiants du départe...
 
Presentation orale d’un mémoire
Presentation orale d’un mémoirePresentation orale d’un mémoire
Presentation orale d’un mémoire
 
Les CMS basés sur framework - PHP Tour 2011
Les CMS basés sur framework - PHP Tour 2011Les CMS basés sur framework - PHP Tour 2011
Les CMS basés sur framework - PHP Tour 2011
 
Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...
Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...
Memoire de fin d'études pour le diplome de Chef de Projet Informatique et Rés...
 
Rapport Pfe Application Web e-commerce Symfony2
Rapport Pfe Application Web e-commerce Symfony2Rapport Pfe Application Web e-commerce Symfony2
Rapport Pfe Application Web e-commerce Symfony2
 

Similaire à Soutenance Zend Framework vs Symfony

#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
Atsé François-Xavier KOBON
 
Utiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec SymfonyUtiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec Symfony
Xavier Gorse
 
Rich Desktop Applications
Rich Desktop ApplicationsRich Desktop Applications
Rich Desktop Applications
goldoraf
 
Asp Au Service Des Mv Ps
Asp Au Service Des Mv PsAsp Au Service Des Mv Ps
Asp Au Service Des Mv Ps
Gregory Renard
 
NodeJS for Mobile App
NodeJS for Mobile AppNodeJS for Mobile App
NodeJS for Mobile App
Habib MAALEM
 
Introduction à Zend Framework 2
Introduction à Zend Framework 2Introduction à Zend Framework 2
Introduction à Zend Framework 2
Mickael Perraud
 

Similaire à Soutenance Zend Framework vs Symfony (20)

#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
#J2Code2018 - Mettez du feu à vos applications avec CodeIgniter
 
mini projet
mini projetmini projet
mini projet
 
Web dev open door
Web dev   open doorWeb dev   open door
Web dev open door
 
ZendFramework2 - Présentation
ZendFramework2 - PrésentationZendFramework2 - Présentation
ZendFramework2 - Présentation
 
Node.js, le pavé dans la mare
Node.js, le pavé dans la mareNode.js, le pavé dans la mare
Node.js, le pavé dans la mare
 
SOLID : les principes à l’origine du succès de Symfony et de vos applications
SOLID : les principes à l’origine du succès de Symfony et de vos applicationsSOLID : les principes à l’origine du succès de Symfony et de vos applications
SOLID : les principes à l’origine du succès de Symfony et de vos applications
 
Utiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec SymfonyUtiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec Symfony
 
php2 : formulaire-session-PDO
php2 : formulaire-session-PDOphp2 : formulaire-session-PDO
php2 : formulaire-session-PDO
 
Symfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 PerformantSymfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 Performant
 
Rich Desktop Applications
Rich Desktop ApplicationsRich Desktop Applications
Rich Desktop Applications
 
Introduction à Angularjs
Introduction à AngularjsIntroduction à Angularjs
Introduction à Angularjs
 
Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?
 
Asp Au Service Des Mv Ps
Asp Au Service Des Mv PsAsp Au Service Des Mv Ps
Asp Au Service Des Mv Ps
 
ASP.NET MVC, Web API & KnockoutJS
ASP.NET MVC, Web API & KnockoutJSASP.NET MVC, Web API & KnockoutJS
ASP.NET MVC, Web API & KnockoutJS
 
Architecturez vos applications mobiles avec Azure et Xamarin
Architecturez vos applications mobiles avec Azure et XamarinArchitecturez vos applications mobiles avec Azure et Xamarin
Architecturez vos applications mobiles avec Azure et Xamarin
 
La mobilité dans Drupal
La mobilité dans DrupalLa mobilité dans Drupal
La mobilité dans Drupal
 
Introduction à node.js
Introduction à node.js Introduction à node.js
Introduction à node.js
 
NodeJS for Mobile App
NodeJS for Mobile AppNodeJS for Mobile App
NodeJS for Mobile App
 
2008-09-30 Administration automatisée avec Powershell
2008-09-30 Administration automatisée avec Powershell2008-09-30 Administration automatisée avec Powershell
2008-09-30 Administration automatisée avec Powershell
 
Introduction à Zend Framework 2
Introduction à Zend Framework 2Introduction à Zend Framework 2
Introduction à Zend Framework 2
 

Soutenance Zend Framework vs Symfony

  • 2.
  • 3.
  • 4. Bug tracking : Flyspray
  • 5.
  • 6.
  • 7.
  • 9.
  • 10.
  • 11. Mise en place d’un projet
  • 12. Architecture Zend Framework (INI) Symfony (YAML) apps/frontend/ modules/ index/ actions/ actions.class.php templates/ indexSuccess.php contact/ lib/ model/ application/ controllers/ IndexController.php FooController.php models/ views/ scripts/ index/ index.phtml contact/
  • 13. Configuration Zend Framework (INI) Symfony (YAML) [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH &quot;/../library&quot; bootstrap.path = APPLICATION_PATH &quot;/Bootstrap.php&quot; bootstrap.class = &quot;Bootstrap&quot; appnamespace = &quot;Application&quot; resources.frontController.controllerDirectory = APPLICATION_PATH &quot;/controllers&quot; resources.frontController.params.displayExceptions = 0 resources.view[] = default: http_metas: content-type: text/html metas: title: Titre de mon projet description: Description de mon projet keywords: Mots-clés de mon projet language: fr robots: index, follow stylesheets: [main.css] javascripts: [jquery-1.4.2.min.js] has_layout: true layout: layout class frontendConfiguration extends sfApplicationConfiguration { public function configure() { } } class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initDoctype() { $this->bootstrap('view'); $view = $this->getResource('view'); $view->doctype('XHTML1_STRICT'); } } Bootstrap ProjectConfiguration
  • 14. Gestion des droits sous Zend Framework Définition des droits d’accès : $acl = new Zend_Acl(); $acl->add(new Zend_Acl_Resource('index')); $acl->add(new Zend_Acl_Resource('backend')); $acl->allow('guest', 'index'); $acl->deny('guest', 'backend'); Zend_Registry::set('acl', $acl); class Plugin_Acl extends Zend_Controller_Plugin_Abstract { public function preDispatch(Zend_Controller_Request_Abstract $request) { $acl = Zend_Registry::get('acl'); $auth = Zend_Auth::getInstance(); if(!$auth->hasIdentity()) { $roleName = 'guest'; } else { $roleName = $auth->getIdentity()->role; } $privilegeName = $request->getActionName(); if(!$acl->isAllowed($roleName, null, $privilegeName)){ $request->setControllerName('Error'); $request->setActionName('index'); } } } Création du plug-in de test :
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.