SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
RIA / AJAX
avec ZendX_JQuery
Février 2011 - Zend Technologies
Introduction
Introduction
Votre présentateur

  • Guillaume Ponçon
         Consultant PHP / Zend Framework
         Auteur de "Best practices PHP5" et "Zend Framework"
          (Eyrolles)
         Président de l'AFUP 2007/2008
         Initiateur de PHPTV (www.phptv.fr)
         Intervenant Zend France depuis 2005
         guillaume.poncon@openstates.com
Introduction
Zend Technologies

  • Le leader des outils PHP / ZF
         Zend Studio
         Zend Server / Zend Server Cluster Manager
         Zend Framework
  • Zend en France
         http://www.zend.fr
Introduction
OpenStates

  • Expertise PHP / Zend Framework
         Architectures techniques
         Performances, scalabilité des projets critiques
         Renforcement et actualisation des compétences
         Développements spécialisés
JQuery et Zend Framework
JQuery et Zend Framework
Objectifs de la présentation

 • Découvrir le composant ZendX_JQuery
        Création d'interfaces riches
        Création de liens AJAX simples
        Utilisation de thèmes JQuery UI
        Paramétrage courant de JQuery pour ZF
 • Prérequis
        Bases de Zend Framework
        Aucune connaissance nécessaire en JavaScript
         (ou presque)
Préparations
Préparations
Création d'une application ZF

   • Avec Zend_Tool
    zf   create   project . jquery jquery
    zf   create   controller news
    zf   create   action list news
    zf   create   action form news
Préparations
Création d'une application ZF

 • Nettoyages / mise en mode développement
 • Accès aux composants ZendX (extras/library)
 • Création d'un projet Zend Studio
Préparations
Paramétrage initial de ZendX_JQuery

 • Intégration des helpers JQuery
 • Intégration de JQuery au layout
 • Création d'un layout
Utilisation de JQuery
Utilisation de JQuery
Un lien AJAX simple

 • Préparation du terrain :
         Une page d'accueil news::index
         Une page cible news::list
         Implémentation de la page cible avec Zend_Feed
         Désactivation du layout dans la page cible
 • Création de liens AJAX
         Dans la page d'accueil news::index
         Élément <div> qui va contenir la cible
         Cible du lien : news::list
Utilisation de JQuery
Paramétrage de JQuery UI

 • Pour quoi faire ?
         Attacher un thème pour afficher les composants
         Utiliser en local la bonne version de JQuery
 • Démarche
         Télécharger un thème sur le site de JQuery UI
         Paramétrer JQuery dans le bootstrap
           • Attacher le thème CSS à Jquery (et non à la vue)
           • Attacher les JS à Jquery (et non à la vue)
           • Définir le render mode de jquery correctement
Utilisation de JQuery
Onglets JQuery

 • Principe des onglets :
         Création des contenus (tabPanes)
         Affichage du jeu d'onglets (TabContainer)
         Exemple : affichage des news avec des onglets
Utilisation de JQuery
Date Picker

 • Ajout du helper Date Picker
 • Paramétrage du format de la date
 • Paramétrage de la date par défaut
 • Ajout d'un attribut "onchange"
 • Faire fonctionner un lien AJAX dans une page
     cible
JQuery et Zend Framework
Pour aller plus loin

 • Étude du paramétrage des helpers
 • Création de helpers (pour datagrid par
   exemple)
 • JavaScript évolué avec échanges JSON, XML
 • Utilisation de JQuery dans les formulaires
 • Création d'éléments de formulaires
   dynamiques
Merci !

Mais conteúdo relacionado

Semelhante a AJAX/RIA facile avec ZF et JQuery

Utiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec SymfonyUtiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec SymfonyXavier Gorse
 
Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...
Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...
Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...CERTyou Formation
 
Netvibes atelier 14_octobre_2011_kg
Netvibes atelier 14_octobre_2011_kgNetvibes atelier 14_octobre_2011_kg
Netvibes atelier 14_octobre_2011_kgkumarutil
 
Certification java oracle java se 7 programmer
Certification java oracle   java se 7 programmerCertification java oracle   java se 7 programmer
Certification java oracle java se 7 programmerEGILIA Learning
 
Programmer en html5, css 3 et java script (70 480)
Programmer en html5, css 3 et java script (70 480)Programmer en html5, css 3 et java script (70 480)
Programmer en html5, css 3 et java script (70 480)Chamseddine Ouerhani
 
Etendre le Web avec les Web Components
Etendre le Web avec les Web ComponentsEtendre le Web avec les Web Components
Etendre le Web avec les Web Componentscjolif
 
alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...
alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...
alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...Alphorm
 
Présentation de lancement SAE105
Présentation de lancement SAE105Présentation de lancement SAE105
Présentation de lancement SAE105JeanLucHusson
 
Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)Celinio Fernandes
 
Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)Celinio Fernandes
 
Introduction au développement Web
Introduction au développement Web Introduction au développement Web
Introduction au développement Web Romain Willmann
 
jQuery mobile / PhoneGap : contenus dynamiques client-side
jQuery mobile / PhoneGap : contenus dynamiques client-sidejQuery mobile / PhoneGap : contenus dynamiques client-side
jQuery mobile / PhoneGap : contenus dynamiques client-sidemaru.maru
 
Introduction à Zend Framework
Introduction à Zend FrameworkIntroduction à Zend Framework
Introduction à Zend FrameworkGauthier Delamarre
 
ASI INFORMATIQUE - Cursus de formation XPages Standard
ASI INFORMATIQUE - Cursus de formation XPages StandardASI INFORMATIQUE - Cursus de formation XPages Standard
ASI INFORMATIQUE - Cursus de formation XPages StandardPatrice Vialor
 
Projet de semestre / 3ème partie / partage de contenus multimédia
Projet de semestre / 3ème partie / partage de contenus multimédiaProjet de semestre / 3ème partie / partage de contenus multimédia
Projet de semestre / 3ème partie / partage de contenus multimédiaLaurent Moccozet
 
Solutions Web « prêtes à porter » avec WordPress
Solutions Web « prêtes à porter » avec WordPressSolutions Web « prêtes à porter » avec WordPress
Solutions Web « prêtes à porter » avec WordPressStéphane Plante
 
Alphorm.com Support de la Formation WebDev 21
Alphorm.com Support de la Formation WebDev 21Alphorm.com Support de la Formation WebDev 21
Alphorm.com Support de la Formation WebDev 21Alphorm
 
Nuxt.js et les applications isomorphiques (Universelles/SSR)
Nuxt.js et les applications isomorphiques (Universelles/SSR)Nuxt.js et les applications isomorphiques (Universelles/SSR)
Nuxt.js et les applications isomorphiques (Universelles/SSR)Joffrey LEVEUGLE
 

Semelhante a AJAX/RIA facile avec ZF et JQuery (20)

Utiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec SymfonyUtiliser le Zend Framework avec Symfony
Utiliser le Zend Framework avec Symfony
 
Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...
Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...
Wpl53 g formation-developper-des-applications-pour-ibm-websphere-portal-8-0-a...
 
Netvibes atelier 14_octobre_2011_kg
Netvibes atelier 14_octobre_2011_kgNetvibes atelier 14_octobre_2011_kg
Netvibes atelier 14_octobre_2011_kg
 
Certification java oracle java se 7 programmer
Certification java oracle   java se 7 programmerCertification java oracle   java se 7 programmer
Certification java oracle java se 7 programmer
 
Programmer en html5, css 3 et java script (70 480)
Programmer en html5, css 3 et java script (70 480)Programmer en html5, css 3 et java script (70 480)
Programmer en html5, css 3 et java script (70 480)
 
Etendre le Web avec les Web Components
Etendre le Web avec les Web ComponentsEtendre le Web avec les Web Components
Etendre le Web avec les Web Components
 
alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...
alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...
alphorm.com - Formation Développez des applications Web avec ASP.NET MVC 4(70...
 
Présentation de lancement SAE105
Présentation de lancement SAE105Présentation de lancement SAE105
Présentation de lancement SAE105
 
Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)
 
Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)
 
Introduction au développement Web
Introduction au développement Web Introduction au développement Web
Introduction au développement Web
 
jQuery mobile / PhoneGap : contenus dynamiques client-side
jQuery mobile / PhoneGap : contenus dynamiques client-sidejQuery mobile / PhoneGap : contenus dynamiques client-side
jQuery mobile / PhoneGap : contenus dynamiques client-side
 
Introduction à Zend Framework
Introduction à Zend FrameworkIntroduction à Zend Framework
Introduction à Zend Framework
 
ASI INFORMATIQUE - Cursus de formation XPages Standard
ASI INFORMATIQUE - Cursus de formation XPages StandardASI INFORMATIQUE - Cursus de formation XPages Standard
ASI INFORMATIQUE - Cursus de formation XPages Standard
 
Projet de semestre / 3ème partie / partage de contenus multimédia
Projet de semestre / 3ème partie / partage de contenus multimédiaProjet de semestre / 3ème partie / partage de contenus multimédia
Projet de semestre / 3ème partie / partage de contenus multimédia
 
Solutions Web « prêtes à porter » avec WordPress
Solutions Web « prêtes à porter » avec WordPressSolutions Web « prêtes à porter » avec WordPress
Solutions Web « prêtes à porter » avec WordPress
 
Alphorm.com Support de la Formation WebDev 21
Alphorm.com Support de la Formation WebDev 21Alphorm.com Support de la Formation WebDev 21
Alphorm.com Support de la Formation WebDev 21
 
Initiation à ASP.NET 4.0
Initiation à ASP.NET 4.0Initiation à ASP.NET 4.0
Initiation à ASP.NET 4.0
 
Angular.pdf
Angular.pdfAngular.pdf
Angular.pdf
 
Nuxt.js et les applications isomorphiques (Universelles/SSR)
Nuxt.js et les applications isomorphiques (Universelles/SSR)Nuxt.js et les applications isomorphiques (Universelles/SSR)
Nuxt.js et les applications isomorphiques (Universelles/SSR)
 

Mais de Zend by Rogue Wave Software

Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM iZend by Rogue Wave Software
 
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Zend by Rogue Wave Software
 
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)Zend by Rogue Wave Software
 
Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)Zend by Rogue Wave Software
 

Mais de Zend by Rogue Wave Software (20)

Develop microservices in php
Develop microservices in phpDevelop microservices in php
Develop microservices in php
 
Speed and security for your PHP application
Speed and security for your PHP applicationSpeed and security for your PHP application
Speed and security for your PHP application
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Building web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend ExpressiveBuilding web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend Expressive
 
To PHP 7 and beyond
To PHP 7 and beyondTo PHP 7 and beyond
To PHP 7 and beyond
 
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
 
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
 
Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)
 
Middleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.xMiddleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.x
 
Ongoing management of your PHP 7 application
Ongoing management of your PHP 7 applicationOngoing management of your PHP 7 application
Ongoing management of your PHP 7 application
 
Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7
 
The Docker development template for PHP
The Docker development template for PHPThe Docker development template for PHP
The Docker development template for PHP
 
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
 
Unit testing for project managers
Unit testing for project managersUnit testing for project managers
Unit testing for project managers
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Deploying PHP apps on the cloud
Deploying PHP apps on the cloudDeploying PHP apps on the cloud
Deploying PHP apps on the cloud
 
Data is dead. Long live data!
Data is dead. Long live data! Data is dead. Long live data!
Data is dead. Long live data!
 
Optimizing performance
Optimizing performanceOptimizing performance
Optimizing performance
 
Resolving problems & high availability
Resolving problems & high availabilityResolving problems & high availability
Resolving problems & high availability
 
Developing apps faster
Developing apps fasterDeveloping apps faster
Developing apps faster
 

AJAX/RIA facile avec ZF et JQuery

  • 1. RIA / AJAX avec ZendX_JQuery Février 2011 - Zend Technologies
  • 3. Introduction Votre présentateur • Guillaume Ponçon  Consultant PHP / Zend Framework  Auteur de "Best practices PHP5" et "Zend Framework" (Eyrolles)  Président de l'AFUP 2007/2008  Initiateur de PHPTV (www.phptv.fr)  Intervenant Zend France depuis 2005  guillaume.poncon@openstates.com
  • 4. Introduction Zend Technologies • Le leader des outils PHP / ZF  Zend Studio  Zend Server / Zend Server Cluster Manager  Zend Framework • Zend en France  http://www.zend.fr
  • 5. Introduction OpenStates • Expertise PHP / Zend Framework  Architectures techniques  Performances, scalabilité des projets critiques  Renforcement et actualisation des compétences  Développements spécialisés
  • 6. JQuery et Zend Framework
  • 7. JQuery et Zend Framework Objectifs de la présentation • Découvrir le composant ZendX_JQuery  Création d'interfaces riches  Création de liens AJAX simples  Utilisation de thèmes JQuery UI  Paramétrage courant de JQuery pour ZF • Prérequis  Bases de Zend Framework  Aucune connaissance nécessaire en JavaScript (ou presque)
  • 9. Préparations Création d'une application ZF • Avec Zend_Tool zf create project . jquery jquery zf create controller news zf create action list news zf create action form news
  • 10. Préparations Création d'une application ZF • Nettoyages / mise en mode développement • Accès aux composants ZendX (extras/library) • Création d'un projet Zend Studio
  • 11. Préparations Paramétrage initial de ZendX_JQuery • Intégration des helpers JQuery • Intégration de JQuery au layout • Création d'un layout
  • 13. Utilisation de JQuery Un lien AJAX simple • Préparation du terrain :  Une page d'accueil news::index  Une page cible news::list  Implémentation de la page cible avec Zend_Feed  Désactivation du layout dans la page cible • Création de liens AJAX  Dans la page d'accueil news::index  Élément <div> qui va contenir la cible  Cible du lien : news::list
  • 14. Utilisation de JQuery Paramétrage de JQuery UI • Pour quoi faire ?  Attacher un thème pour afficher les composants  Utiliser en local la bonne version de JQuery • Démarche  Télécharger un thème sur le site de JQuery UI  Paramétrer JQuery dans le bootstrap • Attacher le thème CSS à Jquery (et non à la vue) • Attacher les JS à Jquery (et non à la vue) • Définir le render mode de jquery correctement
  • 15. Utilisation de JQuery Onglets JQuery • Principe des onglets :  Création des contenus (tabPanes)  Affichage du jeu d'onglets (TabContainer)  Exemple : affichage des news avec des onglets
  • 16. Utilisation de JQuery Date Picker • Ajout du helper Date Picker • Paramétrage du format de la date • Paramétrage de la date par défaut • Ajout d'un attribut "onchange" • Faire fonctionner un lien AJAX dans une page cible
  • 17. JQuery et Zend Framework Pour aller plus loin • Étude du paramétrage des helpers • Création de helpers (pour datagrid par exemple) • JavaScript évolué avec échanges JSON, XML • Utilisation de JQuery dans les formulaires • Création d'éléments de formulaires dynamiques