1 / 14

Tapestry - Eclipse Link

Tapestry - Eclipse Link. JEE Approfondi. Tapestry Eclipse Link : Plan. Projet JEE Tapestry Présentation Installation Fonctionnement Avantages Inconvénients Eclipse Link Présentation Installation Fonctionnement Avantages Inconvénients Intégration. Projet JEE.

emile
Download Presentation

Tapestry - Eclipse Link

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. Tapestry - Eclipse Link JEE Approfondi Carine Berrut Germain Després-Reiller Xavier Normand

  2. Tapestry Eclipse Link : Plan • Projet JEE • Tapestry • Présentation • Installation • Fonctionnement • Avantages • Inconvénients • Eclipse Link • Présentation • Installation • Fonctionnement • Avantages • Inconvénients • Intégration Carine Berrut Germain Després-Reiller Xavier Normand

  3. Projet JEE Découverte de 2 frameworks : : création d’une application Web : persistance des données Objectif : construction d’une application web de gestion de contacts en ligne • 1 administrateur • Ajout, suppression, changement mot de passe, affichage des utilisateurs • Utilisateurs • Ajout, suppression, affichage de ses contatcs Carine Berrut Germain Després-Reiller Xavier Normand

  4. Tapestry : Présentation • Créer une application Web • Affichage/structure de la page Web • Orienté Objet • Utilisation de comosants pour lier 2 sortes de fichiers • Affichage/structure = monFichier.tml • Représentation objet (attributs, méthodes) = monFichier.java • Pas de notion JEE • Pas de servlets • Pas de jsp Carine Berrut Germain Després-Reiller Xavier Normand

  5. Tapestry : Installation • Télécharger le app.war à l’adresse suivante : http://tapestry4nonbelievers.googlecode.com/files/app.war • File->Import->War file-> app.war • Modifier web.xml : • attribut context-param: préciser le nom du nœud racine qui contient les différents composants. • Tapestry se charge de faire le lien!!! Carine Berrut Germain Després-Reiller Xavier Normand

  6. Tapestry : Fonctionnement • 2 types de composants • Page, composée de : • un fichier template (monFichier.tml) • un fichier java (monFichier.java) • Composants : • un fichier template (monFichier.tml) • un fichier java (monFichier.java) qui composent une page • Composant layout : encadrer toutes vos pages par un contenu commun Carine Berrut Germain Després-Reiller Xavier Normand

  7. Tapestry : Avantages • Très facile à débugger • Mise à jour dynamique • Gain de temps de production • dont layout : non redondance de blocs communs • Facilité d’apprentissage (documentations, exemples start.java) • Web.xml réduit Carine Berrut Germain Després-Reiller Xavier Normand

  8. Tapestry : Inconvénients • Beaucoup de conventions • Très stricte • Désapprendre des autres frameworks Carine Berrut Germain Després-Reiller Xavier Normand

  9. Eclipse Link : Présentation • Interagir avec la base de données relationnelle • « framework», intégrable à Eclipse, contient : • Mapping Object to XML : transformer les objets Java en xml et inversement • Mobxy.jar (utilisation équivalente à JaXb.jar) • JPA : outil de persistance (ancien TopLink) permettant le mapping pour la transaction des objets en bdd • persistance.jar • Service Data Object : génère un modèle dynamique ou statique à partir d’un xsd • Data Web Services • Enterprise Information System Carine Berrut Germain Després-Reiller Xavier Normand

  10. Eclipse Link : Installation • Télécharger eclipselink.jar à l’adresse suivante : http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/releases/1.1.1/eclipselink-1.1.1.v20090430-r4097.zip • Import eclipselink.jar • Import persistance.jar • Modifier persistance.xml • Ajouter les classes persistantes • Télécharger derby.jar(pour l’utilisation de ce SGBD) • Import derby.jar Carine Berrut Germain Després-Reiller Xavier Normand

  11. Eclipse Link : Fonctionnement • Java <-> BDD : utilisation persistance @Entity (classes) - @colomn(table=«  ») • Derby :requêtes sql pour l’alimenter • XML <-> Objets Java : • Schema.xsd : • commande ‘jxc Schema.xsd’ • création automatique des classes java (Utilisateur.java, Administrateur.java, Contact.java, ObjectFactory.java) • Mobxy : • Marshall(JAXBContext.newInstance()generated) / Unmarchall() • vers/depuis un fichier XML du dossier courant Carine Berrut Germain Després-Reiller Xavier Normand

  12. Eclipse Link : Avantages • Utilisable pour Oracle, Derby, MySql • Derby intégrable à Eclipse • Pas de requête sql (sauf alimentation bdd) • Un package pour plusieurs outils (tout réuni) • Simple d’installation Carine Berrut Germain Després-Reiller Xavier Normand

  13. Eclipse Link : Inconvénients • Très peu de documentations • > utilisation que de 2 outils sur 5! • Package de frameworks (plusieurs syntaxe à connaître) Carine Berrut Germain Després-Reiller Xavier Normand

  14. Tapestry Eclipse Link: Intégration • 1 xml commun = répartir le travail • 2 frameworks difficilement assemblables • Voir projet Carine Berrut Germain Després-Reiller Xavier Normand

More Related