tag:blogger.com,1999:blog-19137013766661395342024-03-12T20:12:01.217-07:00TIC et Technologies d'apprentissageKhalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.comBlogger37125tag:blogger.com,1999:blog-1913701376666139534.post-10442827124505701012021-11-11T22:12:00.001-08:002021-11-11T22:12:04.485-08:00Guide pour élaborer un Projet Logiciel<h2 style="text-align: left;"> Introduction</h2><p style="text-align: justify;">Les étudiants dans les filières IT et spécialement ceux qui suivent un cursus Génie Logiciel (GL) sont toujours appelés à réaliser des projets logiciels que se soit sous la forme de projets tutorés ou dans le cadre des projets logiciels de fin d'année ou de fin d'études. Ces étudiants souvent sont mal accompagnés pour bien dérouler leur projet. C'est dans ce contexte que j'ai essayé de réaliser ce guide qui va permettre aux étudiants des filières IT de savoir mener un projet GL. Ce guide présente les étapes nécessaires ainsi que les outils indispensables pour ce faire. L'ensemble des étapes est présenté de manière linéaire.</p><h2 style="text-align: left;">Présentation du Projet</h2><p style="text-align: justify;">Avant de commencer, l'étudiant doit absolument présenter le contexte et la raison d'être de son projet. Il doit insister à bien clarifier la problématique, la vision, le scope du projet ainsi que le modèle de cycle de vie approprié qu'il souhaite adopter. Si il souhaite adopter un processus agile, alors il doit présenter ce que l'on peut appeler le MVP (Minimum Viable Product) et puis s'inscrire dans le cadre d'un processus itératif et incrémental. Il est par ailleurs indispensable d'utiliser des outils de gestion de projets collaboratifs tels que Trello ou autre.</p><h2 style="text-align: left;">Analyse de l'existant</h2><p style="text-align: justify;">Dans cette partie, l'étudiant est censé identifier les processus métiers les plus importants relevant du Système d'Information sur lequel il travaille. Ici, je recommande d'adopter la notation BPMN qui permet de bien modéliser les processus métiers. Cette étape va nous permettre de bien comprendre le fonctionnement du système et servira aussi pour la définition de l'architecture de l'application ou du logiciel à développer. En plus de la création des modèles BPMN il est judicieux de créer d'autres modèles notamment les diagrammes d'interactions UML. Le choix d'un outil est indispensable, je vous recommande l'outil ModelioSoft qui pourrait servir aussi bien pour l'élaboration des modèles BPMN et des diagrammes UML.</p><h2 style="text-align: justify;">Conception de l'application</h2><p style="text-align: justify;">La phase de conception constitue le début de création de votre logiciel. Vous êtes invités à décrire la nature de votre projet, est ce qu'il s'agit d'une application web, mobile, desktop, cloud ou autre. Vous devez aussi spécifier si c'est une application Full Stack, Front end ou Back end uniquement. C'est à ce niveau là aussi que vous allez définir l'architecture du projet et par ailleurs vous pouvez toujours penser à produire les diagrammes logiques notamment à base des diagrammes de packetage et de déploiement. Le digramme de classe métier est bien sûr indispensable.</p><h2 style="text-align: justify;">Mise en oeuvre</h2><p style="text-align: justify;">Pour cette étape, il est opportun de présenter les outils de travail. Sachez que réaliser un logiciel est une affaire d'équipe, du coup vous devez au préalable définir la constitution de l'équipe avec l'attribution des différents rôles. Il est important de signaler que la documentation est une activité principale, je vous suggère alors de créer un espace dédié à votre projet sur la plateforme Github où vous allez mentionner et créer tous les documents nécessaires à la bonne conduite du projet, notamment les documents : cahier des charges, vision du projet, modèles UML, modèle BPMN, Plan du projet sous Ganttproject ou autre, la répartition des tâches (pensez à Trello).</p><h3 style="text-align: justify;">Outil de Build</h3><div style="text-align: justify;">Il serait important pour la bonne réussite d'un projet logiciel d'opter pour un outil de build tel que Maven ou Gradle.</div><h3 style="text-align: justify;">Qualité du code</h3><div style="text-align: justify;">Un code de qualité est toujours le bienvenu, donc faites de votre mieux pour écrire un code de qualité et d'évaluer ce code en utilisant des outils appropriés tels que SonarQube ou autre.</div><h3 style="text-align: justify;">Gestion des Bugs</h3><div style="text-align: justify;">Même si votre projet est personnel et n'est pas effectué au sein d'une Entreprise, il est de votre responsabilité de penser à intégrer un outil de gestion de bugs tel que Bugzilla ou Mantis.</div><h3 style="text-align: justify;">Test Unitaire</h3><div style="text-align: justify;">En fonction du langage de développement utilisé pour développer le code de votre application, vous devez choisir l'outil de test unitaire approprié. Si vous êtes sous Java, vous allez adopter JUnit comme outil de test et vous devez par conséquent élaborer le plan de test adhoc.</div><h3 style="text-align: justify;">Test fonctionnel</h3><div style="text-align: justify;">La plupart des applications développées nécessitent une phase de tests fonctionnels pour pouvoir éventuellement relever toutes les erreurs potentielles. L'outil que je vous recommande dans ce sens est bien Selenium.</div><h2 style="text-align: justify;">Conclusion</h2><div style="text-align: justify;">En guise de conclusion, sachez que réaliser un Logiciel est un art en soi. Vous devez être à l'écoute en permanence pour être à jour par rapport aux processus, démarches, méthodes et outils à adopter en vue de pouvoir créer rapidement de la valeur pour vos Clients. Le Génie Logiciel ça d'apprend et ça motive. Bon courage à vous tous et restez branchés.</div>Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-989922830452542192019-12-26T09:29:00.004-08:002022-10-03T12:41:14.147-07:00Initiation au framework Spring Boot<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<h2>
<span face="roboto, sans-serif" style="font-size: 10pt; white-space: pre-wrap;">Introduction</span></h2>
<h2>
<span face="roboto, sans-serif" style="font-size: 10pt; font-weight: 400; white-space: pre-wrap;">Dans cet billet nous allons essayer de créer une application Spring Boot en utilisant l’outil Spring Tool Suite (STS) et en passant par un projet Maven. L’idée derrière cette application c’est de voir la pertinence de Spring Boot au niveau de la création rapide d’un projet Spring sans aucune configuration préalable et en même temps de découvrir le concept de Contrôleur au niveau de Spring. Pour ce faire, veuillez suivre les étapes suivantes :</span></h2>
</div>
<ul style="text-align: left;">
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; white-space: pre-wrap;">Sous STS, faire New-> Maven Project.</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; white-space: pre-wrap;">Cochez la case ‘Create a simple project to skip archetype selection” et après appuyer sur ‘Next’.</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; white-space: pre-wrap;">Dans le champ Group id, mettez par exemple ‘org.cours.springboot’ . Au niveau du champ ‘Artifact id’, mettez par exemple ‘cours-springboot’ et dans le champ ‘Name’, mettez par exemple ‘Introduction à Spring Boot’ puis appuyez sur ’Next’.</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; white-space: pre-wrap;">Ouvrir le fichier pom.xml et y ajouter les lignes suivantes : </span></li>
</ul>
<span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">parent</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">></span><br />
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">groupId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">org.springframework.boot</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">groupId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br />
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">artifactId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">spring-boot-starter-parent</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">artifactId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br />
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">version</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">1.4.2.RELEASE</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">version</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br /><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">parent</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br /><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">dependencies</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br />
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">dependency</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br />
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">groupId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">org.springframework.boot</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">groupId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br />
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">artifactId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">spring-boot-starter-web</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">artifactId</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br />
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">dependency</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><br /><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">dependencies</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span></div><div dir="ltr" style="text-align: left;" trbidi="on"><div><div style="text-align: left;"><ul style="text-align: left;"><li><span face=""roboto" , sans-serif" style="font-size: 9pt; white-space: pre-wrap;">Sauvegarder ce fichier et Maven va télécharger ces dependencies pour vous.</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; white-space: pre-wrap;">Si jamais on vous signale une erreur, faites bouton droit sur le projet et choisir Maven -> Update project.</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; white-space: pre-wrap;">Vous voyez que JRE mentionne la version 1.5 ou 1.6. Pour passer à la version 1.8 il suffit d’ajouter ces lignes au fichier pom.xml comme suit: </span></li><li><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">properties</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">></span><div dir="ltr" trbidi="on"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">java.version</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">1.8</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">java.version</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span></div><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"></</span><span face=""roboto" , sans-serif" style="color: #3f7f7f; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">properties</span><span face=""roboto" , sans-serif" style="color: teal; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">></span></div><div><div><ul></ul></div></div></div></li></ul>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
</div>
<ul style="text-align: left;">
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; white-space: pre-wrap;">Sauvegardez le projet en faisant Maven->Update Project et vous voyez que Java SE passe sur 1.8</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; white-space: pre-wrap;">Une fois que Maven est configuré, nous allons créer une application Spring Boot de cette manière.</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; white-space: pre-wrap;">Appuyez avec le bouton droit sur ‘src/main/java’ et choisir nouvelle classe : ‘Cours’ dans le package ‘org.cours’ et cochez ‘public static void main’.</span></li>
<li><span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; white-space: pre-wrap;"> </span><span id="docs-internal-guid-11c74c8f-7fff-be7c-b604-dae1c9e94e00"><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">Nous allons informer Spring Boot que notre application est une application Spring Boot en ajoutant l’annotation @SpringBootApplication et puis dans le ‘main’ nous ajoutons la ligne SpringApplication.run, ayant deux paramètres, qui va s’occuper de créer le conteneur servlets pour pouvoir lancer l’application comme suit :</span></span></li>
</ul>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">package org.cours;</span></div><div style="text-align: left;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span id="docs-internal-guid-1ec8e13a-7fff-086e-4e87-8db7d5906c75"><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">import org.springframework.boot.SpringApplication;</span></span></div>
<span id="docs-internal-guid-1ec8e13a-7fff-086e-4e87-8db7d5906c75">
</span>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span id="docs-internal-guid-1ec8e13a-7fff-086e-4e87-8db7d5906c75"><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">import org.springframework.boot.autoconfigure.SpringBootApplication;</span></span></div>
<span id="docs-internal-guid-1ec8e13a-7fff-086e-4e87-8db7d5906c75">
</span>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span id="docs-internal-guid-1ec8e13a-7fff-086e-4e87-8db7d5906c75"><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">@SpringBootApplication</span></span></div>
<span id="docs-internal-guid-1ec8e13a-7fff-086e-4e87-8db7d5906c75">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">public class </span><span face=""roboto" , sans-serif" style="color: red; font-size: 9pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Cours</span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> {</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">public static void main(String[] args) {</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span> </span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">SpringApplication.run(</span><span face=""roboto" , sans-serif" style="color: red; font-size: 9pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Cours</span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">.class, args);</span></div>
<br /><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span><span> </span><span> </span></span></span><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">}</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><span> </span>}</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span id="docs-internal-guid-d2b3f100-7fff-8a0b-266b-ff58a860d433" style="text-indent: 0px;"></span></div>
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;"><ul>
<li><span style="font-size: 9pt; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-position: normal; vertical-align: baseline;">Sauvegardez et exécuter as ‘Java Application’ et lancez l’url</span><a href="http://loclhost:8080/" style="font-size: 9pt; text-decoration: none; white-space: pre;"><span style="color: black; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="color: #dca10d; font-size: 9pt; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://loclhost:8080</span></a><span style="font-size: 9pt; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-position: normal; vertical-align: baseline;">. En principe vous allez voir un message d’erreur.</span></li>
<li><span style="font-size: 9pt;">Nous allons ajouter un ‘Contrôleur’ qui est une classe Java avec des annotations et qui a des informations par rapport à l’Url à accéder et à la méthode à invoquer lorsqu’on accèdera à cette url.</span></li>
<li><span style="font-size: 9pt;">Nous allons donc créer une classe java ‘HelloController’ dans le package ‘org.cours.controleur’. Pour que cette classe soit considérée comme ‘Contrôleur’ on doit ajouter l’annotation @RestController juste avant sa déclaration. Supposons maintenant que la classe contient une méthode bienvenueSpring() et que nous voulons associer cette méthode avec l’url ‘/hellospring’ alors on doit la faire précédée par l’annotation @RequestMapping(“/hello”) comme suit : </span></li></ul>
</span></span></div>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">package org.cours.controleur;</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import org.springframework.web.bind.annotation.RequestMapping;</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import org.springframework.web.bind.annotation.RestController;</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">@RestController</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">public class HelloControleur {</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span> </span><span> </span><span> </span><span> </span>@RequestMapping("/hellospring")</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span> </span><span> </span><span> </span><span> </span>public String bienvenueSpring() {</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span> </span><span> </span><span> </span><span> </span><span> </span>return "</span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Bienvenue au framework Spring Boot</span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">";</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"><span> </span><span> </span><span> </span><span> </span> </span></span><span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">}</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span face=""roboto" , sans-serif" style="background-color: transparent; color: black; font-size: 9pt; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">}</span></div>
<ul><span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">
<li><span style="font-size: 9pt; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-position: normal; vertical-align: baseline;">Sauvegardez et exécuter as Java Application et lancez l’url</span><a href="http://loclhost:8080/" style="font-size: 9pt; text-decoration: none; white-space: pre;"><span style="color: black; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="color: #dca10d; font-size: 9pt; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://loclhost:8080</span></a><span style="color: #ff9900; font-size: 9pt; vertical-align: baseline;">/hello</span><span style="font-size: 9pt; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-position: normal; vertical-align: baseline;">. En principe vous allez voir s’afficher le message “Bienvenue au framework Spring Boot”.</span></li>
</span></ul>
<div>
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;"><span face="-webkit-standard" id="docs-internal-guid-fcc6ed16-7fff-9e72-93c9-21b8825bc350" style="text-align: start; white-space: normal;"></span><br /></span><h3 style="text-align: left;">Mise à jour du post</h3></div><div>si vous voulez savoir comment utiliser et lancer un projet Spring Boot sous Intellij IDEA, veuillez suivre mon tuto sur Youtube : <a href="https://youtu.be/umLNlVPQsB8">https://youtu.be/umLNlVPQsB8</a> <br />
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">
<span face="-webkit-standard" id="docs-internal-guid-fcc6ed16-7fff-9e72-93c9-21b8825bc350" style="text-align: start; white-space: normal;">
<span style="font-family: "trebuchet ms"; font-size: 13pt; vertical-align: baseline; white-space: pre-wrap;">Conclusion</span></span></span></h2>
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;"><span face="-webkit-standard" id="docs-internal-guid-fcc6ed16-7fff-9e72-93c9-21b8825bc350" style="text-align: start; white-space: normal;">
</span></span>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;"><span face="-webkit-standard" id="docs-internal-guid-fcc6ed16-7fff-9e72-93c9-21b8825bc350" style="text-align: start; white-space: normal;"><span face=""roboto" , sans-serif" style="font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;">Cet atelier est le début de l’histoire pour développer des microservices en utilisant le framework Spring Boot. La plupart des APIs se basent sur cette logique des contrôleurs. Dans cet atelier nous avons vu la méthode GET qui est la méthode implémentée par défaut au niveau de l’annotation @RequestMapping, sinon vous n’avez qu’à implémenter les autres méthodes telles que POST, GET et PUT. Bonne continuation alors.</span></span></span></div>
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;"><span face="-webkit-standard" id="docs-internal-guid-fcc6ed16-7fff-9e72-93c9-21b8825bc350" style="text-align: start; white-space: normal;">
</span></span></div>
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">
</span>
<h2 style="text-align: left;">
<span face=""roboto" , sans-serif" style="font-size: 9pt; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">
</span></h2>
</div>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com1tag:blogger.com,1999:blog-1913701376666139534.post-41872720371835811832019-09-11T13:50:00.001-07:002019-09-11T13:52:00.259-07:00Ateliers de Génie Logiciel 2019-2020<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="letter-spacing: 0.8px;"><span style="color: #38761d;">Ateliers de Génie Logiciel</span></span></h2>
<h3 style="text-align: left;">
<span style="letter-spacing: 0.3px;"><span style="color: blue;">Sommaire de gestion</span></span></h3>
<h4 style="text-align: left;">
<span style="font-kerning: none;"><b><span style="color: #cc0000;">Objectif</span></b></span></h4>
<div style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; margin-bottom: 10px; text-align: justify;">
<span style="-webkit-font-kerning: none;">Les ateliers de génie logiciel constituent un atout majeur pour les élèves ingénieurs ou étudiants inscrits dans des filières IT et qui suivent le cours de Génie Logiciel. Ils correspondent à diverses technologies dans le domaine de l’industrie du logiciel et permettent de compléter la formation par rapport surtout aux aspects pratiques. Cela pourrait représenter la boîte à outils indispensable pour n’importe quel ingénieur de logiciel. Nous tenons à travers ces ateliers à consolider les savoirs en matière de technologie logicielle d’une part et doter chaque élève ou étudiant des outils nécessaires pour bien accomplir ses tâches et savoir choisir la technologie appropriée et adaptée au contexte d’autre part. </span></div>
<h4 style="text-align: left;">
<span style="font-kerning: none;"><b><span style="color: #cc0000;">Buts</span></b></span></h4>
<div style="font-family: "Helvetica Neue Light"; font-size: 10px; font-stretch: normal; line-height: normal;">
<span style="font-kerning: none;">
</span></div>
<div style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; margin-bottom: 10px; text-align: justify;">
<span style="-webkit-font-kerning: none;">Nous visons à cerner toutes les facettes technologiques liées au développement du logiciel selon les normes requises et en respectant les bonnes pratiques en la matière. Ces ateliers sont basés sur un esprit de consolidation et de partage. C’est aussi une opportunité pour les étudiants pour qu’ils puissent développer le sens de l’autonomie, de la responsabilité, de la collaboration et de la communication.</span></div>
<div>
<span style="font-kerning: none;"></span><br />
<h4 style="text-align: left;">
<span style="font-kerning: none;">
<span style="font-kerning: none;"><b><span style="color: #cc0000;">Mise en oeuvre</span></b></span></span></h4>
<span style="font-kerning: none;">
<div style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; margin-bottom: 10px; text-align: justify;">
<span style="-webkit-font-kerning: none;">Les élèves répartis en binôme vont essayer de travailler sur un atelier donné (voir tableau en bas) et préparer un feedback pour leur collègues afin qu’ils puissent eux aussi assimiler l’atelier et se l’approprier correctement. Un atelier est une technologie choisie parmi les grands axes du génie logiciel. Cela va nous permettre de couvrir l’ensemble des technologies et outils nécessaires pour l’accomplissement de n’importe quelle tache nécessaire à la bonne conduite d'un projet Logiciel. C’est ainsi que plusieurs axes seront abordés parmi lesquels on citera : la gestion de la documentation, la gestion de projet, la gestion des versions, la gestion des bugs, les tests unitaires, les tests d’intégration, les métriques, les outils de build, la gestion des configurations, etc.</span></div>
<h4 style="text-align: left;">
<span style="font-kerning: none;"><b><span style="color: #cc0000;">Déroulement de l’atelier</span></b></span></h4>
<div style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; text-align: justify;">
<span style="-webkit-font-kerning: none;">Chaque binôme par rapport à son atelier est censé préparer un livrable qui correspond à :</span></div>
<ul>
<li style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="color: #6d7472;"></span><span style="font-kerning: none;">Une présentation de 15mn qui va présenter l’outil, son intérêt, sa référence web et les ressources nécessaires pour pouvoir l’utiliser correctement.</span></li>
<li style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="color: #6d7472;"></span><span style="font-kerning: none;">Le guide d’installation à dérouler en présentiel.</span></li>
<li style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="color: #6d7472;"></span><span style="font-kerning: none;">Un atelier pratique portant sur l’outil aura lieu et où le binôme va jouer le rôle de l’animateur</span><span style="-webkit-font-kerning: none; font-stretch: normal; line-height: normal;">.</span></li>
</ul>
<div style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; min-height: 12px;">
<span style="font-kerning: none;"></span><br /></div>
<div style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; text-align: justify;">
<span style="-webkit-font-kerning: none;">L’idée est que le binôme en question puisse partager son savoir faire avec ses collègues de classe. Le livrable final (présentation, ressources, code source, Tp, etc) doit être reproduit sur la plateforme GitHub et partagée avec les camarades de classe.</span></div>
<div style="font-family: "Helvetica Neue Light"; font-size: 12px; font-stretch: normal; line-height: normal; text-align: justify;">
<span style="font-kerning: none;"><br /></span></div>
<h3 style="text-align: left;">
<span style="letter-spacing: 0.3px;"><span style="color: blue;">Liste des Ateliers</span></span></h3>
<h4 style="text-align: left;">
<span style="font-kerning: none;"><b><span style="color: #cc0000;">Présentation</span></b></span></h4>
<div style="font-family: "Helvetica Neue Light"; font-size: 12px; font-stretch: normal; line-height: normal; text-align: justify;">
<span style="font-kerning: none;">
</span></div>
<div style="font-family: "Helvetica Neue Light"; font-stretch: normal; line-height: normal; text-align: justify;">
<span style="-webkit-font-kerning: none;">Les ateliers choisis correspondent à des technologies Open Source, étant une philosophie basée sur le partage. En effet un logiciel Open Source est un logiciel qui dispose de quatre libertés à savoir : la liberté d’usage, la liberté de modification, la liberté du partage et la liberté du partage de ce qui a été modifié. Ceci est une occasion pour initier les étudiants à ce mouvement international dont le but est de promouvoir l’usage des logiciels dits Open Source auprès des institutions, des organisations, de la société et de la communauté. Ci-après on présente la liste des ateliers de génie logiciel.</span></div>
<div style="font-family: "Helvetica Neue Light"; font-size: 12px; font-stretch: normal; line-height: normal; text-align: justify;">
<span style="font-kerning: none;"><br /></span></div>
<div style="font-family: "Helvetica Neue Light"; font-size: 12px; font-stretch: normal; line-height: normal; text-align: justify;">
<span style="font-kerning: none;"></span></div>
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse; color: black;"><tbody>
<tr><td style="background-color: #2b6991; border-color: rgb(128, 127, 127) rgb(27, 61, 83) rgb(0, 0, 0) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 361px;" valign="top"><span style="color: white; font-family: "helvetica neue"; font-stretch: normal; line-height: normal;"><b>Nom</b></span></td><td style="background-color: #2b6991; border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(0, 0, 0) rgb(27, 61, 83); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 96px;" valign="top"><span style="color: white; font-family: "helvetica neue"; font-stretch: normal; line-height: normal;"><b>Catégorie</b></span></td></tr>
<tr><td style="border-color: rgb(0, 0, 0) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Docbook</span></td><td style="border-color: rgb(0, 0, 0) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Documentation</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Latex</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Documentation</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Ant</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Build</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Maven</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Build</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">DotProject</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion Projet</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">GanttProject</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion Projet</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Cvs</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de versions</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Svn</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de versions</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Git</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de versions</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">GitLab</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de projet</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 23px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">GitHub</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 23px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Hébergement de projets</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Bitbucket</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de versions</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Cocomo & metrics</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Métrique</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">SonarQube</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Qualité du code</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Bugzilla</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de bugs</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Selenuim</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Tests fonctionnels</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Jmeter</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Tests de performance</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Junit</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Tests unitaires</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Jenkins</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 11px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Tests d’intégration</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Docker</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Container</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Tuleap</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de projet</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 23px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Intelligid</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 23px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion électronique de documents GED</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 24px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Chef</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 24px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de configuration</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 23px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Puppet</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 23px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Gestion de configuration</span></td></tr>
<tr><td style="border-color: rgb(128, 127, 127) rgb(127, 128, 127) rgb(128, 127, 127) rgb(128, 127, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 361px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Vagrant</span></td><td style="border-color: rgb(128, 127, 127) rgb(128, 127, 127) rgb(128, 127, 127) rgb(127, 128, 127); border-style: solid; border-width: 1px; height: 12px; padding: 4px; width: 96px;" valign="top"><span style="color: black; font-family: "helvetica neue light"; font-stretch: normal; line-height: normal;">Environnement Virtuel</span></td></tr>
</tbody></table>
<div>
<span style="font-kerning: none;"><br /></span></div>
</span></div>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-25674761056624289782018-01-13T13:22:00.002-08:002018-02-03T11:40:49.582-08:00Atelier JSF Facelets et Internationalisation I18n <div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: blue;">Introduction</span></h2>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-y7iFkQov1Jwmq42xVkB8I0TBwotlHy0B_9PekCu6lk0Mj7zQhGTfQmpsV3PdD-iY7AAcP1c2YYDx0QWpHozH7V_ed9rJqizqLfaQyaUfN-yALC01uxxgSFlBmlaNqa6A78B4pBCIqYQ/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+18.24.08.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Le perroquet" border="0" data-original-height="126" data-original-width="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-y7iFkQov1Jwmq42xVkB8I0TBwotlHy0B_9PekCu6lk0Mj7zQhGTfQmpsV3PdD-iY7AAcP1c2YYDx0QWpHozH7V_ed9rJqizqLfaQyaUfN-yALC01uxxgSFlBmlaNqa6A78B4pBCIqYQ/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+18.24.08.png" title="Le perroquet" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Le Portail des Oiseaux</td></tr>
</tbody></table>
<br />
<div style="text-align: justify;">
Dans cet atelier nous allons aborder deux thèmes importants du Framework JSF qui sont la technologie des Facelets et celle de l'Internationalisation connu par I18n (entre le caractère 'I' et le caractère 'n' on trouve 18 caractères). Il faut savoir que JSF au niveau de la version 1 utilisait JSP comme technologie de présentation, il se trouve que JSP et JSF ont deux cycles de vie différents, c'est pourquoi on a pensé à produire une nouvelle technologie de présentation qui soit totalement compatible avec JSF, il s'agit bien de la technologie des Facelets et ce depuis la version 2.0. L'internationalisation quant à elle s'avère être très importante aussi surtout lorsque l'objectif d'une application web est de prévoir plusieurs langues différentes pour la clientèle. L'idée est de ne pas produire une page par langue, mais plutôt traiter la chose de manière intelligente, c'est-à-dire le même contenu mais avec des affichages de langues différentes et ce moyennant un seul clic on pourrait passer d'une langue d'affichage vers une autre.</div>
<div style="text-align: justify;">
Pour l'objet de cet atelier, nous allons considérer un portail de découverte d'Oiseaux. Nous commençons par réaliser la Template du site et après nous allons aborder l'internationalisation. Le site, traité totalement par JSF, va avoir l'architecture suivante :</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="height: 209px; margin-left: auto; margin-right: auto; text-align: center; width: 448px;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLI9OftgJetLbqg6WRZBHgvi28i7oc_hGV8vDkJagjS4DtDGUQ9YVEtm6dATRqWz5MIuXyuJ1JeIEDrMSOOCy6QGjV-kTFNpdYXznrED0TlzBTqQC7cIai0GGiILrKPveiM4o2i5g16qA/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+18.23.21.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Architecture du projet" border="0" data-original-height="520" data-original-width="966" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLI9OftgJetLbqg6WRZBHgvi28i7oc_hGV8vDkJagjS4DtDGUQ9YVEtm6dATRqWz5MIuXyuJ1JeIEDrMSOOCy6QGjV-kTFNpdYXznrED0TlzBTqQC7cIai0GGiILrKPveiM4o2i5g16qA/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+18.23.21.png" title="Architecture du projet" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Architecture du projet</b></td></tr>
</tbody></table>
<h3 style="text-align: left;">
<span style="color: #38761d;">Template du site</span></h3>
<div style="text-align: justify;">
La Template d'un site représente en général une sorte de page gabarit que toutes les autres pages du site vont hériter ou personnaliser. Nous allons considérer pour ce projet une Template qui va être constituée de deux zones uniquement, une zone 'main' et une zone 'navigation'. La Template se présente ainsi :</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h4 style="text-align: left;">
<span style="color: blue;">Template.xhtml</span> </h4>
<html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xmlns:ui="<a href="http://java.sun.com/jsf/facelets">http://java.sun.com/jsf/facelets</a>" xmlns:f="<a href="http://java.sun.com/jsf/core">http://java.sun.com/jsf/core</a>" xmlns:h="<a href="http://java.sun.com/jsf/html">http://java.sun.com/jsf/html</a>"> <br />
<head><br />
<title>Le Joyeux Repertoire des Oiseaux</title><br />
<style type="text/css"><br />
<b>.</b>box {<br />
float: right; <br />
width: 50%; <br />
border: red dotted 1px; <br />
padding: 5px <br />
}<br />
</style> <br />
</head> <br />
<body> <br />
<h:form> <br />
<h1>Le Royaume heureux des Oiseaux</h1> <br />
<div class="box"> <br />
<ui:insert name="navigation"/> <br />
</div> <br />
<ui:insert name="main"> <br />
Bienvenue au joyeux royaume des oiseaux <br />
</ui:insert> <br />
</h:form> <br />
</body> <br />
</html><br />
<br />
<div style="text-align: justify;">
Nous allons maintenant créer la page jsf "menu.xhtml" qui va contenir une sorte de liens vers les pages respectives de chaque oiseau. Cette page se présente comme suit :</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h4 style="text-align: left;">
<span style="color: blue;">Menu.xhtml</span></h4>
<html xmlns="http://www.w3.org/1999/xhtml"<br />
xmlns:ui="http://java.sun.com/jsf/facelets"<br />
xmlns:h="http://java.sun.com/jsf/html"<br />
xmlns:f="http://java.sun.com/jsf/core"><br />
<body><br />
Ceci et toute chose avant va être ignorée<br />
<ui:composition><br />
<h3>Contenu du portail</h3><br />
<hr/><br />
<h:panelGrid columns="1"><br />
<h:commandLink value="Home" action="index" /><br />
<h:commandLink value="Perroquet" action="perroquet" /><br />
<h:commandLink value="Aigle" action="aigle" /><br />
<h:commandLink value="Corbeau" action="corbeau" /><br />
</h:panelGrid><br />
</ui:composition><br />
Ceci et toute chose après va être ignorée<br />
</body><br />
</html><br />
<br />
<div style="text-align: justify;">
Maintenant nous créons la page "index.xhtml" qui va être définie sur la base de la page "template.xhtml" puisque cette dernière constitue la template du site. La page "index.xhtml" va être définie comme suit :</div>
<h4 style="text-align: left;">
<span style="color: blue;">Index.xhtml</span> </h4>
<html xmlns="http://www.w3.org/1999/xhtml"<br />
xmlns:ui="http://java.sun.com/jsf/facelets"<br />
xmlns:h="http://java.sun.com/jsf/html"><br />
<body><br />
Ceci et toute chose avant va être ignorée<br />
<ui:composition template="template.xhtml"><br />
<ui:define name="navigation"><br />
<ui:include src="menu.xhtml"/><br />
</ui:define><br />
</ui:composition><br />
Ceci et toute chose après va être ignorée<br />
</body><br />
<br />
<div style="text-align: justify;">
Comme on le remarque ci dessus, la page 'index' moyennant la balise <ui:composition> va définir sa template qui est fournie au niveau de son attribut 'template'. Puisque la template "template.xhtml" possède deux zones, alors la page 'index' pourra redéfinir l'une ou les deux zones en même temps ou bien les utiliser telles qu'elles sont définies dans la page 'template'. Dans notre cas, la page 'index' a redéfini la zone 'navigation' en utilisant la balise <ui:define> et à l'intérieur de cette balise, elle a fait appel à la balise <ui:include> pour intégrer la page "menu.xhtml" définie en haut.</div>
<div style="text-align: justify;">
Dans ce qui suit, nous allons procéder à la création de trois pages 'jsf' reliées respectivement aux trois oiseaux 'perroquet, 'aigle' et 'corbeau' qui apparaissent sur la page "menu.xhtml".</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h4 style="text-align: left;">
<span style="color: blue;">Perroquet.xhtml</span></h4>
<html xmlns="http://www.w3.org/1999/xhtml"<br />
xmlns:ui="http://java.sun.com/jsf/facelets"<br />
xmlns:h="http://java.sun.com/jsf/html"<br />
xmlns:f="http://java.sun.com/jsf/core"><br />
<body><br />
<ui:composition template="template.xhtml"><br />
<ui:define name="navigation"><br />
<ui:include src="menu.xhtml"/><br />
</ui:define><br />
<ui:define name="main"><br />
<h1>Le perroquet</h1><br />
<p>Les perroquets sont des oiseaux ; il en existe 350 espèces différentes, connues sous des noms variés, tels que ara, perruche, cacatoès... Ce sont des oiseaux souvent très colorés. Ils ont un gros bec crochu, qui leur sert à manger des graines, des fruits, et des noix. Certains perroquets sont également capables d'imiter la voix humaine, et de répéter des mots, ou des sons. Certains, comme le gris du Gabon, parlent même très bien. Les perroquets ont la langue noire. Ils ont deux pattes qui sont terminées par des griffes.<br />
Les perroquets vivent dans les régions tropicales, principalement en Amérique, Afrique et Océanie. <br />
</p><br />
<h:graphicImage height="100" width="100" library="default" name="images/perroquet.jpg"/><br />
</ui:define><br />
</ui:composition><br />
</body><br />
</html><br />
<br />
<div style="text-align: justify;">
Nous remarquons que la page "perroquet.xhtml" est définie sur la base de la template "template.xhtml", et donc ici elle redéfinit la zone 'navigation' comme ça l'a était fait au niveau de la page 'index' et en plus elle redéfinit la zone 'main' à sa guise où elle va être constituée d'un paragraphe et d'une image moyennant la balise <h:graphicImage>, cette dernière consiste à charger l'image du perroquet depuis le sous dossier 'images' du dossier 'resources' (voir Architecture du projet ci haut). L'exécution de la page "index.xhtml" donnera la vue suivante :</div>
<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7CLldzVOXPuiCMMzPyO8G0lHZ2DC1MDOhXt-QegzvJcb9WdWfzG2AUpubVChbxeofNDoNCWszRexoyuZnRsaYsWAwgXDaiQuw3Y0Otk4xYn-2EzAjrWpI03SV6cZMbpzLriOn35zoEzA/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+20.42.33.png" style="margin-left: auto; margin-right: auto;"><img alt="La page index.xhtml" border="0" data-original-height="296" data-original-width="1600" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7CLldzVOXPuiCMMzPyO8G0lHZ2DC1MDOhXt-QegzvJcb9WdWfzG2AUpubVChbxeofNDoNCWszRexoyuZnRsaYsWAwgXDaiQuw3Y0Otk4xYn-2EzAjrWpI03SV6cZMbpzLriOn35zoEzA/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+20.42.33.png" title="La page index.xhtml" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>La page index.xhtml</b></td></tr>
</tbody></table>
<br />
<br />
<div style="text-align: justify;">
La page "index.xhtml" étant chargée, on va pouvoir appuyer sur le lien
'perroquet' pour pouvoir charger la page "perroquet.xhtml" comme suit :</div>
<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAY9umJwfUP-LauIbrRUxgghDMRMxGdphe7RJTg1uW8J8pzD0GOicZkTuVN781wCGZymzTxZakYtzu04EDPfxGE3KPz4zGbOWepN2ORN4eMAFK7vgP8AV6Gk8LEAqbIC8mQuF9UUT6t5s/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+20.38.29.png" style="margin-left: auto; margin-right: auto;"><img alt="La page perroquet.xhtml" border="0" data-original-height="376" data-original-width="1600" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAY9umJwfUP-LauIbrRUxgghDMRMxGdphe7RJTg1uW8J8pzD0GOicZkTuVN781wCGZymzTxZakYtzu04EDPfxGE3KPz4zGbOWepN2ORN4eMAFK7vgP8AV6Gk8LEAqbIC8mQuF9UUT6t5s/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+20.38.29.png" title="La page perroquet.xhtml" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>La page perroquet.xhtml</b></td></tr>
</tbody></table>
<br />
<br />
<div style="text-align: justify;">
Maintenant que la page 'perroquet' est crée, nous allons de la même façon créer les deux pages "aigle.xhtml" et "corbeau.xhtml" comme suit :</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h4 style="text-align: left;">
<span style="color: blue;">Aigle.xhtml</span></h4>
<html xmlns="http://www.w3.org/1999/xhtml"<br />
xmlns:ui="http://java.sun.com/jsf/facelets"<br />
xmlns:h="http://java.sun.com/jsf/html"<br />
xmlns:f="http://java.sun.com/jsf/core"><br />
<body><br />
<ui:composition template="template.xhtml"><br />
<ui:define name="navigation"><br />
<ui:include src="menu.xhtml"/><br />
</ui:define><br />
<ui:define name="main"><br />
<h1>L'Aigle</h1><br />
<p>L'aigle est le nom de plusieurs espèces d'oiseaux rapaces. Les "vrais" aigles sont les oiseaux qui font partie du genre Aquila. Mais plusieurs de leurs cousins, appartenant à d'autres genres, sont également appelés "aigles" en français. Une des espèces les plus connues est l'aigle royal. Les aigles mangent des petits animaux comme des lapins, des marmottes. Parfois aussi des animaux morts, pouvant être laissés par d’autres prédateurs. Ils sont donc carnivores. <br />
</p><br />
<h:graphicImage height="100" width="100" library="default" name="images/aigle.jpg"/><br />
</ui:define><br />
</ui:composition><br />
</body><br />
</html><br />
<div style="text-align: justify;">
Lorsqu'on lance la page 'index' et après on sélectionne dans le menu le lien 'Aigle' la page suivante va s'afficher :</div>
<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmUJnAHubDCsQQfvTyDsMr21vj1NH_EvGkmH7sm3bRBGNOA4iSY9V_fSQ58JuB0cvpauxTbhIOBTPrHyTabpM5gUzT_IKDK5EXGEKTIqYkgKepiEPZPUdFB9lUHTUbNt3y_hNhldjZErQ/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+21.11.40.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="La page aigle.xhtml" border="0" data-original-height="316" data-original-width="1600" height="126" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmUJnAHubDCsQQfvTyDsMr21vj1NH_EvGkmH7sm3bRBGNOA4iSY9V_fSQ58JuB0cvpauxTbhIOBTPrHyTabpM5gUzT_IKDK5EXGEKTIqYkgKepiEPZPUdFB9lUHTUbNt3y_hNhldjZErQ/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+21.11.40.png" title="La page aigle.xhtml" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>La page aigle.xhtml</b></td></tr>
</tbody></table>
<br />
<h4 style="text-align: left;">
<span style="color: blue;">Corbeau.xhtml</span></h4>
<html xmlns="http://www.w3.org/1999/xhtml"<br />
xmlns:ui="http://java.sun.com/jsf/facelets"<br />
xmlns:h="http://java.sun.com/jsf/html"<br />
xmlns:f="http://java.sun.com/jsf/core"><br />
<body><br />
<ui:composition template="template.xhtml"><br />
<ui:define name="navigation"><br />
<ui:include src="menu.xhtml"/><br />
</ui:define><br />
<ui:define name="main"><br />
<h1>Le Corbeau</h1><br />
<p><br />
Le corbeau est un oiseau réputé pour sa grande longévité (qui pourrait
dépasser trente ans), son intelligence et son organisation sociale qui
semblent très supérieures à la moyenne des oiseaux. Il n'a quasiment
jamais été chassé, sauf dans les périodes de grande famine, sa chair
étant considérée comme immangeable, sauf après une très longue cuisson.<br />
</p><br />
<h:graphicImage height="100" width="100" library="default" name="images/corbeau.jpg"/><br />
</ui:define><br />
</ui:composition><br />
</body><br />
</html><br />
<div style="text-align: justify;">
Lorsqu'on exécute la page "corbeau.xhtml" nous allons ainsi pouvoir afficher le rendu suivant :</div>
<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdPjiR46WBpjaXGo66fvjDNbvbnjbh9cMcU0ZE78rGPfb13VrlKo_sBATOFUpEXmEQoPU9WyedcOfK0xRzR6uEyYzgj__mZE1-pFSVGbUIhmm28KXugA6l9lUuRrLh-Wx2x4esaEak480/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+21.13.51.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="La page corbeau.xhtml" border="0" data-original-height="360" data-original-width="1600" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdPjiR46WBpjaXGo66fvjDNbvbnjbh9cMcU0ZE78rGPfb13VrlKo_sBATOFUpEXmEQoPU9WyedcOfK0xRzR6uEyYzgj__mZE1-pFSVGbUIhmm28KXugA6l9lUuRrLh-Wx2x4esaEak480/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-13+a%25CC%2580+21.13.51.png" title="La page corbeau.xhtml" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>La page corbeau.xhtml</b></td></tr>
</tbody></table>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h2 style="text-align: left;">
<span style="color: blue;">Internationalisation (I18n)</span></h2>
<div style="text-align: justify;">
La partie Internationalisation appelée aussi <a href="https://fr.wikipedia.org/wiki/Internationalisation_(informatique)" target="_blank">I18n</a> (il y a 18 caractères entre la première lettre I du nom et la dernière lettre n), consiste à produire le contenu du site en plusieurs langues. Toutes les parties et rubriques du site restent identiques, la seule chose qui change étant la langue. Bien sûr, on n'est pas censé reproduire un contenu par langues, le travail doit être fait de manière intelligente. Le framework JSF présente une démarche très pertinente pour adopter l'internationalisation dans son projet que nous allons expliciter ci dessous.</div>
<h3 style="text-align: left;">
<span style="color: #38761d;">Démarche I18n sous JSF</span></h3>
<div style="text-align: justify;">
Pour commencer, nous allons créer un fichier propriétés par langue avec la seule contrainte que les noms de ces fichiers disposent d'une même base. Par exemple, supposons que nous voulons produire pour deux langues "arabe" et "français", alors dans ce cas nous allons créer deux fichiers de propriétés ayant respectivement les noms "<b>messages</b>_ar.properties" et "<b>messages</b>_fr.properties". Comme on le voit, les deux noms de fichiers se partagent la même base qui est dans ce cas "<b>massages</b>".</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h4 style="text-align: left;">
<span style="color: blue;">Création des fichiers de propriété sous NetBeans</span></h4>
Sous NetBeans, nous allons appuyer avec le bouton droit sur le nom du projet et nous allons "New > Other" comme ci dessous :<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga3V7sxsVC0YayrjiTsWlRMk-YQBiBtA2zd5XL_cfoi_iMMvnALItmg8VgL1qUauyofhZqSzQE7IMgW5DtSaX27ahnS2Wy-JFjadAQxQM0Hh_KJaR-aeUv5-fqT4h9Kk09oqd4euV18I8/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+11.32.45.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Création Fichier de propriétés, step 1" border="0" data-original-height="580" data-original-width="659" height="561" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga3V7sxsVC0YayrjiTsWlRMk-YQBiBtA2zd5XL_cfoi_iMMvnALItmg8VgL1qUauyofhZqSzQE7IMgW5DtSaX27ahnS2Wy-JFjadAQxQM0Hh_KJaR-aeUv5-fqT4h9Kk09oqd4euV18I8/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+11.32.45.png" title="Création Fichier de propriétés, step 1" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Création Fichier de propriétés, step 1</b></td></tr>
</tbody></table>
<br />
Nous allons après choisir la catégorie "Other" et le type de fichier "Properties File" comme ci dessous :<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2o7TLY3gYAxiZ4oH7oUF2-uOYto2evrKz4czsFSHmz0eWGw_BNyyorqTxAvcQ2wW5JhFk1jxUKpDVAJOmiocJY72kmCg0DyHH5T0beOimi1tYhmySDwGcTS-aiZdsAtp7ROt6thRe-Ps/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+11.44.49.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Création Fichier de propriétés, step 2" border="0" data-original-height="509" data-original-width="718" height="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2o7TLY3gYAxiZ4oH7oUF2-uOYto2evrKz4czsFSHmz0eWGw_BNyyorqTxAvcQ2wW5JhFk1jxUKpDVAJOmiocJY72kmCg0DyHH5T0beOimi1tYhmySDwGcTS-aiZdsAtp7ROt6thRe-Ps/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+11.44.49.png" title="Création Fichier de propriétés, step 2" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Création Fichier de propriétés, step 2</b></td></tr>
</tbody></table>
<div style="text-align: justify;">
Après nous allons donner un nom au fichier, par exemple "message_ar" pour notre cas pour la langue 'arabe', nous sélectionnons le dossier où on va ranger le fichier et nous validons en appuyant sur le bouton 'Finish' :</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwT4PDs7K_zwxSCTo0JjhLFsa3-YEyPFeGNCtckoeVPYPl1uElDYQDQORWKvYrERTdqQecL9PEfF-wp3lyZ9T3kFIQ3QzhgiYCcyYNULIWnOTY4ZYu0bfo6GWWg6Jg7PRxt6NsrCSsvs4/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+11.49.13.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Création Fichier de propriétés, step 3" border="0" data-original-height="501" data-original-width="717" height="446" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwT4PDs7K_zwxSCTo0JjhLFsa3-YEyPFeGNCtckoeVPYPl1uElDYQDQORWKvYrERTdqQecL9PEfF-wp3lyZ9T3kFIQ3QzhgiYCcyYNULIWnOTY4ZYu0bfo6GWWg6Jg7PRxt6NsrCSsvs4/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+11.49.13.png" title="Création Fichier de propriétés, step 3" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Création Fichier de propriétés, step 3</b></td></tr>
</tbody></table>
<div style="text-align: justify;">
Une fois le fichier de propriétés 'message_ar.properties' crée, nous allons l'alimenter comme suit une fois ouvert :</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtXDawjs6J38Albx6hJxKC6ii1eImifX18MrE1eu5OJgmawfN98UJWIrGEO5zVXNuGS_kKY6fGC3ZK8b17fRjaS1SbuOhMgmbjvptyENZTP0OQ7DY94kT6FWGBvFk3SP2R7862K0Iry50/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.04.02.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Création Fichier de propriétés, step 4" border="0" data-original-height="330" data-original-width="741" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtXDawjs6J38Albx6hJxKC6ii1eImifX18MrE1eu5OJgmawfN98UJWIrGEO5zVXNuGS_kKY6fGC3ZK8b17fRjaS1SbuOhMgmbjvptyENZTP0OQ7DY94kT6FWGBvFk3SP2R7862K0Iry50/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.04.02.png" title="Création Fichier de propriétés, step 4" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Création Fichier de propriétés, step 4</b></td></tr>
</tbody></table>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Comme on le voit, il est tout d'abord important de connaître les parties sujettes à l'internationalisation, c'est-à-dire là où on va basculer d'une langue à l'autre. Par exemple pour notre cas, nous avons décidé de travailler sur quatre parties : bienvenue, title, animal et description. Ce sont ces quatre parties qui vont être communes à toutes les pages qui vont voir leurs rubriques changer de langue, elles vont être considérées comme des variables d'un programme qui vont changer de contenu au niveau de l'exécution de l'application.</div>
<div style="text-align: justify;">
Nous allons répéter le même processus pour tous les fichiers de propriétés à considérer, dans notre cas on a choisi de travailler uniquement sur deux langues 'arabe' et 'français', donc nous créons le fichier de propriétés 'message_fr.properties' qui va avoir le contenu suivant :</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Q1iHrKFN01F8EvkSOlsb6d7ljSM2ppj5kxsinZW6n_qQtX7_-ifPfNXaToNHhTvtYdWuuFeEU2VplL6kK8OmHR2LlaC_ePXcSydV28Hbv6O5NTdVHim-45KWwvMcBq58HcF3aTpy0Ao/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.13.22.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Création Fichier de propriétés, step 5" border="0" data-original-height="184" data-original-width="631" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Q1iHrKFN01F8EvkSOlsb6d7ljSM2ppj5kxsinZW6n_qQtX7_-ifPfNXaToNHhTvtYdWuuFeEU2VplL6kK8OmHR2LlaC_ePXcSydV28Hbv6O5NTdVHim-45KWwvMcBq58HcF3aTpy0Ao/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.13.22.png" title="Création Fichier de propriétés, step 5" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Création Fichier de propriétés, step 5</b></td></tr>
</tbody></table>
<div style="text-align: justify;">
<br /></div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h3 style="text-align: justify;">
<span style="color: blue;">Création du fichier de configuration</span></h3>
<div style="text-align: justify;">
Nous allons maintenant procéder à la création du fichier de configuration où on va créer la variable d'environnement qui va jouer le rôle d'adaptateur de la langue choisie. Pour ce faire, nous allons suivre les étapes suivantes :</div>
<ul style="text-align: left;">
<li>Tout d'abord, on clique bouton droit sur le nom du projet et on choisit 'New > Other'</li>
<li>Ensuite, nous allons sélectionner la catégorie 'JavaServer Faces' puis on choisit au niveau de la rubrique 'File Types' le type 'JSF Faces Configuration' comme ci dessous :</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiefsefmbEPU9nKqYIZP8pYIGh32O5ISP-2xRIdnVsk6hrAc2I0CJHpFeqS7QRlrGpFOaeRiPwgSUph3mqjzs3zIFRw7NF_Wj8TjgJRUDcN1QdzD25dHjQZJwE2RUL8mluS4YJFiLzJmck/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.16.02.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" data-original-height="507" data-original-width="720" height="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiefsefmbEPU9nKqYIZP8pYIGh32O5ISP-2xRIdnVsk6hrAc2I0CJHpFeqS7QRlrGpFOaeRiPwgSUph3mqjzs3zIFRw7NF_Wj8TjgJRUDcN1QdzD25dHjQZJwE2RUL8mluS4YJFiLzJmck/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.16.02.png" title="Création Fichier de Configuration" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="color: black;"><b>Création Fichier de Configuration, step 1</b></span></td></tr>
</tbody></table>
<div style="text-align: justify;">
On garde le même nom proposé et on valide. Après on ouvre le fichier de configuration qu'on vient de créer et on le modifie comme suit :</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2iWvkCQNK8ds0WYi2yIYsb6z_dT9HH5yUbWtswtC1XxX3y9rsvl4QnsEdVZCn2VPZF_-_kBVxesIkEd757SbOt6VxngGIkzJVqhG2FKrKBNN40286iWAbfrMPdf3L-YiRRxaWgBAneNk/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.33.30.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Création Fichier de Configuration, step 2" border="0" data-original-height="430" data-original-width="1440" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2iWvkCQNK8ds0WYi2yIYsb6z_dT9HH5yUbWtswtC1XxX3y9rsvl4QnsEdVZCn2VPZF_-_kBVxesIkEd757SbOt6VxngGIkzJVqhG2FKrKBNN40286iWAbfrMPdf3L-YiRRxaWgBAneNk/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.33.30.png" title="Création Fichier de Configuration, step 2" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="color: black;"><b>Création Fichier de Configuration, step 2</b></span></td></tr>
</tbody></table>
<br />
Sur le fichier de configuration, nous créons la 'resource-bundle' qui va définir deux propriétés à savoir la 'base-name' et le 'var'. La 'base-name' définit le nom de base que nous avons introduit ci-haut, c'est la partie commune de tous les noms des fichiers de propriétés associés aux différentes langues. Le 'var' définit la variable 'msgs' qui va pointer vers les quatre descripteurs des fichiers de propriétés définis ci-haut à savoir : bienvenue, title, animal et description.<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h3 style="text-align: left;">
<span style="color: blue;">Préparation des pages JSF</span></h3>
<div style="text-align: justify;">
Maintenant nous allons modifier les pages de notre projet pour qu'elles puissent intégrer l'internationalisation. Pour notre cas, nous allons uniquement préparer les deux pages 'template' et 'perroquet' de cette manière : </div>
<div style="text-align: justify;">
La page 'perroquet.xhtml'</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEFBwRhwGRff8tpQAgvoj5CaXu8hQE9aK4uREUeSq70-C_FozjseyuK3_0qaQH5QR3kelf_Xubt5JgEC2jB9UZjSvxM4nt1fFUzfe3FpbAqVwxdYhxAYMGOM3et8-kpmh_k4jd4AEU_OU/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.47.07.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="La page perroquet.xhtml modifiée" border="0" data-original-height="429" data-original-width="1036" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEFBwRhwGRff8tpQAgvoj5CaXu8hQE9aK4uREUeSq70-C_FozjseyuK3_0qaQH5QR3kelf_Xubt5JgEC2jB9UZjSvxM4nt1fFUzfe3FpbAqVwxdYhxAYMGOM3et8-kpmh_k4jd4AEU_OU/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.47.07.png" title="La page perroquet.xhtml modifiée" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>La page perroquet.xhtml modifiée</b></td></tr>
</tbody></table>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
La page 'template.xhtml'</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7YgLSVtZ4I4BFIlcd2BYOac9wn5ZUmB6HOs1tpO798YAJfCMMoTq-1fEx0VZuMUhyphenhyphenj-Z7c3QRx6csFxKIVzkSE1IObvCGjHGbUlBIQwY3g6fwgYYQqTN3JqC_a20XK9OMomvS7pFr1O8/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.49.12.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="La page template.xhtml modifiée" border="0" data-original-height="589" data-original-width="1018" height="370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7YgLSVtZ4I4BFIlcd2BYOac9wn5ZUmB6HOs1tpO798YAJfCMMoTq-1fEx0VZuMUhyphenhyphenj-Z7c3QRx6csFxKIVzkSE1IObvCGjHGbUlBIQwY3g6fwgYYQqTN3JqC_a20XK9OMomvS7pFr1O8/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.49.12.png" title="La page template.xhtml modifiée" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>La page template.xhtml modifiée</b></td></tr>
</tbody></table>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Comme on le remarque ci dessus, au lieu d'écrire directement le texte au niveau de la page, on a fait référence au lieu de ça à la variable 'msgs' définie auparavant dans le fichier de configuration qui va appeler la rubrique désignée en l'occurrence soit 'bienvenue', 'title', 'animal' ou 'description' sachant que ces quatre descripteurs ont été définis au niveau de tous les fichiers de propriétés de langues. Maintenant pour savoir quelle langue afficher, nous allons le faire moyennant la balise <f:view locale="ar"> qui dans ce cas va appeler le fichier de propriétés 'message_ar.properties' pour avoir ainsi l'affichage suivant :</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVtgbd3otPhMuvSBdyl4xiN1qzoKZHBHUfi0IUKBEpZpmFMaIJwUJYdx38aHxck7Cgj0-hMQk2WLaS2Ad-O6-ADAtKqIU6RSDT9TdtcoewBspRqbbICtgwQJ0PBM5Z7a7Ct09SZAZkuqg/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.58.16.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="I18n en action" border="0" data-original-height="333" data-original-width="1207" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVtgbd3otPhMuvSBdyl4xiN1qzoKZHBHUfi0IUKBEpZpmFMaIJwUJYdx38aHxck7Cgj0-hMQk2WLaS2Ad-O6-ADAtKqIU6RSDT9TdtcoewBspRqbbICtgwQJ0PBM5Z7a7Ct09SZAZkuqg/s640/Capture+d%25E2%2580%2599e%25CC%2581cran+2018-01-25+a%25CC%2580+12.58.16.png" title="I18n en action" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>I18n en action</b></td></tr>
</tbody></table>
<div style="text-align: justify;">
Maintenant que nous avons réussi le processus d'internationalisation I18n en passant par l'injection de la balise <f:view locale="">. Toutefois, cette procédure reste manuelle et chaque que l'on veuille changer de langue, on doit le faire à la main chose qui n'est pas pratique. Pour remédier à ce problème, j'attire votre attention sur le fait que JSF adopte le langage d'expression <a href="https://docs.oracle.com/javaee/6/tutorial/doc/gjddd.html" target="_blank">EL</a> alors dans ce cas, l'astuce consiste à placer dans la balise <f:view> au niveau de son paramètre 'locale' non pas le suffixe de langue exemple 'ar' ou 'fr' mais plutôt une expression EL telle que par exemple <f:view locale="#{bean.methode()}"> où 'bean' va être une JavaBean à créer qui contiendra une méthode 'methode' qui va retourner les suffixes de langues 'ar' ou 'fr' ou 'en' et ce bien sûr lorsque l'utilisateur va cliquer sur le bouton de langue désirée.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
A bientôt pour un nouveau billet....</div>
</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-68635329785582942652018-01-04T14:02:00.006-08:002018-02-06T01:47:28.664-08:00Atelier JSF JDBC<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: blue;">Introduction</span></h2>
<div style="text-align: left;">
Dans cet atelier, nous allons utiliser conjointement la technologie Jsf au niveau de la couche web tandis que la connexion JDBC à la base de données va être effectuée via la couche bean. Le projet travaille sur la base de données derby “transport” qui possède une seule table “voiture” composée des champs suivants : immatriculation, marque, nbportes, couleur. Nous essayons d'élaborer uniquement l'opération d'affichage des tuples de la table "Voiture". L’architecture du projet est ainsi élaborée sous l’IDE NetBeans 8.2 :</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Architecture du projet JSF" height="167" src="https://lh5.googleusercontent.com/9Qxq0DTVkWuLvAwaOJH6Maohc8EgSF-QWTEamxDGSzng15WziR-jWZhVT5Er2ewZ5jBU_Scre9v1hxPwgL6e5zP_GQuJkRE9GRxDaRHr-o4NMyQqvdVh21MeUx9x5phwvj9aDGi4" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Architecture du projet" width="337" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Architecture du projet</td></tr>
</tbody></table>
<span id="docs-internal-guid-7d78aea3-c329-3d29-1285-8d6c73eff9e3" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span> <br />
<br />
<h2 style="text-align: left;">
<span style="color: blue;">La couche Métier</span></h2>
<div style="text-align: left;">
La couche métier de notre projet se constitue d'une seule entité, à savoir la classe "Voiture" que l'on va créer au niveau du package 'org.cours.jsf'. </div>
<h3 style="text-align: left;">
<span style="color: #38761d;">Voiture.java</span></h3>
package org.cours.jsf;<br />
public class Voiture {<br />
private String immatriculation;<br />
private String marque;<br />
private int nbPortes;<br />
private String couleur;<br />
public Voiture() {<br />
}<br />
public String getImmatriculation() {<br />
return immatriculation;<br />
}<br />
public void setImmatriculation(String immatriculation) {<br />
this.immatriculation = immatriculation;<br />
}<br />
public String getMarque() {<br />
return marque;<br />
}<br />
public void setMarque(String marque) {<br />
this.marque = marque;<br />
}<br />
public int getNbPortes() {<br />
return nbPortes;<br />
}<br />
public void setNbPortes(int nbPortes) {<br />
this.nbPortes = nbPortes;<br />
}<br />
public String getCouleur() {<br />
return couleur;<br />
}<br />
public void setCouleur(String couleur) {<br />
this.couleur = couleur;<br />
} <br />
}<br />
<h2 style="text-align: left;">
<span style="color: blue;">La couche Bean</span></h2>
<div style="text-align: left;">
La classe qui va assurer les opérations d'interaction avec la base de données sera assurée par la classe de type ManagedBean "VoitureBean" et qui va en même temps jouer le rôle de relais avec à la fois la page jsf "voiture.xhtml" ainsi que la classe entité "Voiture.java". Cette classe est crée dans le package 'org.cours.jsf'. </div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h3 style="text-align: left;">
<span style="color: #38761d;">VoitureBean.java</span></h3>
package org.cours.jsf;<br />
<br />
import java.sql.Connection;<br />
import java.sql.DriverManager;<br />
import java.sql.PreparedStatement;<br />
import java.sql.ResultSet;<br />
import java.sql.SQLException;<br />
import java.util.ArrayList;<br />
import java.util.List;<br />
import javax.faces.bean.ManagedBean;<br />
import javax.faces.bean.SessionScoped;<br />
<br />
@ManagedBean<br />
@SessionScoped<br />
public class VoitureBean {<br />
<br />
public List<Voiture> getVoiture() throws ClassNotFoundException, SQLException {<br />
Connection connect = null;<br />
String url = "jdbc:derby://localhost:1527/transport";<br />
String username = "root";<br />
String password = "azerty";<br />
try {<br />
<br />
Class.forName("org.apache.derby.jdbc.ClientDriver");<br />
<br />
connect = DriverManager.getConnection(url, username, password);<br />
<br />
} catch (SQLException ex) {<br />
System.out.println("in exec");<br />
System.out.println(ex.getMessage());<br />
}<br />
List<Voiture> voitures = new ArrayList<>();<br />
PreparedStatement pstmt = connect.prepareStatement("select immatriculation, marque, nbportes, couleur from Voiture");<br />
ResultSet rs = pstmt.executeQuery();<br />
while (rs.next()) {<br />
Voiture voiture = new Voiture();<br />
voiture.setImmatriculation(rs.getString("immatriculation"));<br />
voiture.setMarque(rs.getString("marque"));<br />
voiture.setNbPortes(rs.getInt("nbportes"));<br />
voiture.setCouleur(rs.getString("couleur"));<br />
voitures.add(voiture);<br />
}<br />
rs.close();<br />
pstmt.close();<br />
connect.close();<br />
return voitures;<br />
}<br />
}<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h2 style="text-align: left;">
<span style="color: blue;">La couche Web</span></h2>
<div style="text-align: left;">
La page Jsf "voiture.xhtml" va faire appel au tag 'dataTable' pour pouvoir afficher les éléments de la structure de table 'Voiture' de la base de données 'transport'. Les données étant chargées depuis la 'ManagedBean' en passant par l'entité "Voiture". </div>
<h3 style="text-align: left;">
<span style="color: #38761d;">Voiture.xhtml</span></h3>
<?xml version='1.0' encoding='UTF-8' ?><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"<br />
xmlns:h="http://xmlns.jcp.org/jsf/html"<br />
xmlns:f="http://xmlns.jcp.org/jsf/core"><br />
<h:head><br />
<title>Facelet Title</title><br />
</h:head><br />
<h:body><br />
<h2>Liste des Voitures</h2><br />
<h:dataTable bgcolor="cyan" value="#{voitureBean.voiture}" var="voiture" border="2"><br />
<h:column><br />
<f:facet name="header">Immatriculation</f:facet><br />
#{voiture.immatriculation}<br />
</h:column><br />
<h:column><br />
<f:facet name="header">Marque</f:facet><br />
#{voiture.marque}<br />
</h:column><br />
<h:column><br />
<f:facet name="header">Nombre portes</f:facet><br />
#{voiture.nbPortes}<br />
</h:column><br />
<h:column><br />
<f:facet name="header">Couleur</f:facet><br />
#{voiture.couleur}<br />
</h:column> <br />
</h:dataTable><br />
</h:body><br />
</html><br />
<h2 style="text-align: left;">
<span style="color: blue;">Le rendu</span></h2>
On lance l’exécution de la page jsf “voiture.xhtml” en faisant bouton droit sur cette page et en choisissant après “Exécuter le fichier”, on obtiendra le rendu suivant :<br />
<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Rendu de la page voiture.xhtml" height="323" src="https://lh5.googleusercontent.com/CKAF0rOdshzFoTWASzxQDjDzxyxiHIaJzfDi7pjlNekf_dTlwZCNuZIQ_cNZTHR11eTDzNVXwRefLlNSkSNoUJ8orpyj8Gt7rd_Pxk91L2If50V5K0afST9_h6_XS3dEpUbMXRds" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Rendu de la page voiture.xhtml" width="573" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Affichage de la page Voiture.xhtml</td></tr>
</tbody></table>
<span id="docs-internal-guid-7d78aea3-c329-aa43-39fd-0f4e664fbb0a" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br />
<br /></div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-80798092959053248442017-12-22T10:20:00.000-08:002019-12-05T07:11:54.743-08:00Les Tests Unitaires avec TestNG et Mockito<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: #38761d;">Introduction</span></h2>
<div style="text-align: justify;">
Dans ce billet, nous allons présenter notre atelier pratique dans lequel à travers un projet Java pédagogique nous montrons comment marier l’outil <a href="http://site.mockito.org/" target="_blank">Mockito</a> avec le framework de test unitaire <a href="http://testng.org/" target="_blank">TestNG</a>. Le projet consiste à tester la classe Calculette constituée de quatre méthodes mathématiques qui sont l’addition, la soustraction, la multiplication et la division. Dans un premier temps, nous réalisons le test unitaire avec TestNG sans recours à Mockito. Dans un deuxième temps, la classe à tester Calculette va être substituée par une classe fictive, en supposant par exemple que nous n’avons pas accès à son code source, et c’est là où intervient l’outil Mockito pour faire semblant que la classe Calculette existe et va nous permettre ainsi de dérouler notre test sans pour autant accéder réellement aux méthodes de la classe Calculette. </div>
<h2 style="text-align: left;">
<span style="color: #38761d;">Mise en pratique</span></h2>
<div style="text-align: justify;">
Pour réaliser notre atelier, nous avons besoin de l’IDE Eclipse. Nous commençons par créer un projet Maven. On va aller après vers le dépôt central de Maven http://mvnrepository.com pour récupérer les dépendances pour notre projet qui sont à savoir TestNG et Mockito. Notre fichier pom.xml se présentera ainsi :</div>
<div style="text-align: left;">
<br />
<dependencies><br />
<dependency><br />
<groupId>org.testng</groupId><br />
<artifactId>testng</artifactId><br />
<version>6.11</version><br />
<scope>test</scope><br />
</dependency><br />
<dependency><br />
<groupId>org.mockito</groupId><br />
<artifactId>mockito-core</artifactId><br />
<version>2.13.0</version><br />
<scope>test</scope><br />
</dependency><br />
</dependencies></div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h2 style="text-align: left;">
<span style="color: #38761d;">La classe Calculette.java</span></h2>
<div style="text-align: left;">
Notre projet contient une seule classe à tester. Il s’agit de la classe Calculette.java qui se présente comme suit :<br />
<br />
package org.knafil.testng;<br />
public class Calculette { <br />
public double add(double n1, double n2) {<br />
double c;<br />
c= n1+n2;<br />
return c;<br />
} <br />
public double soustraire(double n1, double n2) {<br />
double c;<br />
c = n1 - n2;<br />
return c;<br />
}<br />
public double produit(double n1, double n2) {<br />
double c;<br />
c= n1 * n2;<br />
return c;<br />
}<br />
public double diviser(double n1, double n2) {<br />
double c;<br />
c= n1 / n2;<br />
return c;<br />
}<br />
}</div>
<h2 style="text-align: left;">
<span style="color: #38761d;">Les classes de test pour la méthode 'add'</span></h2>
<h3 style="text-align: left;">
<span style="color: blue;">Tester sans Mockito</span></h3>
<div style="text-align: left;">
Nous commençons par produire la classe de test de Calculette en utilisant le framework TestNG. Nous allons tester uniquement l’opération d’addition de deux nombres doubles. La classe de test se présente alors comme suit :<br />
<br />
package org.knafil.testng;<br />
<br />
import org.testng.annotations.Test;<br />
import org.testng.Assert;<br />
import org.testng.annotations.BeforeTest;<br />
<br />
public class CalculetteTestWithoutMock {<br />
<br />
Calculette calc;<br />
<br />
@BeforeTest<br />
public void create() {<br />
calc = new Calculette();<br />
}<br />
<br />
@Test<br />
public void test() {<br />
Assert.assertEquals(3.0, calc.add(1, 2));<br />
}<br />
}<br />
<br />
Au niveau de ce test, nous avons instancié réellement la classe Calculette pour pouvoir passer le test. Ceci a été fait au niveau de l’annotation @BeforeTest qui consiste à préparer le test pour TestNG. Donc avant de commencer le test, nous allons tout d’abord initié l’objet calc en créant une instance de la classe Calculette.</div>
<div style="text-align: left;">
Pour voir comment dérouler un test sous TestNG, veuillez bien accéder à ce <a href="http://knafil.blogspot.com/2017/12/les-tests-unitaires-avec-testng.html" target="_blank">billet</a>.</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h3 style="text-align: left;">
<span style="color: blue;">Tester avec Mockito</span></h3>
<div style="text-align: left;">
Supposant maintenant que pour une raison donnée, nous n’avons pas accès au code source de la classe Calculette. Dans ce cas, nous allons contourner cette situation et faire en sorte de substituer la classe Calculette par une autre classe Calculette qui fait pratiquement la même chose, c’est à dire qu’elles auront la même signature. Notre deuxième classe de test avec Mockito cette fois-ci se présente comme suit :<br />
<br />
package org.knafil.testng;<br />
import static org.mockito.Mockito.mock;<br />
import static org.mockito.Mockito.when;<br />
import org.testng.Assert;<br />
import org.testng.annotations.BeforeClass;<br />
import org.testng.annotations.Test;<br />
<br />
public class CalculetteTestWithMock {<br />
<br />
Calculette calc;<br />
<br />
@BeforeClass<br />
public void create(){<br />
calc = mock(Calculette.class);<br />
when(calc.add(1, 2)).thenReturn(3.0);<br />
}<br />
<br />
@Test<br />
public void test() {<br />
Assert.assertEquals(3.0, calc.add(1, 2));<br />
}<br />
} <br />
<br />
Comme vous voyez en haut, la classe Calculette n’a pas réellement été instanciée. C’est uniquement une substitution via Mockito (calc = mock(Calculette.class)). Après on demande à Mockito que lorsque la méthode add est appelée pour les deux paramètres 1 et 2 (when (calc.add(1, 2))) alors il doit nous retourner 3.0 (thenReturn(3.0)). Cette étape est renseignée dans la rubrique @BeforeTest de TestNG. Ensuite nous procédons à lancer notre test unitaire de manière normale au niveau de la rubrique @Test.</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h3 style="text-align: left;">
<span style="color: blue;">Tester avec les annotations de Mockito</span></h3>
<div style="text-align: left;">
Dans ce paragraphe, nous allons modifier légèrement notre code de test ci haut pour faire appel aux annotations de Mockito. Notre nouvelle classe de test se présentera ainsi comme suit :<br />
<br />
package org.knafil.testng;<br />
<br />
import static org.mockito.Mockito.when;<br />
import static org.mockito.MockitoAnnotations.initMocks;<br />
<br />
import org.mockito.Mock;<br />
import org.testng.Assert;<br />
import org.testng.annotations.BeforeClass;<br />
import org.testng.annotations.Test;<br />
<br />
public class CalculetteTestWithAnnotMock {<br />
@Mock<br />
Calculette calc;<br />
<br />
@BeforeClass<br />
public void create(){<br />
initMocks(this);<br />
when(calc.add(1, 2)).thenReturn(3.0);<br />
}<br />
<br />
@Test<br />
public void test() {<br />
Assert.assertEquals(3.0, calc.add(1, 2));<br />
}<br />
}<br />
<br />
Au niveau de ce test, nous allons mocker directement la classe Calculette par l’annotation <a href="https://static.javadoc.io/org.mockito/mockito-core/2.13.0/org/mockito/Mock.html" target="_blank">@Mock</a>, et ensuite nous allons procéder à l’initialisation du Mock en faisant appel à la méthode <a href="https://static.javadoc.io/org.mockito/mockito-core/2.2.28/org/mockito/MockitoAnnotations.html" target="_blank">initMocks</a> au niveau de la rubrique @BeforeTest.</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h2 style="text-align: left;">
<span style="color: #38761d;">La classe de test pour la méthode 'produit'</span></h2>
<div style="text-align: left;">
package org.knafil.testng;<br />
import static org.mockito.Mockito.mock;<br />
import static org.mockito.Mockito.when;<br />
import org.testng.Assert;<br />
import org.testng.annotations.BeforeClass;<br />
import org.testng.annotations.Test;<br />
public class CalculetteTestProduit {<br />
Calculette calc;<br />
<br />
@BeforeClass<br />
public void create(){<br />
calc= mock(Calculette.class);<br />
when(calc.produit(anyInt(), eq(0))).thenReturn(0); <br />
}<br />
<br />
@Test<br />
public void test() {<br />
assertSame(calc.produit(1,0),0);<br />
assertSame(calc.produit(3,0),0);<br />
}<br />
<br />
}</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Dans ce code, on renseigne à Mockito que la multiplication de n'importe quel nombre par zéro va donner zéro au niveau du résultat.</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h2 style="text-align: left;">
<span style="color: #38761d;">La classe de test pour la méthode 'division'</span></h2>
<div style="text-align: left;">
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Nous continuons notre atelier avec le test de la méthode ‘division’ de la classe Calculette qui va se présenter comme suit :<br />
<br />
package org.knafil.testng;<br />
import static org.mockito.Mockito.mock;<br />
import static org.mockito.Mockito.when;<br />
import org.testng.Assert;<br />
import org.testng.annotations.BeforeClass;<br />
import org.testng.annotations.Test;<br />
public class CalculetteTestAvecException {<br />
Calculette calc;<br />
<br />
@BeforeClass<br />
public void create(){<br />
calc = mock(Calculette.class);<br />
when(calc.diviser(anyInt(), eq(0))).thenThrow(new ArithmeticException()); <br />
}<br />
<br />
@Test(expected=ArithmeticException.class) <br />
public void test() {<br />
calc.diviser(1, 0);<br />
}<br />
<br />
}</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Dans ce code, on renseigne à Mockito que n'importe quelle division par 0 doit lever une exception :</div>
<div style="text-align: left;">
when(calc.diviser(anyInt(), eq(0))).thenThrow(new ArithmeticException()); </div>
<div style="text-align: left;">
<br /></div>
</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-68656272930110518212017-12-19T03:14:00.003-08:002018-01-11T02:16:12.462-08:00Atelier JSF EJB<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: #38761d;"><b>Introduction</b></span></h2>
<div style="text-align: justify;">
Dans cet atelier nous mettons en avant les technologies JSF, EJB, JPA pour réaliser un projet Java EE qui consiste à créer une seule entité “Article” et interagir avec moyennant les deux opérations d’ajout et d’affichage. Dans ce projet, la couche web est illustrée par la technologie JSF, la couche métier est représentée par la technologie EJB et la couche de persistence est représentée par la technologie JPA. La base de données est assurée par derby, l’IDE utilisé est NetBeans version Java EE. Pour des soucis liés au temps, nous avons fait appel pour certains passages à la génération automatique du code. </div>
<div style="text-align: justify;">
</div>
<h2 style="text-align: left;">
<b><span style="color: #38761d;">Architecture du projet</span></b></h2>
<div style="text-align: justify;">
Tout d’abord, l’architecture du projet se présente comme suit :</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Architecture du projet" height="580" src="https://lh3.googleusercontent.com/zK3BXE5vT_JCBiKz6GW06NFK1WGWbAzZ36fDt5gUvQy0PnfVO8ZVnmIZpnDfCLF5q-tGix9ZfRRDZhyj498BbuzqpKVFLw9EXuMu0kfRO-v1KXi_woifprU9bE_OlCIOyp87HZHq" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Architecture du projet" width="355" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Architecture du Projet</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e53-fd65-be6a-26cfdda6306f" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div style="text-align: justify;">
Nous avons d’abord un dossier “resources” (un seul ‘s’ pour avoir de la compatibilité avec les projets Java EE à l’échelle internationale) qui contient deux sous dossiers : css et images. Ce dernier contiendra toutes les images nécessaires à l’élaboration de notre projet, tandis que le dossier css contiendra toutes les feuilles de style propres à notre projet.<br />
La partie Web (dossier Web Pages) est représentée par deux pages jsf : Home et AjouterArticle. La première c’est une sorte de page d’accueil du site, la deuxième contient les liens pour activer simultanément l’ajout et l’affichage des articles au niveau de la base de données.<br />
La partie Java est répartie en trois packages. Le premier package ‘org.cours.entites’ contient toutes les classes entités du projet, dans notre cas il s’agit de l’entité ‘Article’ qui ne contient que les champs représentés dans la base de données, à savoir : id, nom et prix. Le deuxième package “org.cours.dao’ contient la classe EJB, qui dans notre cas ayant utilisé le <a href="https://fr.wikipedia.org/wiki/Fa%C3%A7ade_(patron_de_conception)" target="_blank">pattern Facade</a> va être illustrée par trois classes : AbstractFacade, AbstractFacadeLocal et ArticleFacade. Le trosième package “org.cours.beans” contient les classes de type Managed Bean du projet, dans notre cas il s’agit d’une seule Managed Bean : ‘ArticleBean’ qui va assurer le rôle d'intermédiaire entre le formulaire JSF et la classe EJB. </div>
<h2 style="text-align: left;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<b><span style="color: #38761d;">La couche Web</span></b></h2>
<div style="text-align: justify;">
Dans cette couche, on aura besoin de deux pages JSF, l’une c’est la page d’accueil “Home.xhtml”, et l’autre c’est la page “AjouterArticle.xhtml” qui va nous permettre d’ajouter et de consulter les articles de la base.<br />
Pour créer la page JSF “Home.xhtml”, on fait bouton droit sur le projet ensuite on choisit la catégorie Java Server Faces et on sélectionne à droite “Facelets Template” comme suit :</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e54-fae7-0db0-e1d72895b8d5" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Template Facelet Creation" height="443" src="https://lh4.googleusercontent.com/IKWalQm82W86fsn16U2-vuLe74_-puImyhkOji1L8pID88fz4DmaHITy9sdEUp0Mn5UnaLtUIorOSfQLOIEjuu2N28JFAhWEZyoKKpLNfVVikDEzdZFTm69wVMPA5pVg9apgO2B6" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Template Facelet Creation" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Création de la template Facelet</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e54-fae7-0db0-e1d72895b8d5" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
On appuie sur Next, et puis on donne le nom “Home” à cette page tout en sélectionnant en bas le type de template, comme suit :</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e55-78fd-0d76-7f62ffd5b20c" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e55-78fd-0d76-7f62ffd5b20c" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e55-78fd-0d76-7f62ffd5b20c" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Style de la template" height="496" src="https://lh3.googleusercontent.com/hAjas5cLss4lVVh8sbiUpu37MSwBNzQxxp_trcy4REnV-tIrtEO2X_0XMBk_1zki-zav5L5K0U_oNVECifNsnJL1k3ZhcHTspsd3OyEaddrIW0NQloGtzLgMBNpzR8ouUzcYzRXu" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Style de la template" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Choix du style de la template</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e55-78fd-0d76-7f62ffd5b20c" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Après on modifie les rubriques “top”, “left” et “content” ci dessous (l’image il faut la télécharger et la placer dans le sous-dossier “images” du dossier “resources” pour pouvoir l’utiliser) :</div>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h3 style="text-align: left;">
<b><span style="color: blue;">Home.xhtml</span></b></h3>
<div style="text-align: justify;">
<?xml version='1.0' encoding='UTF-8' ?> <br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"<br />
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"<br />
xmlns:h="http://xmlns.jcp.org/jsf/html"><br />
<h:head><br />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><br />
<h:outputStylesheet name="css/default.css"/><br />
<h:outputStylesheet name="css/cssLayout.css"/><br />
<title>Ventes AKYA MEDIA</title><br />
</h:head><br />
<h:body><br />
<div id="top"><br />
<ui:insert name="top"><h1 align="center">Gestion des Ventes</h1></ui:insert><br />
</div><br />
<div><br />
<div id="left"><br />
<ui:insert name="left"><br />
<a href="AjouterArticle.xhtml">Gestion Articles</a><br />
</ui:insert><br />
</div><br />
<div><br />
<div id="content" class="right_content"><br />
<ui:insert name="content"><br />
<h:graphicImage library="images" name="logo.png" width="50%" height="50%" /><br />
</ui:insert><br />
</div><br />
</div><br />
</div> <br />
</h:body><br />
</html><br />
<br />
La page “AjouterArticle.xhtml” va ensuite être créée à base de la template “Home.xhtml”. On fait bouton droit sur le projet, catégorie “Java Server Faces” et on choisit “Facelets Template Client” :</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Template client" height="445" src="https://lh4.googleusercontent.com/57eHLJ871W0zsFq3tSvgodrrG_NTnGc3BVKntzjN_dGA65pfJaG4MRkElV7ye8vrFS-Ou-HpGc_hqTyB86FIJkH1tYTP6N_vLe253visnnJXeE9CiEJyKV_Zj1qahIV5emPngq37" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Template client" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Création de la template Client</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e56-4d5f-4faf-be120e3ef623" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<br /></div>
<br />
<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
On appuie sur Next et on saisie le nom de la page “AjouterArticle”:<br />
<br />
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-2ceb-d57b-ec18415fc681" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-2ceb-d57b-ec18415fc681" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-2ceb-d57b-ec18415fc681" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="La page ajouterArticle.xhtml" height="441" src="https://lh3.googleusercontent.com/PXqGUd94dTkE9JvDR-Yfd5MV6PnwZPiWPbajKI_Wfvfvpso6Ooxyhh20iYdIl_7G1xdp9Kl5TFptrnnULrbWB2QSZAX5Q1RJDCB04-I9QssSQmywQ0tJRgsANEq-IdVFc1AgCQL8" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="La page ajouterArticle.xhtml" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">La page ajouterArticle.xhtml</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e57-2ceb-d57b-ec18415fc681" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<br /></div>
<br />
<br />
Il reste à définir la template, pour cela on clique sur le bouton ‘Browse…’ en face de ‘Template’ :<br />
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Template de base" height="514" src="https://lh4.googleusercontent.com/BQ6fJcS1NegVuKm4-lJeoZ1xlAedGBLA0Q_8tPzTrOSlyOHASAtW1Hrv9Mg9W-7urJFCRyDRg3q3XX7HIcs2arw3SKdv6s5lB4Ts9ifGO4ZAXD7gCYvRytww73_Eo63fCTu72rAV" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Template de base" width="422" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Choix de la template de base</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<br />
<br />
On choisit le nom de la template “Home.xhtml” et on appuie sur “Select File”.On aura alors la page suivante qu’on va personnaliser en définissant la rubrique “content” au niveau de la page comme ci dessous :<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h3 style="text-align: left;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="color: blue;"><b>AjouterArticle.xhtml</b></span></span></h3>
<h3 style="text-align: left;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></h3>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><?xml version='1.0' encoding='UTF-8' ?><br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" </span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br /><html xmlns="http://www.w3.org/1999/xhtml"<br /> xmlns:ui="http://xmlns.jcp.org/jsf/facelets"<br /> xmlns:h="http://xmlns.jcp.org/jsf/html"<br /> xmlns:f="http://xmlns.jcp.org/jsf/core"><br /> <body><br /> <ui:composition template="./Home.xhtml"><br /><br /> <ui:define name="top"><br /> <h1 align="center">Gestion Articles</h1><br /> </ui:define><br /> <ui:define name="left"><br /> <a href="AjouterArticle.xhtml">Gestion Articles</a><br /> </ui:define> <br /> <ui:define name="content"><br /> <f:view><br /> <h:form><br /> <h1>Ajout Produit</h1><br /> <h:panelGrid columns="2"><br /> <h:outputText value="Code"/><br /> <h:inputText /><br /> <h:outputText value="Libelle"/><br /> <h:inputText /><br /> <h:outputText value="Prix"/><br /> <h:inputText /> <br /> <h:commandButton value="Ajouter" /><br /> </h:panelGrid><br /> </h:form><br /> </f:view><br /> </ui:define><br /> </ui:composition><br /> </body><br /></html></span></div>
<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h2 style="text-align: left;">
<span style="color: #38761d;">Pool de connexion</span></h2>
Maintenant, en supposant que la base de données “com” est déjà créée ainsi que la table Produit (id, libelle, prix), nous procédons à la création du <a href="https://en.wikipedia.org/wiki/Connection_pool" target="_blank">pool de connexion</a>. En cliquant avec le bouton droit sur le nom du projet, on choisit la catégorie “GlassFish” et on sélectionne le type “JDBC Connection Pool”, après on appuie sur “Next”.<br />
<div style="text-align: justify;">
<br />
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="JDBC connection pool" height="443" src="https://lh3.googleusercontent.com/Rj4UmwVzok_hssTcItqLNO2OR2Y0GsTRTghhmAI5jSjvWsaVUbpkON3-UvnrGU2IA5BZ040DtlI9knsXIYcEoL2T9IHc5_wRwMiD3OzJllU2q2PlqYQ0broineosmiNJb-B8m5pZ" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="JDBC connection pool" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">JDBC connection pool</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5d-1eae-b061-2d4eb3cc0488" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /> </span></div>
<div style="text-align: justify;">
Dans le champ “JDBC Connection Pool Name” on saisit un nom, par exemple “gcom”, et en bas on sélectionne notre base de données “com” comme suit :<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Choix de la base de données" height="399" src="https://lh6.googleusercontent.com/-n7mxD_-isebieDW5w195oj05C556SuUM69LaBblqcp1Gj8hX3bstJ-rw44DCWFzRq4_vAjAI71XQtwkKE4qXMKjC4CXH5K0yu4WwTPhqNFQf99N_cQuQeuc3GbIHg2OktQgYb7h" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Choix de la base de données" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Choix de la base de données</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-2c60-f227-9b5ddbb87f44" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span> </span></div>
<br />
<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Et ensuite on valide le reste en cliquant successivement sur “Next”.<br />
Après cette opération, on va créer la <a href="https://docs.oracle.com/cd/E19316-01/820-4335/ablih/index.html" target="_blank">ressource JDBC</a>. On appuie avec le bouton droit sur le nom du projet, on choisit la catégorie “GlassFish” et on sélectionne le type “JDBC Resource” :<br />
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br />
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Ressource JDBC" height="440" src="https://lh3.googleusercontent.com/lX4iS8yAFpFHgDpi-Eci1XdYLxgGI6ioRD9VqLjD28Yu2z9Cdc0WQGfHtELd01lbJ_DL68DqqcgRRdsOicmdTyIJysOpY5r7uFrWkqtfd752r09PdoaUTACrRxwfBP_YH6mvoltO" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Ressource JDBC" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">La ressource JDBC</td></tr>
</tbody></table>
</div>
<div style="text-align: justify;">
<br /></div>
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Nous sélectionnons après le nom du pool de connexion “gcom” créée précédemment :</span></div>
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<br /></div>
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Pool de connexion JDBC" height="487" src="https://lh5.googleusercontent.com/igVpNqRgOIlUD1F4v6ZlkG50q8FYjoE7FroTDPgd6gpswF3JnOU7mAdPoISxyjwt5otjq7PLOYVyadAorT00rtYkzLaMZP7AjJ0C3Jd8g88Kn0rfYBpUeZIrlsHo8-Spo0q70Irp" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Pool de connexion JDBC" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Choix du pool de connexion JDBC</td></tr>
</tbody></table>
</div>
<br />
<br />
Après on valide la création en cliquant sur “Next” puis “Finish”.<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h2 style="text-align: left;">
<span style="color: #38761d;">Création de la classe Entité</span></h2>
A ce niveau, nous allons créer la <a href="https://docs.oracle.com/cd/E16439_01/doc.1013/e13981/undejbs003.htm" target="_blank">classe entité</a> “Article.java”. Pour ce faire, nous cliquons avec le bouton droit sur le nom du projet, dans la catégorie “Persistence”, nous choisissons le type “Entity Classes from Database” :<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br />
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e60-6c6e-ddf3-90672e11de83" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e60-6c6e-ddf3-90672e11de83" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e60-6c6e-ddf3-90672e11de83" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Création de l'Entité Classe" height="440" src="https://lh6.googleusercontent.com/Xsuke1mTXqiQzSlbRDh_1cg6fJafI3nCBlKJrSM3gEfMvqtNOvr5Lv-q6mVNaC4pgss1Nd1TOTZSykiKeDMl3Jh3LpFrIHCDjiOysiU4nTc9OeOw9bEesxceoVWaZCusfIGcKijI" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Création de l'Entité Classe" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Création de l'Entité Classe</td></tr>
</tbody></table>
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e60-6c6e-ddf3-90672e11de83" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<br />
<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Nous appuyons sur “Next”, ensuite nous choisissons notre “Data Source” ainsi que la table “Article” qu’on va ajouter à droite en appuyant sur le bouton “Add >” :<br />
<div id="docs-internal-guid-abe51ac6-6e5f-b679-c5ab-1753f09f1b98" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Choix de la Data Source" height="395" src="https://lh4.googleusercontent.com/9FUHjmFVx1roWWlBuYb1HgiOshcObWgPEyaZrEddA6RKtBzSIANYSDU2m-ePoyDTnGph59ZxrGLTPM8KrCDyYho7HjxNJsoSOj7WmsCFGtAvz_QzEzsdft4qgtJzaHAuzKMXjymd" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Choix de la Data Source" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Choix de la Data Source</td></tr>
</tbody></table>
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e60-ec69-ff6a-7f9ba8536b0e" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Après on valide en cliquant sur “Next” pour avoir la fenêtre suivante :</span></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Création de l'Entité Classe" height="437" src="https://lh6.googleusercontent.com/wuvTIm4mOq-XpMOjN_ra_xr8fR6CR3CxJFxHf3s7oSIg2in6E09xlRGpAzUHsBpuFtDGdalP0fP6z6cV0hNG4x4VoZaHjONUALxVLNQ-FETvAqQ9Izqi4loUgNG73wBq5gNMpLVa" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Création de l'Entité Classe" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Création de l'Entité Classe</td></tr>
</tbody></table>
</div>
<div style="text-align: justify;">
<br /></div>
<br />
Nous choisissons le nom “org.cours.entites” par exemple et on valide. Nous obtiendrons la classe “Article.java” avec le code généré automatiquement comme suit :<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h3 style="text-align: left;">
<span style="color: blue;">Article.java</span></h3>
<h3 style="text-align: left;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></h3>
<div style="text-align: justify;">
package org.cours.entites;<br />
import java.io.Serializable;<br />
import javax.persistence.Basic;<br />
import javax.persistence.Column;<br />
import javax.persistence.Entity;<br />
import javax.persistence.Id;<br />
import javax.persistence.NamedQueries;<br />
import javax.persistence.NamedQuery;<br />
import javax.persistence.Table;<br />
import javax.validation.constraints.NotNull;<br />
import javax.validation.constraints.Size;<br />
import javax.xml.bind.annotation.XmlRootElement;<br />
<br />
@Entity<br />
@Table(name = "ARTICLE")<br />
@XmlRootElement<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>@NamedQueries({<br />
@NamedQuery(name = "Article.findAll", query = "SELECT a FROM Article a")<br />
, @NamedQuery(name = "Article.findById", query = "SELECT a FROM Article a WHERE a.id = :id")<br />
, @NamedQuery(name = "Article.findByLibelle", query = "SELECT a FROM Article a WHERE a.libelle = :libelle")<br />
, @NamedQuery(name = "Article.findByPrix", query = "SELECT a FROM Article a WHERE a.prix = :prix")})<br />
public class Article implements Serializable<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> { </span><br />
private static final long serialVersionUID = 1L;<br />
@Id<br />
@Basic(optional = false)<br />
@NotNull<br />
@Column(name = "ID")<br />
private Long id;<br />
@Size(max = 255)<br />
@Column(name = "LIBELLE")<br />
private String libelle;<br />
// @Max(value=?) @Min(value=?)<br />
<br />
@Column(name = "PRIX")<br />
private Double prix;<br />
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /> public Article() {<br /> }<br /><br /> public Article(Long id) {<br /> this.id = id;<br /> }<br /><br /> public Long getId() {<br /> return id;<br /> }<br /><br /> public void setId(Long id) {<br /> this.id = id;<br /> }<br /><br /> public String getLibelle() {<br /> return libelle;<br /> }<br /><br /> public void setLibelle(String libelle) {<br /> this.libelle = libelle;<br /> }<br /><br /> public Double getPrix() {<br /> return prix;<br /> }<br /><br /> public void setPrix(Double prix) {<br /> this.prix = prix;<br /> }<br /><br /> @Override<br /> public int hashCode() {<br /> int hash = 0;<br /> hash += (id != null ? id.hashCode() : 0);<br /> return hash;<br /> }<br /><br /> @Override<br /> public boolean equals(Object object) {<br /> // TODO: Warning - this method won't work in the case the id fields are not set<br /> if (!(object instanceof Article)) {<br /> return false;<br /> }<br /> Article other = (Article) object;<br /> if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {<br /> return false;<br /> }<br /> return true;<br /> }<br /><br /> @Override<br /> public String toString() {<br /> return "org.cours.entites.Article[ id=" + id + " ]";<br /> }<br />}</span></div>
<h2 style="text-align: left;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<span style="color: #38761d;">Session Bean</span></h2>
Dans cette partie nous allons créer la <a href="https://docs.oracle.com/javaee/6/tutorial/doc/gipjg.html" target="_blank">session bean</a> pour gérer la communication entre la classe entité “Article” et la la base de données.<br />
On clique avec le bouton droit sur le nom du projet, on choisit la catégorie “Entreprise JavaBean” puis le type “Session Bean For Entity Classes” :<br />
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Création de la SessionBean" height="437" src="https://lh3.googleusercontent.com/ekAVXOMV7L0sKamZ4im7p_d8LcDJXB-Xv88UdGkEqYM4xz9a8K6q3ZysLDtnmfjK0tTMdcyv7qbvBQTrf2PWRu_MVDlR9cELdp8NoEVWVdjJFzDhlkn--OIYZNcEX-sDCzMmU1Cv" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Création de la SessionBean" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Création de la session Bean</td></tr>
</tbody></table>
</div>
<br />
<br />
On clique sur Next et on choisit la classe entite “Article” ensuite on appuie sur le bouton “Add >” pour l’ajouter :<br />
<div style="text-align: justify;">
<br />
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<br />
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="SessionBean pour la classe Entité" height="436" src="https://lh3.googleusercontent.com/9Bf31Hv4ZNLbmXhzPtxIdWyWswU2w4Ms1SuAgIl_UsLD6IzhuJvzK_hix07fYkyW8mlRSm4LdwUT9Spw8EOINzoEhfsLy_S2nBMQ6-UwT4I_BP1ap6gCOvAFtlxoOgT6JgqDe8be" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="SessionBean pour la classe Entité" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Session Bean pour la classe entité</td></tr>
</tbody></table>
</div>
<div style="text-align: justify;">
<br /></div>
<br />
<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
On choisit après le package “org.cours.dao” par exemple et on coche la case “Locale” puis on valide :<br />
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Interface Locale" height="437" src="https://lh5.googleusercontent.com/srt9kLAAchygq6DMNcqrXAiW-n8Bz0pyJwbpd8yaEma9kpeVtWgu2IPu6o2_va0G5aOQ7QiW2v6tuO18wCwnxguK8C6_qAotu-8pWReuUbAGRpxy0dHX0Dn5igSahW5m1LWJUB9g" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Interface Locale" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Interface Locale</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span><br />
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span><span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e65-52f2-427d-dd3e657ccb0e" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span> </span></span></div>
<div style="text-align: justify;">
<br />
<br />
On obtendra trois classes “AbstractFacade.java”, “ArticleFacade.java” et “ArticleFacadeLocal.java” qui sont générés automatiquement selon le design pattern “Facade” et qui vont assurer le rôle d’interfacage avec l’entité “Article” et la table “Article” de la base de données.</div>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h2 style="text-align: left;">
<span style="color: #38761d;">La Managed Bean</span></h2>
<div style="text-align: justify;">
Maintenant nous créons la <a href="https://docs.oracle.com/javaee/6/tutorial/doc/bnaqm.html" target="_blank">managed bean</a> Jsf qui va communiquer entre la page JSF de saisie des données de l’article et la classe “ArticleFacade.java”. Pour ce faire, on clique avec le bouton droit sur le nom du projet, on choisit la catégorie JSF ensuite le type “JSF Managed Bean” et on appuie sur “Next” :</div>
<div style="text-align: justify;">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="ManagedBean" height="445" src="https://lh6.googleusercontent.com/Nk86L7wrbnZqu5vrWthAgxNtIDTH5bHZEK2F0pYPGvHlAQH1-nyxAwEIljsmvAquGKH3m82DQoFrGKB2EZmOtARu9Nze7a1R5jxABXqqCUJqJ4EKSMmpmAzvF_drmG4LaKWaIZnX" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="ManagedBean" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Création de la ManagedBean</td></tr>
</tbody></table>
</div>
<div style="text-align: justify;">
<br /></div>
<br />
On donne un nom à la classe, par exemple “ArticleBean” et on choisit le package “org.cours.beans” comme suit :<br />
<div style="text-align: justify;">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="JSF ManagedBean" height="445" src="https://lh6.googleusercontent.com/Z9ZjI0wMLihp7JxvuGVS1GUVhNJli5ulHC_PMHssQLQxQyrR2LswvIW6Rh0kSY4E-ZKhzjkNW-iLb7BAREdXKQ1skXfkobUB3TsU_YGROcRtNTOb4C9Qi73EnrT7vTlPbeHQOqFa" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="JSF ManagedBean" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">La JSF ManagedBean</td></tr>
</tbody></table>
</div>
<div style="text-align: justify;">
<br /></div>
<br />
Et on clique sur le bouton “Finish”. On obtient alors la classe “ArticleBean.java” que nous allons modifier en ajoutant la portion de code en couleur bleu ainsi que les getters et setters pour l’avoir comme suit :<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h3 style="text-align: left;">
<span style="color: blue;">ArticleBean.java</span><span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span><br /><span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></h3>
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">package org.cours.beans;<br />import java.util.List;<br />import org.cours.dao.ArticleFacadeLocal;<br />import javax.ejb.EJB;<br />import javax.faces.bean.ManagedBean;<br />import javax.faces.bean.RequestScoped;<br />import org.cours.entites.Article;<br />@ManagedBean<br />@RequestScoped<br />public class ArticleBean {<br /> @EJB<br /> private ArticleFacadeLocal articleFacade;<br /> private Article article = new Article();<br /> private String resultat; //message de confirmation d’ajout d’un article<br />public void ajouterArticle(){<br /> articleFacade.create(article);<br /> this.resultat = "Article ajouté avec succès...!!!";<br /> }<br /> public List<Article> afficherArticles(){<br /> return articleFacade.findAll();<br /> }<br /> public ArticleBean() {<br /> } <br /> public ArticleFacadeLocal getArticleFacade() {<br /> return articleFacade;<br /> }<br /> public void setArticleFacade(ArticleFacadeLocal articleFacade) {<br /> this.articleFacade = articleFacade;<br /> }<br /> public Article getArticle() {<br /> return article;<br /> }<br /> public void setArticle(Article article) {<br /> this.article = article;<br /> }<br /> public String getResultat() {<br /> return resultat;<br /> }<br /> public void setResultat(String resultat) {<br /> this.resultat = resultat;<br /> } <br />}</span></span></div>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h2 style="text-align: left;">
<span style="color: #38761d;">Modification de “AjouterArticle.xhtml”</span><span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></h2>
Pour relier les champs de saisie de la page “AjouterArticle.xhtml” avec ceux de la managed bean “ArticleBean.java” nous allons apporter les changements suivants à la page “AjouterArticle.xhtml” comme ci dessous :<br />
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span><br />
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span>
<br />
<div style="text-align: justify;">
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><ui:define name="content"><br /> <f:view><br /> <h:form><br /> <h1>Ajout Produit</h1><br /> <h:panelGrid columns="2"><br /> <h:outputText value="Code"/><br /> <h:inputText value="#{articleBean.article.id}"/><br /> <h:outputText value="Libelle"/><br /> <h:inputText value="#{articleBean.article.libelle}" /><br /> <h:outputText value="Prix"/><br /> <h:inputText value="#{articleBean.article.prix}" /> <br /> <h:commandButton value="Ajouter" action="#{articleBean.ajouterArticle()}"/><br /> </h:panelGrid><br /> <h:outputText style="color: greenyellow" value="#{articleBean.resultat}" /><br /> </h:form><br /> <h:form><br /> <h1><h:outputText value="Liste des Articles"/></h1><br /> <h:dataTable value="#{articleBean.afficherArticles()}" var="item"><br /> <h:column><br /> <f:facet name="header"><br /> <h:outputText value="Id"/><br /> </f:facet><br /> <h:outputText value="#{item.id}"/><br /> </h:column><br /> <h:column><br /> <f:facet name="header"><br /> <h:outputText value="Libelle"/><br /> </f:facet><br /> <h:outputText value="#{item.libelle}"/><br /> </h:column><br /> <h:column><br /> <f:facet name="header"><br /> <h:outputText value="Prix"/><br /> </f:facet><br /> <h:outputText value="#{item.prix}"/><br /> </h:column><br /> </h:dataTable><br /> </h:form><br /> </f:view><br /> </ui:define></span></span></div>
<h2 style="text-align: left;">
<span style="color: #38761d;">Exécution</span><span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span><span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></h2>
Il ne reste plus maintenant que passer à l’exécution. On fait bouton droit sur le nom de la page “Home.xhtml” et on choisit d’exécuter le fichier, ce qui donnera lieu à l’affichage de cette page comme suit :<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></span><br />
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Template Home" height="328" src="https://lh6.googleusercontent.com/o7GNcqfnFl9P0L8kdIsgaiWPrEgI5wL5b77baJFx5zIN4fFkREwERk0fC9fmEvIXX_a7H1-S9q1rLEjpA82r0lbFxKFrAcrL2XYGTUObgVCvmUyYI107bG_Hj6s7Y29yf1YN8ozw" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Template Home" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Chargement de la Template principale</td></tr>
</tbody></table>
<span id="docs-internal-guid-abe51ac6-6e61-42b0-a471-ffab0a40d697" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e64-ce3c-598e-9cae4f38ce7b" style="background-color: transparent; color: #666666; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span><br />
</div>
<div style="text-align: justify;">
<br /></div>
<br />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Nous appuyons sur le lien “Gestion Articles“ pour passer à l’affichage suivant :<br />
<div dir="ltr" id="docs-internal-guid-abe51ac6-6e67-b8de-1ed0-caf4730596f1" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e67-d94d-f3ab-bb22e5aa7159" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div dir="ltr" id="docs-internal-guid-abe51ac6-6e67-b8de-1ed0-caf4730596f1" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e67-d94d-f3ab-bb22e5aa7159" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
<div dir="ltr" id="docs-internal-guid-abe51ac6-6e67-b8de-1ed0-caf4730596f1" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Gestion des articles" height="261" src="https://lh6.googleusercontent.com/tYyr65R5Kg9oYfE1H6Yp3qRiJx9oXU2IyWsseD1hVzxP4TqSNdKQfgGwN14sPzRdE56x3InIEsHtikxPfQmQx6igw9az8JNOLvEnkzLT5B67MkZoTl_UqM2zazC6t0zzUaF4LQ27" style="border: medium none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" title="Gestion des articles" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Gestion des articles</td></tr>
</tbody></table>
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e67-d94d-f3ab-bb22e5aa7159" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span> </span></div>
<div style="text-align: justify;">
<br />
<br />
C’est ainsi que nous arrivons à la fin de cet atelier, si jamais vous avez trouvé des problèmes ou vous avez des questions n’hésitez pas à les poster en commentaire.<br />
<span id="docs-internal-guid-abe51ac6-6e57-d4f3-353b-241c0b8cf1e7" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-abe51ac6-6e5e-ec2c-f7a8-4ad730a4c2e0" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></span></div>
</div>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-4680017041329825"
data-ad-slot="9268146866"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-37065624424167515032017-12-15T02:35:00.000-08:002019-12-05T08:12:54.425-08:00Les Tests unitaires avec TestNG<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 dir="ltr" id="docs-internal-guid-ec9155fe-59a9-1be0-6d33-1cf917c006a6" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 24pt;">
<span style="background-color: transparent; color: #63a600; font-family: "roboto slab"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Introduction</span></h2>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<div style="text-align: justify;">
<span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">TestNG est un framework de test unitaire qui s’est inspiré des frameworks de test unitaires</span><br />
<span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Junit </span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">et N</span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">unit</span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"> et </span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ac-0956-6bd1-23eecc13eaed" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;">qui a ajouté de nouvelles fonctionnalités par rapport à ces </span></span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ac-0956-6bd1-23eecc13eaed" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-34cd-d138-35e90221214f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;">frameworks. </span></span></span><br />
<span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ac-0956-6bd1-23eecc13eaed" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-34cd-d138-35e90221214f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;">TestNG </span></span></span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ac-0956-6bd1-23eecc13eaed" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-34cd-d138-35e90221214f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-61a9-7ce9-52429c3e5881" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;">devient </span></span></span></span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ac-0956-6bd1-23eecc13eaed" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-34cd-d138-35e90221214f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-61a9-7ce9-52429c3e5881" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;">de </span></span></span></span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ac-0956-6bd1-23eecc13eaed" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-34cd-d138-35e90221214f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-61a9-7ce9-52429c3e5881" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;">plu en plus </span></span></span></span><span id="docs-internal-guid-5e2f515b-59aa-073e-a32e-a05ad6076f5f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ac-0956-6bd1-23eecc13eaed" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-34cd-d138-35e90221214f" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;"><span id="docs-internal-guid-5e2f515b-59ac-61a9-7ce9-52429c3e5881" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline;">populaire</span></span></span></span><span style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"> et gagne du terrain par rapport à ses concurrents. </span><br />
<span style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">Dans cet atelier nous </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">allons présenter la démarche nécessaire pour installer TestNG sur Eclipse</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">et lancer par après un </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">projet Maven simple pour l’initiation. Pour réaliser cet atelier, on aura </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">besoin de l’IDE Eclipse.</span></div>
<h2 dir="ltr" id="docs-internal-guid-bee11ec5-59af-1d2d-77fc-5316216d7732" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 24pt; text-align: justify;">
<span style="background-color: transparent; color: #63a600; font-family: "roboto slab"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Installation TestNG sur Eclipse</span></h2>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pour installer TestNG sur Eclipse, on va utiliser le Marketplace. Pour ce faire, nous allons </span><br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">choisir </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">dans le menu “Help” de Eclipse le sous-menu “Eclipse Marketplace” et nous cherchons</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">avec le </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">mot “TestNG”, après on valide l’installation et on redémarre Eclipse pour que les </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">changements </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">puissent avoir lieu. Maintenant que TestNG est ajouté à Eclipse, nous pouvons </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">dans ce cas </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">démarrer des projets de test sous contrôle de cet outil. Pour l’exemple que nous </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">allons présenter, </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">nous créons un projet maven sous Eclipse comme détaillé dans la section suivante.</span></div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<h2 dir="ltr" id="docs-internal-guid-5e2f515b-59b1-88a1-4d92-319ac2e4e551" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 24pt;">
<span style="background-color: transparent; color: #63a600; font-family: "roboto slab"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Projet TestNG </span></h2>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Nous commençons, sous Eclipse, par créer un nouveau projet Maven. Le fichier “pom.xml” </span><br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">se </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">présentera comme suit :</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><project xmlns="http://maven.apache.org/POM/4.0.0" </span></div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 </span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">http://maven.apache.org/xsd/maven-4.0.0.xsd"></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <modelVersion>4.0.0</modelVersion></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <groupId>TestNG</groupId></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <artifactId>knafil.testng</artifactId></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <version>0.0.1-SNAPSHOT</version></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <packaging>jar</packaging></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <name>knafil.testng</name></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <url>http://maven.apache.org</url></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <properties></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </properties></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <dependencies></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><dependency></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><groupId>junit</groupId></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><artifactId>junit</artifactId></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><version>3.8.1</version></span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b2-525f-397d-00d51a8958e8" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><scope>test</scope></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></dependency></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><!-- https://mvnrepository.com/artifact/org.testng/testng --></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><dependency></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><groupId>org.testng</groupId></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><artifactId>testng</artifactId></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><version>6.11</version></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><scope>test</scope></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></dependency></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </dependencies></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></project></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">La dépendance de TestNG est à récupérer au niveau du site </span><a href="https://mvnrepository.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://mvnrepository.com</span></a><span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59b2-90e9-7635-8c1c64e32a00" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="216" src="https://lh3.googleusercontent.com/ggKZfJ_hWNAu2ZwpBDwdoxZ-oHtZk0Eos2XQPLazrOJU5usuucKCBcHwrCt1XKrSOz84nBC7e-q19ebj03hbivNvYqn1VVGLwxFm77K5eB-vsQgp9N35sJMLZ_x0HXm-5zyAR18A" style="-webkit-transform: rotate(0.00rad); border: currentColor; transform: rotate(0rad);" width="624" /></span> </span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<br /></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b2-ed4e-45ad-9954c8210aea" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Maintenant que la dépendance est ajoutée au fichier pom et que le plugin de TestNG est </span><br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">installé </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">sur Eclipse, on procède à la création de notre classe Java appelée “Calculette.java” </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">ayant pour </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">code :</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">package org.knafil.testng;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">public class Calculette {</span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b3-6b88-0fcd-b533f2b7b48a" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public double add(double n1, double n2) {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> double c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> c= n1+n2;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> return c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> } </span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Cette classe “Calculette.java” contient une seule méthode “add” qui permet de retourner </span><br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">l’addition </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">de deux nombres passés en paramètre. Ensuite, nous créons la classe de test de la </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">classe </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">“Calculette.java” appelée “CalculetteTest.java” de la manière suivante. Nous cliquons </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">avec le </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">bouton droit sur le nom de projet, nous choisissons “Autre ou Other”, dans wizard nous</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">écrivons “TestNG” que l’on va sélectionner et on appuie sur “Next”.</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<a href="https://lh6.googleusercontent.com/AaRzLPZ_-4xk8QKUBNzp-UPON16S0EM7cko1wLPTydRtaQ4Ny2ISJl_WVROexlmFDWLRgxERmkNR4HnyYZKygbXbUp51P7BmGoY6xoXMZ45xwJH1CF0HlfRI69cronO7sJlQQU2Q" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="328" src="https://lh6.googleusercontent.com/AaRzLPZ_-4xk8QKUBNzp-UPON16S0EM7cko1wLPTydRtaQ4Ny2ISJl_WVROexlmFDWLRgxERmkNR4HnyYZKygbXbUp51P7BmGoY6xoXMZ45xwJH1CF0HlfRI69cronO7sJlQQU2Q" style="border: currentColor; transform: rotate(0rad);" width="529" /></a><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></span><br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span id="docs-internal-guid-5e2f515b-59b5-18e9-abbf-24ccb96f54ae" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Après avoir appuyer sur “Next” la fenêtre suivante apparaît et nous propose de choisir </span><br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">les méthodes à</span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;"> tester, nous cochons alors la méthode “add” et on appuie sur “Finish”.</span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b5-dabc-e2bf-d344c5da65f1" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59b6-3d73-2550-e8434c0fa879" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="390" src="https://lh4.googleusercontent.com/-OL7y00wXEJJD3InXk-OZwAmcBRBylxw9LpI0wm6Njfi3wuB0bmMLZ8tn6_AL7IYXR-JVrdkxcV4mEQOb7KK4bMSvFYGif2rZ10HTYPhEWm5kamrG1bsxVOMiCpLsDVKhlViHLLF" style="-webkit-transform: rotate(0.00rad); border: currentColor; transform: rotate(0rad);" width="523" /></span> </span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b5-dabc-e2bf-d344c5da65f1" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<br /></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b6-7b3a-619f-eb9e4c81c0d8" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Le code de la classe “CalculetteTest.java” est comme suit :</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">package org.knafil.testng;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import org.testng.Assert;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import org.testng.annotations.Test;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">public class CalculetteTest {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> @Test</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public void add() {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Calculette calc = new Calculette();</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Assert.assertEquals(calc.add(12, 8), 20.0);</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span><br />
<br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Au niveau de la classe CalculetteTest, nous insérons l’annotation @Test juste avant la méthode</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">“add" à tester. Dans le code, nous instantions un objet “calc” de type Calculette et nous faisons </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;"> </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">appel à la méthode de test “Assert.assertEquals” qui permet de comparer si ses deux paramètres</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">sont identiques. Ici nous passons en paramètre les deux nombres “doubles” 12 et 8, pour le </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">deuxième paramètre nous passons le résultat attendu qui est le nombre double 20.0.</span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b6-ac76-1496-0ed0b96c4836" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">Le code étant créé, on fait bouton droit sur la classe de test “Caclcultte.java” et on choisit :</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">“Run as > TestNG Test”</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59b7-373b-2a49-c2126223069c" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="584" src="https://lh4.googleusercontent.com/PmIETpsvjnZMpuoqGNoqjNSJ63rJuyl_DwJgj6reiVQVGHAKRZEY2uqI4byqeER2zL4dZ1DUc1eeiSYqSkzztnUq6209HuFA8xmo1GEsDJqEyygvlUJVYxfq37NH_2DeIdwVNkl_" style="-webkit-transform: rotate(0.00rad); border: currentColor; transform: rotate(0rad);" width="624" /></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">Après validation le résultat de test s’affiche comme suit :</span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b7-6ff4-7cd7-da3cd56b6105" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59b7-9119-f9fe-0f407d98ab22" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="396" src="https://lh3.googleusercontent.com/RVp07EAn0kC-0lonEnTALF7LQU1FZobToViRQ7NLzXQaxvFh62FGoYiD2lsLTiXO-t0ZbCmAsQDtQBMqnJ1nekSu7YP6lm2seuKC8_u4NzgP22d8s5gDFIuFMS3GpS5ZG-gc3fwW" style="-webkit-transform: rotate(0.00rad); border: currentColor; transform: rotate(0rad);" width="624" /></span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b7-6ff4-7cd7-da3cd56b6105" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;"><br /></span>
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">Une fois le test passé avec succès, le message apparaît en vert avec le temps d’exécution du test.</span></div>
<h2 dir="ltr" id="docs-internal-guid-5e2f515b-59b8-1554-2a40-3df87e41ddeb" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 24pt;">
<span style="background-color: transparent; color: #63a600; font-family: "roboto slab"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Groupe de test sous TestNG</span></h2>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Des fois il semble être nécessaire de lancer un groupe de test choisi parmi plusieurs méthodes</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">de la classe à tester, parce que sinon c’est toutes les méthodes qui vont être testées dans ce cas. </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;"> </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">Supposons que nous disposons maintenant de quatre méthodes au niveau de notre classe </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">“Calculette.java” qui se présentent comme suit :</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">package org.knafil.testng;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">public class Calculette { </span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public double add(double n1, double n2) {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> double c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> c= n1+n2;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> return c;</span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b8-5fa6-8cc4-cfe36dc77ef7" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">} </span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public double soustraire(double n1, double n2) {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> double c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> c = n1 - n2;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> return c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public double produit(double n1, double n2) {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> double c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> c= n1 * n2;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> return c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public double diviser(double n1, double n2) {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> double c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> c= n1 / n2;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> return c;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b8-9811-8fe4-a0b97408d13b" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Et que la classe de test “CalculetteTest.java”, après avoir annoté le groupe de test, se présente </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;"> </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">comme suit :</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">package org.knafil.testng;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import org.testng.Assert;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import org.testng.annotations.Test;</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">public class CalculetteTest { </span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59b8-df00-8e4d-eb7126c9fa14" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">@Test</span><span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(groups = { "test-group" })</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public void add() {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Calculette calc = new Calculette();</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Assert.assertEquals(calc.add(12, 8),20.0);</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> @Test</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public void produit() {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Calculette calc = new Calculette();</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Assert.assertEquals(calc.produit(12, 8),96.0);</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> @Test</span><span style="background-color: transparent; color: blue; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(groups = { "test-group" })</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public void soustraire() {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Calculette calc = new Calculette();</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Assert.assertEquals(calc.soustraire(12, 8),4.0);</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> @Test</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> public void division() {</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Calculette calc = new Calculette();</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Assert.assertEquals(calc.diviser(16, 8),2.0);</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "courier new"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<div style="text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Ici on a choisi à titre d’exemple de définir un seul groupe de test au niveau des deux méthodes</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">“add” et “soustraire” appelé “test-group”. </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">Si on lance le test TestNG de manière normale alors </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">c’est toutes les méthodes qui vont être </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">testées, or nous voulons passer le test seulement pour les</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">deux méthodes “add” et “soustraire”. </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">Pour ce faire nous allons créer une nouvelle configuration</span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">sous Eclipse de la manière suivante. </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">Tout d’abord, dans le menu “Run” de Eclipse, on choisit </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">“Run Configurations…”. Nous sélectionnons </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">“TestNG” à partir de la liste des configurations </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">proposées.</span></div>
</div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59b9-aa8d-b12d-11bd5de4b8dc" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="347" src="https://lh3.googleusercontent.com/ZewcTojOVDligCqdZ8ucjMVfob_tO_UG4BN60rZ78gE6QShV9PDVM6SNbQIMbqO-UWZeCoPOlrvwkRoBrLprvAfO0Xk7zdfm0_3KmCx0M1pyw5TlkD03kJmQouO025plGRbG_-Iz" style="-webkit-transform: rotate(0.00rad); border: currentColor; transform: rotate(0rad);" width="624" /></span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">On appuie ensuite sur l’icône en haut à gauche pour créer une nouvelle configuration. </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"> </span><br />
<span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">Nous devons ici </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">donner un nom au niveau du champ “Name”. Pour notre cas, </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">on donne par</span><br />
<span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">exemple le nom </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">“CalculetteTestGroup”. Dans le champ “Project”, on </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">appuie sur le bouton</span><br />
<span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">“browse” et on choisit le nom</span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"> de notre projet en cours qui est </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">dans </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">notre cas “knafil.testng”. </span><br />
<span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">Après, nous sélectionnons le bouton radio</span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;"> “Groups” </span><span id="docs-internal-guid-5e2f515b-59b9-dbcf-184b-457b259a0e73" style="color: black; font-family: "roboto"; font-size: 12pt; vertical-align: baseline; white-space: pre;">et en </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">appuyant sur le bouton “Browse” </span><br />
<span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">nous choisissons “test-group” et on valide.</span></div>
<div dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span id="docs-internal-guid-5e2f515b-59ba-3d0f-f0c0-00d368335d92" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="348" src="https://lh5.googleusercontent.com/GH29XHmJT3M1NRVS_iuJcRVlhrXiMowwG75wUmstu0iPGORZaPv9j_Q9X0Z6SRhTtFSCmLXjxEAQ-A2TDBSCGJEHCMEA1ywg0NaOGb8DgpDsGz3jIk1S1o9n8na5PtQVBf1NvxLx" style="-webkit-transform: rotate(0.00rad); border: currentColor; transform: rotate(0rad);" width="624" /></span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59ba-70a7-6b4f-c1c198195de3" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Dans ce cas, le test s’exécute mais uniquement pour les deux méthodes annotées par le test</span><br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">de </span><span style="font-family: "roboto"; font-size: 12pt; white-space: pre;">groupe.</span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59ba-70a7-6b4f-c1c198195de3" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-5e2f515b-59ba-a754-5107-c955951c77d4" style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="149" src="https://lh4.googleusercontent.com/KaQhYRHUS1xAswgTYXh7JY-TkiwPTUyBw2xPt6_UnDsPxgdFe3kMOEsK_n-2Jz0n9uheGXzBMPcRl8EMrD1rRho4u8U9LVjsrgUCFqNb4zOPYgk2140-bhCRRfVp6wZ6WvgvzG3c" style="-webkit-transform: rotate(0.00rad); border: currentColor; transform: rotate(0rad);" width="624" /></span> </span></div>
<div dir="ltr" id="docs-internal-guid-5e2f515b-59ba-70a7-6b4f-c1c198195de3" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 10pt;">
<br />
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pour de plus amples détails, veuillez se référer au site officiel </span><a href="http://testng.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">http://testng.org</span></a><span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> .</span></div>
</div>
</div>
</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-24371561748353607662017-12-01T05:35:00.000-08:002019-12-05T23:44:04.546-08:00Les Tests d'Acceptation sous Fitnesse<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 dir="ltr" id="docs-internal-guid-bb295621-1244-6731-2fe7-cd4a72571830" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 24pt;">
<span style="background-color: transparent; color: #ff5e0e; font-family: "pt sans narrow"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline;">Introduction</span></h1>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Fitnesse est un outil de test d’acceptation automatisé pour réparer les problèmes liés aux processus d’exigences très tôt. Les tests d’acceptation automatisés de Fitnesse présentent plusieurs avantages tels que :</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: #695d46; font-family: 'Open Sans'; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Avoir un retour très tôt sur chaque item du projet.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #695d46; font-family: 'Open Sans'; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Avoir un retour très fréquent sur chaque item du projet.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #695d46; font-family: 'Open Sans'; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Ces tests sont déterministes dans la mesure où ils sont soient verts soient rouges.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: #695d46; font-family: 'Open Sans'; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Permettent d’emprunter de plus en plus de chemins par rapport à la logique métier.</span></div>
</li>
</ul>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">A l’inverse des tests unitaires tels que jUnit ou autres, les tests d’acceptation sous Fitnesse permettent de tester le métier et se concentrent beaucoup plus pour découler sur le bon code (the right code), le code ayant le plus de valeur métier.</span></div>
<h1 dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 24pt;">
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<span style="background-color: transparent; color: #ff5e0e; font-family: "pt sans narrow"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline;">Atelier</span></h1>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Dans cet atelier, nous allons mettre en pratique un projet de test d’acceptation sous Fitnesse. Pour ce faire, nous allons utiliser l’IDE Eclipse avec Maven. Nous commençons par créer un projet Maven sous Eclipse. Au niveau du fichier pom.xml, nous allons ajouter la dépendance de l’outil Fitnesse. Une classe mathématique classique va être créée et va faire ensuite l’objet du test. La classe se compose de deux attributs “numerateur” et “denominateur”, et d’une méthode “quotient” qui retourne la division du numérateur sur le dénominateur. La méthode “quotient “ fera l’objet de notre test. Ci après nous décrivons les étapes nécessaires pour créer un test d’acceptation sous le contrôle de Fitnesse.</span></div>
<h1 dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 24pt;">
<span style="background-color: transparent; color: #ff5e0e; font-family: "pt sans narrow"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline;">Sous Eclipse</span></h1>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">On crée le projet Maven appelé “Fitnesse” sous Eclipse. Après on ouvre le fichier “pom.xml” et on y insère le code suivant.</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #008575; font-family: "pt sans narrow"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">pom.xml :</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <modelVersion>4.0.0</modelVersion></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <groupId>org.nafil</groupId></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <artifactId>Fitness</artifactId></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <version>0.0.1-SNAPSHOT</version></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <packaging>jar</packaging></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <name>Fitness</name></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">
<url>http://maven.apache.org</url></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <properties></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </properties></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <dependencies></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <dependency></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <groupId>junit</groupId></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <artifactId>junit</artifactId></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <version>3.8.1</version></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <scope>test</scope></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </dependency></span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><dependency></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">
<groupId>org.fitnesse</groupId></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <artifactId>fitnesse</artifactId></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> <version>20161106</version></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </dependency></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </dependencies></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"></project></span></div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: black; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Après on crée la classe Division dans le paquet org.cours.fitnesse comme suit</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> :</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #008575; font-family: "pt sans narrow"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Classe Division :</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">package org.cours.fitnesse;</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">public class Division {</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> private double numerateur, denominateur; </span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> public void setNumerateur(double numerateur) {</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">this.numerateur = numerateur;</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> }</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> public void setDenominateur(double denominateur) {</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">this.denominateur = denominateur;</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> } </span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> public double quotient() {</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">return numerateur/denominateur;</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> }</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">}</span></div>
<h1 dir="ltr" style="line-height: 1.56; margin-bottom: 0pt; margin-top: 24pt;">
<span style="background-color: transparent; color: #ff5e0e; font-family: "pt sans narrow"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline;">Configuration</span></h1>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Sous Eclipse, nous créons une nouvelle configuration appelée “Fitnesse” qui va nous permettre d’exécuter notre projet sous Fitnesse et dans laquelle nous allons redéfinir en cas de besoin le nouveau port d’exécution de Fitnesse.</span></div>
<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #ff5e0e; font-family: "pt sans narrow"; font-size: 18pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline;">Exécution</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Sous Eclipse, nous allons lancer l’exécution de la nouvelle configuration “Fitnesse”. Si tout marche bien, le serveur démarre sur le port en question (par défaut c’est le port 80). Nous allons ensuite ouvrir le navigateur sur l’adresse </span><a href="http://localhost/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">http://localhost:80</span></a><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">.</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><img height="327" src="https://lh5.googleusercontent.com/XSpggCfZHiSLBTBuhtbelepT9nE1gZaEa-zEPOcLK2NC4xheMLcuuKiXdEfpFIu-Nhzi0abUuNkbZ0joLcRV_amCPR2eM2BQYuArfNc-HGLJqyFgaveHFzSUn8-1bdl5BC0h3at8" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624" /></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Nous allons à ce niveau là créer notre page de test en appuyant sur le menu Edit en haut de page. La page suivante s’affiche.</span></div>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><img height="229" src="https://lh3.googleusercontent.com/1nCYRL73Q0ACRY29cPXmJeDo1K6xn765GEb8WErCsiETHvxZipbL5HeM5KBptTtkAVA4sDa6BHSDpcTdamMKUOdY8-1jCiRKrMwuHFIp2J3YpJAuHeWCY7H1nWMDiwGCus97BD98" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624" /></span></div>
<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">En haut de page, inscrivez le nom de votre page de test, on va saisir par exemple “TestDivision” et après vous cliquez sur le bouton “Save” en bas de page. La fenêtre va ressembler après à ça.</span></div>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><img height="333" src="https://lh6.googleusercontent.com/C4ky9suZnpxO8i3GcKswq65UbY_lpncwK47_jaDgoOhszTppd1kBtxS-d1OkIRs8Aar35iL1V831yFO845FY0yY9DFM1fFcSJ7H2O0LR-zIJVkQ7Ua5DozVQBJYPOCYUkyDWNwVl" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624" /></span></div>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Le nom de la page qu’on vient de créer s’ajout en haut de page avec un point d’interrogation (?) à la fin du nom. Nous cliquons sur le point d’interrogation pour configurer notre test. Nous allons importer le path de la target du projet ainsi que le package contenant la classe à tester, en plus de la classe de test qui est dans ce cas “Division”. Le tout doit être disposé comme suit.</span></div>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><img height="251" src="https://lh3.googleusercontent.com/T2hLV6bTVCN2UuN8n69qMd15fb3XlO4RKUvELJXC7ahxsy-rrOkzNL5i44tTvOVVxwlX7ZtUq8iaYqH9efYxxiLPE30aHYAHJInUTdDKG00Q2afiC7ecdDjYqpllx4c3Tk-tYrjb" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624" /></span></div>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Au niveau de cet éditeur nous allons créer la classe de test qui va ressembler à cette écriture:</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #008575; font-family: "pt sans narrow"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">TestDivision :</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">!contents -R2 -g -p -f -h</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">!define TEST_SYSTEM {slim}</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">!path /Users/khalidnafil/eclipse-workspace/Fitness/target/classes</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">!|Import|</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">|org.nafil.Fitness|</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">!|DivisionLook </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> |</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">|numerateur|denominateur|quotient?|</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">|16 </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> |2 </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> |8.0 </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> |</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-left: 36pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">|12 </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> |4 </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> |3.0 </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> |</span></div>
<br />
<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Après nous allons appuyer sur le bouton “save”. La fenêtre suivante va apparaître.</span></div>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><img height="297" src="https://lh5.googleusercontent.com/rZUpGw8vjoaamLPKWntzs04JY3Xqi5tF7VUlRZ-270Wi-viWOLU1IMdFkbTIUPCTx85sLfe-NjXN35b2OzwJZgyhkB74vK0glc-yj0PgXw9J288Mclt8onP79DnldI2bK5ZK5L4N" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624" /></span></div>
<br />
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Dans cette page on voit le nom de la classe, des deux attributs “numerateur” et “denominateur” ainsi que la méthode à tester “quotient” suivie du point ?. Juste en bas, apparaissent les deux lignes d’entrée pour ces deux attributs ainsi que le résultat attendu au niveau du quotient. En haut de cette page, on observe le bouton “Test”. C’est sur ce bouton que l’on va appuyer pour déclencher le test d’acceptation sous Fitnesse. C’est ainsi que la fenêtre suivante s’ouvrira.</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><a href="https://lh3.googleusercontent.com/dJZFmX9yWJiZThOT-QPBqAAVZcBY84vExYHZxG1LS44qlZW6Xkh1qrA7KntcT2AEPbG7YzgVRjoKgzklht3LHzKUYDhg-DwjWfeIz00xg6hVUGCZHFZTeRU4I_omFo_Fbo6wjSGH" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="344" src="https://lh3.googleusercontent.com/dJZFmX9yWJiZThOT-QPBqAAVZcBY84vExYHZxG1LS44qlZW6Xkh1qrA7KntcT2AEPbG7YzgVRjoKgzklht3LHzKUYDhg-DwjWfeIz00xg6hVUGCZHFZTeRU4I_omFo_Fbo6wjSGH" style="border: medium none; transform: rotate(0rad);" width="624" /></a> </span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Sur cette page, nous voyons que pour ce test les messages sont en vert ce qui veut dire que le test est passé avec succès comme attendu.</span><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Maintenant que le test marche et que Fitnesse est opérationnel vous pouvez revenir sur le site </span><a href="http://fitnesse.org/FitNesse.UserGuide" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">http://fitnesse.org/FitNesse.UserGuide</span></a><span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> pour de plus amples détails et descriptions sur les différentes autres fonctionnalités de cet outil pertinent.</span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"></span></div>
<div dir="ltr" style="line-height: 1.44; margin-bottom: 0pt; margin-top: 6pt;">
<br />
<span style="background-color: transparent; color: #695d46; font-family: "open sans"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> </span></div>
</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-49119562635519898492017-10-12T01:04:00.002-07:002019-12-20T11:55:30.220-08:00Rédaction d'un document Cahier des Charges<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: blue;">Comment rédiger un Cahier des Charges</span></h2>
<div>
<span style="color: blue;"><br /></span></div>
<div style="text-align: justify;">
Pour rédiger un document cahier des charges d'un projet logiciel ou autre, nous proposons cette template qui pourrait servir éventuellement comme guide. Il s'agit de définir successivement les points suivants : Contexte et définition du projet, Objectifs, Scope, Parties Prenantes, Description des besoins à répartir entre les besoins fonctionnels et non fonctionnels.</div>
<h3 style="text-align: left;">
<span style="color: #38761d;"><br /></span></h3>
<h3 style="text-align: left;">
<span style="color: #38761d;">
Contexte et définition du problème</span></h3>
<div style="text-align: justify;">
Dans cette rubrique, vous allez définir le problème pour bien clarifier la finalité du travail. <span style="text-align: justify;">Il est important de souligner aussi les besoins ainsi que les contraintes et ce de manière </span>très sommaire. Par exemple, vous pouvez exposer la situation actuelle ou futur de votre système tout en mettant l’accent sur les problèmes auxquels vous voulez faire face.<br />
<br /></div>
<h3 style="text-align: left;">
<span style="color: #38761d;">Objectifs</span></h3>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div style="text-align: left;">
<div style="text-align: justify;">
Après avoir exposé le problème dans la première partie, ici vous allez exprimer quelles sont les attentes et les résultats escomptés. Normalement ces attentes et résultats <span style="text-align: justify;">(objectifs du projet) doivent être quantifiables. Par exemple vous voudriez passer d’un </span>taux d’utilisation de 40 à 70%. Cela va vous permettre après de savoir si vous avez bien atteint les objectifs ou non.</div>
</div>
<h3 style="text-align: left;">
<span style="color: #38761d;"><br /></span></h3>
<h3 style="text-align: left;">
<span style="color: #38761d;">Périmètre</span></h3>
<div style="text-align: left;">
<div style="text-align: justify;">
Le <a href="https://knafil.blogspot.com/2017/10/scope-dun-projet.html" target="_blank">périmètre</a> (scope) d’un projet veut dire les limites que vous allez donner à votre projet. Vous pouvez par exemple à ce niveau bien identifier votre cible (target), est-ce que votre projet concerne les jeunes ou bien il est dédié uniquement aux enfants. Vous pouvez aussi souligner le type de plateforme (web, mobile, cloud etc). Un périmètre qui est bien défini va vous aider par après pour ne pas déborder sur les objectifs du projet et de se contenter uniquement du travail demandé.</div>
</div>
<h3 style="text-align: left;">
<span style="color: #38761d;"><br /></span></h3>
<h3 style="text-align: left;">
<span style="color: #38761d;">Parties prenantes</span></h3>
<div style="text-align: left;">
<div style="text-align: justify;">
Les parties prenantes (stakeholders) concernent toutes les parties qui ont un intérêt de près (direct) ou de loin (indirect) dans la réalisation de votre projet. Par exemple, si vous avez à réaliser une application de gestion de paiement de caisse au niveau d’un super marché, et que cette application va comptabiliser les ventes effectuées par les vendeurs à l’intérieur du super marché, alors les parties prenantes dans ce cas vont être : le caissier, le vendeur, le manager, etc. Il est important de connaître ses parties prenantes vu qu’ils va falloir les impliquer lors du recensement des besoins et donc lors de l’évaluation de votre projet.<br />
<h3>
<span style="color: #38761d; text-align: left;"><br /></span></h3>
<h3>
<span style="color: #38761d; text-align: left;">Description des besoins</span></h3>
</div>
</div>
<div style="text-align: left;">
<div style="text-align: justify;">
En principe on distingue deux types de besoins. Les besoins fonctionnels et les besoins non fonctionnels. On peut ajouter à cela les besoins d’ordre techniques (type de technologie utilisé, etc).<br />
<h4>
<span style="color: blue; text-align: left;"><br /></span></h4>
<h4>
<span style="color: blue; text-align: left;">Besoins fonctionnels</span></h4>
</div>
</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
<div style="text-align: left;">
<div style="text-align: justify;">
Les besoins fonctionnels concernent tous les besoins recensés soit par le client, les utilisateurs ou par les parties prenantes. Ces besoins ont un rapport direct avec le métier <span style="text-align: justify;">(business). Si par exemple votre projet consiste à réaliser une application mobile pour la </span>gestion du courrier électronique, alors un besoin fonctionnel pourrait être : envoyer un email.</div>
<div style="text-align: justify;">
Tous les besoins fonctionnels doivent être listés à ce niveau là en respectant par exemple la template suivante pour chacun de ces besoins :</div>
<div style="text-align: justify;">
<br /></div>
• Objectif<br />
• Description<br />
• Contraintes/règles de gestion<br />
• Priorité</div>
<h4 style="text-align: left;">
<span style="color: blue;"><br /></span></h4>
<h4 style="text-align: left;">
<span style="color: blue;">Besoins non fonctionnels</span></h4>
<div style="text-align: left;">
<div style="text-align: justify;">
Un besoin non fonctionnel n’est pas lié directement au métier. Il est plutôt lié aux normes de qualité en vigueur et aussi aux contraintes de réalisation. Par exemple, pour une application web, un besoin non fonctionnel pourrait être le temps de réponse d’une page web ne doit pas dépasser cinq secondes. Les besoins non fonctionnels en général sont définis comme étant des besoins de qualité. Ainsi, on peut avoir des besoins en terme de fiabilité, de robustness, de stabilité, etc. S’ils sont exprimés dans un document cahier des charges, c’est que on doit les prendre en considération lors de la réalisation de notre projet.</div>
<br />
<div style="text-align: justify;">
Voilà, j'espère que cela va pouvoir vous aider dans vos futurs travaux de rédaction de cahier des charges.</div>
</div>
</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com1tag:blogger.com,1999:blog-1913701376666139534.post-69013402119843501592017-10-12T00:45:00.003-07:002017-10-12T01:05:53.557-07:00Scope d'un projet<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Comment définir le Scope d'un projet</h2>
Le <b>Scope</b> ou Périmètre d'un projet est un point clé pour la réussite du dit projet. Il doit figurer parmi les éléments d'un document <a href="https://knafil.blogspot.com/2017/10/redaction-dun-document-cahier-des.html" target="_blank">cahier des charges</a> et partagé avec le Manager du projet, le Client ainsi que les parties prenantes.<br />
<br />
Pour bien définir le <b>Scope</b> d’un projet, il est opportun de définir les points suivants :<br />
<br />
<ul style="text-align: left;">
<li>Les objectifs du projet</li>
<li>Les buts ou finalités (goals) à atteindre</li>
<li>Les sous-phases ou étapes</li>
<li>Les tâches</li>
<li>Les ressources</li>
<li>Le budget</li>
<li>La planning</li>
</ul>
<br />
Bien sûr pour pouvoir ce faire, il est nécessaire d'élaborer une étude approfondie de la finalité du projet en concertation avec d’une part le client et d’autre part avec les parties-prenantes. Une fois ces points sont détaillés, il y a lieu après de clarifier les limitations du projet à savoir les points à inclure dans le projet et ceux à ne pas inclure.<br />
Il est à rappeler également que les objectifs du projet doivent respecter les critères <a href="https://fr.wikipedia.org/wiki/Objectif_(gestion_de_projet)" target="_blank">SMART</a>.</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-88022060159076737182017-09-08T11:21:00.002-07:002017-10-13T01:22:06.289-07:00Mon cours Introduction au Génie Logiciel<div dir="ltr" style="text-align: left;" trbidi="on">
Ce cours intitulé "<b>Introduction au Génie Logiciel</b>" est dispensé aux étudiants inscrits en deuxième année de la filière <b>IWIM</b> de l'<b>ENSIAS</b>. Le cours se déroule sur sept semaines à raison d'une séance de 3 heures par semaine. Les deux premières séances seront assurées totalement par le professeur. Lors de la première séance, des <b>ateliers</b> pratiques seront proposés aux étudiants à réaliser en binôme et qui sont consacrés à différentes thématiques qui relèvent des aspects pratiques du génie logiciel. Chaque <b>atelier</b> consiste à élaborer une présentation ppt de la thématique suivie d'un Tp animé par les étudiants concernés qui revient sur le processus d'installation ou de configuration de la technologie faisant l'objet de l'atelier ainsi qu'un mini projet pour pouvoir pratiquer et toucher aux aspects importants de la dite technologie. Les ateliers commencent à partir de la troisième séance du cours, toujours après la pause et peuvent s'étaler sur le reste de la séance en fonction de l'importance et la complexité de l'atelier.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0nlBGJTYiqJNUBe73yTT6_VPt7vsePgB4UC8Jj4oVIYzJbo5ROFK0TXf54NAPY7ofnrTz_EoHG3Sr7gpazfLq1K2CbLNPXB1O5bBivCDyK2jcUkLEmkqh5FZRrItEGvxcQwreeFIJB_w/s1600/Capture+d%25E2%2580%2599e%25CC%2581cran+2017-09-08+a%25CC%2580+20.25.34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="840" data-original-width="1133" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0nlBGJTYiqJNUBe73yTT6_VPt7vsePgB4UC8Jj4oVIYzJbo5ROFK0TXf54NAPY7ofnrTz_EoHG3Sr7gpazfLq1K2CbLNPXB1O5bBivCDyK2jcUkLEmkqh5FZRrItEGvxcQwreeFIJB_w/s320/Capture+d%25E2%2580%2599e%25CC%2581cran+2017-09-08+a%25CC%2580+20.25.34.png" width="320" /></a></div>
<br />
Pour ce qui est du cours, nous allons voir essentiellement tous les aspects importants de la discipline du génie logiciel à savoir la <b>problématique</b>, l'<b>historique</b> et la définition, la notion du <b>produit</b> et du <b>processus</b>, et les <b>modèles de cycle de vie</b>. Ce cours, je rappelle est l'un des cours fondamentaux pour bien comprendre l'écosystème lié à la réalisation d'un logiciel.<br />
En gros, on peut dire que ce cours est réparti en deux volets : théorique et pratique. La partie théorique va être assurée par le professeur tandis que la partie pratique elle va être assurée par les étudiants eux mêmes sous la supervision du professeur. Ce cours est une occasion à saisir par les étudiants pour renforcer leurs habiletés techniques, de communication et de collaboration, sachant que le développement d'un logiciel se pratique en équipe.<br />
Pour ce qui est des thématiques proposées, elles couvrent tout le cycle de développement d'un logiciel, telles que la gestion de la <b>documentation</b>, la gestion des <b>versions</b>, la gestion des <b>bugs</b>, la gestion des <b>projets</b>, etc. Je vous propose ci après une liste non exhaustive de ces thématiques : <b>Docbook</b>, <b>Ganttproject</b>, <b>Dotproject</b>, <b>Trello</b>, <b>Bugzilla</b>, <b>Cvs</b>, <b>Svn</b>, <b>Git</b>, <b>Bitbucket</b>, <b>Selenuim</b>, <b>Junit</b>, <b>Jenkins</b>, etc.<br />
Soyons tous au rendez-vous alors et bonne chance pour tout le monde. </div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-64591308195873187262016-12-18T13:41:00.002-08:002016-12-18T13:46:48.002-08:00Vers une nouvelle pédagogie universitaire<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Ce vendredi 16 Décembre 2016, j'ai eu l'occasion de participer aux journées pédagogiques qui ont eu lieu à la <a href="http://www.fsr.ac.ma/" target="_blank">Faculté des Sciences de Rabat</a> sous le thème "Vers une nouvelle pédagogie universitaire". J'ai dû alors animer une formation au profit de mes collègues enseignants ayant pour objet le "App Smashing".<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXLZMNcJ_Wp79udofW-0yKl0WKlsWZxWrzvZHzAGWpYuqUrAuZOqgf75b1SKDLHwzc5CrABYAOzE2lHJhiRw_dgRguYnAGCGqDj7WBVhr-tqPd3-pCzNsYBjUPFml8ykT95fK7bWutzD0/s1600/IMG_4070.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXLZMNcJ_Wp79udofW-0yKl0WKlsWZxWrzvZHzAGWpYuqUrAuZOqgf75b1SKDLHwzc5CrABYAOzE2lHJhiRw_dgRguYnAGCGqDj7WBVhr-tqPd3-pCzNsYBjUPFml8ykT95fK7bWutzD0/s320/IMG_4070.jpg" width="320" /></a></div>
<br />
Le "App Smashing"est une technique emergente qui consiste à utiliser et combiner plusieurs applications les unes avec les autres en vue de répondre à un objectif pédagogique spécifique. L'idée est de tirer profit de chaque application et intégrer le tout dans un seul processus pédagogique. En effet, chaque application remplit un service bien précis et on se trouve des fois dans des situations où notre application ne pourrait pas satisfaire nos besoins. On va alors chercher d'autres applications qui vont compléter la tâche. Le fonctionnement ressemble alors à une sorte de workflow, une première application sucite une entrée pour produire après une sortie, la sortie de la première application devient l'entrée de la deuxième application et ainsi de suite.<br />
Durant cet atelier de formation, l'objectif pédagogique était de produire une fiche sous forme de poster où on va exposer les pionneirs du génie logiciel. Chaque image est un ainsi repérée par un tag cliquable qui nous renvoie vers la page web biographie de l'auteur. La fiche finale correspond à <a href="https://www.thinglink.com/scene/866265525301280771" target="_blank">l'image suivante</a> <img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/866265525301280771/1024/10/scaletowidth#tl-866265525301280771;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>.<br />
Pour ce faire, nous avons utilisé les applications suivantes : <a href="https://www.canva.com/" target="_blank">canva</a> (pour produire l'ensemble des images sur un seul support), <a href="https://evernote.com/intl/fr/skitch/" target="_blank">skitch</a> (pour annoter les images chacune par le nom de l'auteur), <a href="https://www.thinglink.com/" target="_blank">Thinglink</a> pour associer aux différentes images des ressources supplémentaires, dans notre cas des liens webs).</div>
<span style="background-color: #bd081c; background-position: 3px 50%; background-repeat: no-repeat no-repeat; background-size: 14px 14px; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: none; color: white; cursor: pointer; display: none; font-family: "helvetica neue" , "helvetica" , sans-serif; font-size: 11px; font-style: normal; font-weight: bold; left: 193px; line-height: 20px; opacity: 1; padding: 0px 4px 0px 0px; position: absolute; text-align: center; text-indent: 20px; top: 90px; width: auto; z-index: 8675309;">Enregistrer</span><span style="background-color: #bd081c; background-position: 3px 50%; background-repeat: no-repeat no-repeat; background-size: 14px 14px; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: none; color: white; cursor: pointer; display: none; font-family: "helvetica neue" , "helvetica" , sans-serif; font-size: 11px; font-style: normal; font-weight: bold; left: 193px; line-height: 20px; opacity: 1; padding: 0px 4px 0px 0px; position: absolute; text-align: center; text-indent: 20px; top: 90px; width: auto; z-index: 8675309;">Enregistrer</span><span style="background-color: #bd081c; background-position: 3px 50%; background-repeat: no-repeat no-repeat; background-size: 14px 14px; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: none; color: white; cursor: pointer; display: none; font-family: "helvetica neue" , "helvetica" , sans-serif; font-size: 11px; font-style: normal; font-weight: bold; left: 193px; line-height: 20px; opacity: 1; padding: 0px 4px 0px 0px; position: absolute; text-align: center; text-indent: 20px; top: 90px; width: auto; z-index: 8675309;">Enregistrer</span><span style="background-color: #bd081c; background-position: 3px 50%; background-repeat: no-repeat no-repeat; background-size: 14px 14px; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: none; color: white; cursor: pointer; display: none; font-family: "helvetica neue" , "helvetica" , sans-serif; font-size: 11px; font-style: normal; font-weight: bold; left: 193px; line-height: 20px; opacity: 1; padding: 0px 4px 0px 0px; position: absolute; text-align: center; text-indent: 20px; top: 90px; width: auto; z-index: 8675309;">Enregistrer</span>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-51557405587344702532016-03-25T13:01:00.000-07:002018-02-06T01:54:41.829-08:00Les cartes CRC pour l'analyse des classes UML<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: blue;"><span style="color: #38761d;">Les cartes CRC</span></span></h2>
Un système Orienté Objet (OO), est un système constitué par un ensemble d'objets qui collaborent et communiquent par envoi de messages. Lorsqu'un objet envoie un message à un autre objet, c'est que en réalité il demande un service à cet objet, ce dernier doit rendre son service public et faire en sorte de l'offrir à ses collaborateurs. Plusieurs services sont définis et offerts par le système OO.<br />
La collaboration s'avère alors comme un principe fondamental des systèmes OO. UML, étant un langage de modélisation des systèmes OO, offre un outil qui permet la modélisation de la Collaboration. Cet outil portant le nom de Collaboration est représenté pare une ellipse en pointillées. <br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI1h1VDg8slpcPc-u6KXsZ09VPIpUU3bZf_g_TSH9BlwTizqqYGcxi2QJJjtthk_PHAlkrqNGqQtdjr2Q_Ra3fES3LJ9L5ns_biDs0e7dwK_uMLPYgzWM63AAFM6Lcfpdz2ha1YDoGVBc/s1600/Capture+d%2527e%25CC%2581cran+2016-03-25+10.41.14.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI1h1VDg8slpcPc-u6KXsZ09VPIpUU3bZf_g_TSH9BlwTizqqYGcxi2QJJjtthk_PHAlkrqNGqQtdjr2Q_Ra3fES3LJ9L5ns_biDs0e7dwK_uMLPYgzWM63AAFM6Lcfpdz2ha1YDoGVBc/s1600/Capture+d%2527e%25CC%2581cran+2016-03-25+10.41.14.png" /></a></td></tr>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<tr><td class="tr-caption" style="text-align: center;">La Collaboration en UML</td></tr>
</tbody></table>
Lors de l'Analyse d'un Système d'Information, il est important de relever toutes les entités "Classes" potentielles dans un premier temps. On peut dans ce cas utiliser une heuristique très simple qui consiste à identifier les noms communs (Classes) ou les noms propres (Objets) utilisés pour décrire le problème et peut être encore la solution. Ces noms vont être collectés et filtrés pour enlever d'éventuelles redondances.<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9mMsQoF9GaTVJUeNUAq89IVmfZB1BQggQku_C_SmfHR2XKdh5ksUigEN5UmGMxZHRHktOftqFjZMFu2N2Bh7phSxgSVG1IpY7e8flN91bs9_neHbxyguSHZUXvdyXkI4zxFsS4Dpxtpc/s1600/Capture+d%2527e%25CC%2581cran+2016-03-25+18.38.45.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9mMsQoF9GaTVJUeNUAq89IVmfZB1BQggQku_C_SmfHR2XKdh5ksUigEN5UmGMxZHRHktOftqFjZMFu2N2Bh7phSxgSVG1IpY7e8flN91bs9_neHbxyguSHZUXvdyXkI4zxFsS4Dpxtpc/s320/Capture+d%2527e%25CC%2581cran+2016-03-25+18.38.45.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Le modèle d'une carte CRC</td></tr>
</tbody></table>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Une fois que les classes sont identifiées on procède alors à identifier pour chacune d'elles quelles sont ses responsabilités ainsi que ses collaborateurs. En se référant au principe de l'Encapsulation toute classe est responsable de fournir un certain nombre de services. Par exemple la classe Etudiant est responsable de nous fournir des renseignements sur le nom, le prénom et l'âge de l'étudiant. Dans certains cas, une classe étant responsable de fournir des renseignements précis est incapable de se faire toute seule et est obligée alors de collaborer avec d'autres classes pour répondre à cette exigence.<br />
Pour identifier les responsabilités d'une classe, il suffit de poser la question suivante : la classe connaît des choses et sait faire des choses. La classe Etudiant connaît par exemple son nom et prénom et sait s'inscrire à un séminaire. La responsabilité d'une classe définit ce que la classe connaît et ce qu'elle sait faire. Pour bien analyser les responsabilités d'une classe UML on peut recourir à utiliser la technique des cartes CRC. Une carte CRC se présente comme une carte qui peut faire 7 x 11 cm ou 6 x 9 cm ou n'importe quelle autre taille. Elle comporte trois rubriques essentielles qui sont la rubrique classe (nom de la classe), la rubrique Responsabilités, où l'on va énumérer les différentes responsabilités de la classe, et la rubrique Collaborateurs qui va contenir le nom des classes avec qui notre classe va collaborer pour assurer ses responsabilités.<br />
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<h2 style="text-align: left;">
<span style="color: blue;"><span style="color: #38761d;">Exemple</span></span></h2>
<div class="p1">
<span class="s1">On suppose qu'une </span>Université souhaite gérer les cours dispensés dans plusieurs établissements. Pour cela, on dispose des renseignements suivants :</div>
<div class="p1">
<span class="s1">•</span> Chaque <span style="color: red;">établissement</span> possède un site Internet.</div>
<div class="p1">
<span class="s1">•</span> Chaque établissement est structuré en <span style="color: red;">départements</span>, qui regroupent chacun des enseignants spécifiques. Parmi ces enseignants, l’un d’eux est responsable du département.</div>
<div class="p1">
<span class="s1">•</span> Un <span style="color: red;">enseignant</span> se définit par son nom, prénom, tél, mail, date de prise de fonction et son grade.</div>
<div class="p1">
<span class="s1">•</span> Chaque enseignant ne dispense qu’une seule matière.</div>
<div class="p1">
<span class="s1">•</span> Les étudiants suivent quant à eux plusieurs matières et reçoivent une <span style="color: red;">note</span> pour chacune d’elle.</div>
<div class="p1">
<span class="s1">•</span> Pour chaque <span style="color: red;">étudiant</span>, on veut gérer son nom, prénom, tél, mail, ainsi que son année d’entrée à l’établissement.</div>
<div class="p1">
<span class="s1">•</span> Une <span style="color: red;">matière</span> peut être enseigné par plusieurs enseignants, mais a toujours lieu dans la même <span style="color: red;">salle</span> de cours (chacune ayant un nombre de places déterminées).</div>
<div class="p1">
<span class="s1">•</span> On désire pouvoir calculer la moyenne par matière ainsi que par département.</div>
<div class="p1">
<span class="s1">• </span>On veut également calculer la moyenne générale d’un élève et pouvoir afficher les matières dans lesquelles il n’a pas été noté.</div>
<div class="p1">
<span class="s1">•</span> Enfin, on doit pouvoir imprimer la fiche signalétique (prénom, tél, mail) d’un enseignant ou d’un élève.</div>
<div class="p1">
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Nous voulons alors analyser ce système en utilisant l'outil carte CRC. Pour ce faire nous allons commencer par analyser le texte en utilisant l'heuristique décrite en haut. Les noms communs sont alors mis en rouge. On observe alors qu'il y a sept classes en tout (Etablissement, Département, Enseignant, Etudiant, Matière, Note, Salle).</div>
<div class="p1">
L'étape suivante consiste à produire les cartes CRC par classe d'analyse.<br />
<h2 style="text-align: left;">
<span style="color: blue;"><span style="color: #38761d;">Analyse CRC</span></span></h2>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYjtXw2ZLfRa_XCB8V53QcTtLGlceR2NWcwsT178YgzBYF6QItKCSnUKKD_EH8RD9uspuWNHietAAf7tJ2Q51kYcogV5LGO8MDTohbc7s0v1ZNNdfTH1bloZ3AxdGTJRntlYzP1zeoJUc/s1600/Capture+d%2527e%25CC%2581cran+2016-03-26+16.37.24.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYjtXw2ZLfRa_XCB8V53QcTtLGlceR2NWcwsT178YgzBYF6QItKCSnUKKD_EH8RD9uspuWNHietAAf7tJ2Q51kYcogV5LGO8MDTohbc7s0v1ZNNdfTH1bloZ3AxdGTJRntlYzP1zeoJUc/s320/Capture+d%2527e%25CC%2581cran+2016-03-26+16.37.24.png" width="320" /></a>On commence par la classe Etablissement qui connaît son site Internet, donc le site Internet fait désormais partie des responsabilités de cette classe. D'autre part la classe Etablissement sait lister ses départements et du coup elle va figurer parmi les responsabilités de cette classe sauf que dans ce cas la classe Etablissement (principe de l'Encapsulation) va collaborer avec la classe Département pour pouvoir lister ses départements. On aura donc la carte CRC suivante :<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhERg_HwXzZiz8o1iMcZe4ZyeKgpbe-p0pmhxmciDEcEPicaU5FA3OlSmM7EcizSRHLJ6N_C-gbGS-A5ihx8OFFgGDdSKA9F_TLxVpGqhBdHkniIOBRDKHnYm4GxbSA1vHZnjHXc1DqNh0/s1600/Capture+d%2527e%25CC%2581cran+2016-03-26+16.45.31.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhERg_HwXzZiz8o1iMcZe4ZyeKgpbe-p0pmhxmciDEcEPicaU5FA3OlSmM7EcizSRHLJ6N_C-gbGS-A5ihx8OFFgGDdSKA9F_TLxVpGqhBdHkniIOBRDKHnYm4GxbSA1vHZnjHXc1DqNh0/s320/Capture+d%2527e%25CC%2581cran+2016-03-26+16.45.31.png" width="320" /></a><br />
<br />
Si on prend la classe Département alors on peut considérer le nom du département, les enseignants du dit département ainsi que son responsable comme étant les responsabilités de cette classe. Par ailleurs, pour que Département puisse nous fournir des informations détaillées sur ses enseignants ainsi que sur son responsable, alors elle doit nécessairement collaborer avec la classe Enseignant. De ce fait on va avoir la carte suivante :</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" data-ad-client="ca-pub-4680017041329825" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="9268146866" style="display: block; text-align: center;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-61091112067902724782016-03-21T09:02:00.001-07:002016-03-21T09:02:25.736-07:00Le Développement Personnel et Professionnel via Twitter<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpPkefs8XlqbqofVCKOdt7cPCPtJsiPPXXtDAdl0gRoU41renW4pshWzGq-yXKHs6Sae_zElaGZcySEiehrpVn4e2ElLHSU39FjqXRAz75KrUXrWLv3NUZxyn4ZN23tBIJS1lWJWqRmP4/s1600/twitter.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpPkefs8XlqbqofVCKOdt7cPCPtJsiPPXXtDAdl0gRoU41renW4pshWzGq-yXKHs6Sae_zElaGZcySEiehrpVn4e2ElLHSU39FjqXRAz75KrUXrWLv3NUZxyn4ZN23tBIJS1lWJWqRmP4/s200/twitter.png" title="Twitter" width="200" /></a></div>
<a href="https://www.twitter.com/" target="_blank">Twitter</a> est l'un des réseaux sociaux qui se développent de plus en plus et qui a gagné la confiance des différentes communautés qui oeuvrent dans plusieurs domaines tels que l'Education, le Sport, la Politique et autres. Dans le domaine de l'Education, <a href="https://www.twitter.com/" target="_blank">Twitter</a> se positionne depuis un certain nombre d'années comme le réseau social le plus exploité pour des fins d'apprentissage et d'enseignement selon des sondages effectués par le "<a href="http://c4lpt.co.uk/directory/top-100-tools/" target="_blank">Centre for Learning & Performance Technologies</a>".<br />
<br />
En effet, <a href="https://www.twitter.com/" target="_blank">Twitter</a> offre plusieurs opportunités pour les communautés d'usage et se présente comme un formidable <a href="https://en.wikipedia.org/wiki/Personal_learning_network" target="_blank">PLN</a>. Plusieurs utilisations de <a href="https://www.twitter.com/" target="_blank">Twitter</a> sont alors possibles pour affiner son profile aussi bien personnel que professionnel. Un de ces usages est bien le chat sur <a href="https://www.twitter.com/" target="_blank">Twitter</a>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5Uey_JLQ1OaGwGNBAWBfU59Kykv0m_FHCZ_2b_gXmCr6GmDWtf_eeOXPboDVZAL84FAvthKCMK94atEaQkYI3rE6QMgKcdERITGEUECQ43ixlulFOJ4Y_SHEGi2zRQmNx3ra7D8-3Lcc/s1600/twitterChat.jpeg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5Uey_JLQ1OaGwGNBAWBfU59Kykv0m_FHCZ_2b_gXmCr6GmDWtf_eeOXPboDVZAL84FAvthKCMK94atEaQkYI3rE6QMgKcdERITGEUECQ43ixlulFOJ4Y_SHEGi2zRQmNx3ra7D8-3Lcc/s1600/twitterChat.jpeg" title="Twitter chat" /></a></div>
<br />
Un chat sur <a href="https://www.twitter.com/" target="_blank">Twitter</a> désigne tout simplement un rassemblement de communautés autour d'une thématique donnée. Le chat est unique et est identifié par un <a href="https://fr.wikipedia.org/wiki/Hashtag" target="_blank">hashtag</a> (#). L'idée est que des personnes abonnées à <a href="https://www.twitter.com/" target="_blank">Twitter</a> vont se réunir autour du dit chat pour discuter des questions qui touchent à leurs domaines et centres d'intérêts. Pour chaque chat il doit y avoir un modérateur qui va veiller sur le bon déroulement du chat et faire le nécessaire pour sa promotion. Plusieurs modèles sont alors disponibles. L'un de ces modèles et qui est le plus classique consiste à lancer le chat une fois par semaine et en moyenne pendant une heure. Les questions sont préparées à l'avance et le modérateur fait en sorte de lancer chaque question au moment opportun. Les participants chacun de son côté essaie de contribuer au chat en postant des réponses ou des ressources. A l'issue de l'heure allouée au chat, le modérateur remercie les participants et un autre rendez-vous est fixé pour le prochain chat, toujours même heure même jour. Une liste exhaustive de chats peut être consultée <a href="https://sites.google.com/site/twittereducationchats/education-chat-official-list" target="_blank">ici</a>.<br />
.</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-45655517270326162932015-11-11T14:17:00.000-08:002017-10-13T01:23:42.407-07:00Usage de la Technologie Padlet en classe de Génie Logiciel<div dir="ltr" style="text-align: left;" trbidi="on">
Dans ce billet je vous présenterai l'usage de l'outil <a href="http://padlet.com/" target="_blank">Padlet</a> en classe de Génie Logiciel. Le processus que nous étions entrain d'étudier est le processus des revues techniques formelles. On considère que un producteur (producer) vient de terminer son travail qu'il va soumettre au responsable des revues. Ce dernier va adresser le travail soumis à deux reviewers en vue de dégager les anomalies, erreurs ou autres. Après un certain temps fixé à l'avance une réunion a lieu pour décider si le travail va être accepté ou non. J'ai alors réparti les étudiants en groupe de quatre et j'ai demandé qu'ils réalisent un jeu de simulation du processus des revues techniques formelles. Ils doivent se répartir les tâches et les rôles. Pour bien s'organiser j'ai demandé qu'ils utilisent la suite Google Apps pour les échanges. Avant de commencer, chaque groupe doit déclarer publiquement ses membres ainsi que son document qu'il va soumettre à l'épreuve de la revue. Pour ce faire, j'ai proposé d'utiliser Padlet pour tout ce qui est communication en classe entre les différents groupes. Les étudiants vont aussi adopter une démarche projet et utiliser l'outil GanttProject pour le travail de planification.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYXpd_K_SbArJh5UEfCvq1D-XdbvoBGfcMBfOLm90KN9CK2VUWMQAbp0pSWczaAs8XhoFPOUcXsPdbm6J16fNsW72bOxjcTuAEQf918jyUhGpsyX_UUsslrXRY_KrMozhroeym7WsPOvo/s1600/Capture+d%2527e%25CC%2581cran+2015-12-20+09.06.53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYXpd_K_SbArJh5UEfCvq1D-XdbvoBGfcMBfOLm90KN9CK2VUWMQAbp0pSWczaAs8XhoFPOUcXsPdbm6J16fNsW72bOxjcTuAEQf918jyUhGpsyX_UUsslrXRY_KrMozhroeym7WsPOvo/s320/Capture+d%2527e%25CC%2581cran+2015-12-20+09.06.53.png" width="320" /></a></div>
Pour accéder au mur sur Padlet, veuillez suivre ce lien <a href="http://padlet.com/knafil/revues">http://padlet.com/knafil/revues</a></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-80778383230145134762015-11-03T22:30:00.004-08:002015-11-03T22:30:58.410-08:00Formation sur l'Usage Pédagogique des Outils Informatiques<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;">Cette formation </span><span style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px;">est organisée au profit des enseignants de la Faculté de Droit de Salé. Le but est d'offrir aux enseignants l'opportunité d'utiliser avec efficacité les outils informatiques pour des fins pédagogiques. Le développement des outils informatiques et des applications logicielles enregistre des progrès remarquables que se soit au niveau des applications web ou des applications mobiles. Cette action s'inscrit dans une perspective visant à aligner les enseignements classiques avec le bon usage des outils informatiques. La formation va porter sur deux axes à savoir l'axe des applications web et celui des applications mobiles. Les enseignants seront invités à élaborer des scénarios pédagogiques classiques et puis on va essayer de projeter les scénarios sur les compétences requises des étudiants et là on pense aux compétences du 21ème siècle, à savoir entre autres les compétences de la communication, la collaboration, la créativité, l'innovation, la résolution de problèmes, la pensée critique et j'en passe. En fonction des compétences ciblées on va essayer de proposer les outils informatiques appropriés pour satisfaire telle ou telle compétence. Pour plus de renseignement quant à cette formation, suivez nous sur notre page Facebook officielle : <a href="https://www.facebook.com/knafil">https://www.facebook.com/knafil</a></span></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-35365931697054439112015-10-21T14:13:00.003-07:002017-10-13T01:25:01.800-07:00Rédaction du document Cahier des Charges en Génie Logiciel<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<h2 style="text-align: left;">
Jeu du Client et Développeur </h2>
L'une des étapes les plus importantes lors du développement d'un logiciel est l'étape qui consiste à bien mener le processus de communication ayant pour but de produire le document cahier des charges. Ce document est censé représenté de manière précise les exigences du client. Pour faire apprendre aux étudiants le déroulement de ce processus dans mon cours de Génie Logiciel, j'ai demandé aux étudiants de travailler par équipe. Chaque équipe est constituée de quatre étudiants qui vont jouer deux contre deux. Chaque binôme va jouer le rôle du Client et du Développeur. Dans un premier temps chaque binôme va penser à une application qu'il veut réaliser, ensuite il va essayer de produire un document cahier des charges où il va essayer de décrire de sa propre manière les fonctionnalités de l'application qu'il va partager après avec l'autre binôme qui jouera le rôle du développeur. Le but de cette activité est de pouvoir relever les différents problèmes liés à la description d'un logiciel.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgphZ9KsEazJShjnENO4ojTPbLALTuEiOLrsLvgw9zTYmKdx8CsGdCzMSSN0_aDO-iQmioIUIZ136PxW_gbx3n2jVi8_Cwp37bRZgVEZ09YrNkYh8gxkZuwxig5tAKv2jkJCz5w8CK1DZ8/s1600/2015-10-21+09.45.48.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgphZ9KsEazJShjnENO4ojTPbLALTuEiOLrsLvgw9zTYmKdx8CsGdCzMSSN0_aDO-iQmioIUIZ136PxW_gbx3n2jVi8_Cwp37bRZgVEZ09YrNkYh8gxkZuwxig5tAKv2jkJCz5w8CK1DZ8/s320/2015-10-21+09.45.48.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Liste des applications sélectionnées par les étudiants</td></tr>
</tbody></table>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-85500202964500740742015-09-13T05:54:00.001-07:002015-09-13T05:54:15.101-07:00Evolution dans le temps de l'usage de la Technologie en Classe<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
L'usage de le technologie en classe gagne de plus en plus de terrain surtout dans le monde occidental où la technologie est largement adoptée dans le cursus de formation, notamment aux Etats-Unis et en Europe. Le poster graphique en bas explique l'évolution naturelle dans le temps de l'usage qu'on fait de la technologie en classe. Comme on peut le constater, les classes de 2025 ce sont des classes virtuelles complètement numériques où l'apprentissage pourrait être personnalisé et le contenu partagé avec tout le monde.</div>
<a href="http://elearninginfographics.com/classroom-tech-evolves-infographic/" title="How Classroom Tech Evolves Infographic"><img alt="How Classroom Tech Evolves Infographic" class="attachment-progression-single-uncropped wp-post-image" src="http://elearninginfographics.com/wp-content/uploads/How-Classroom-Tech-Evolves-Infographic.png" height="4261" width="600" /></a><br />
<small>Find more <a href="http://elearninginfographics.com/" title="The No.1 Source for the Best Education Infographics">education infographics</a> on e-Learning Infographics</small></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-36219942586017303632015-03-14T07:44:00.005-07:002015-03-14T10:21:07.374-07:00Digital Learning Day 2015<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Le 13 mars de chaque année on célèbre le "<a href="http://www.digitallearningday.org/" target="_blank">Digital Learning Day</a>" principalement aux États Unis et dans d'autres pays du monde. L'idée est de sensibiliser les élèves, les étudiants, les parents à l'importance d'intégrer la technologie numérique dans aussi bien les apprentissages que les enseignements.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.digitallearningday.org/" target="_blank"><img alt="" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDM-ajuS77CL51vFqCHUzEdWzxpTcXH4djxBTwfa8zMSbFj6aM6djf-ofx-fzNe9EjYNzEd0R1jrTFrNpEYaL-RoFuix-WM78ueOtMvPcGHEQe-X8RSu7JQIAizXIivmgWAwP8mzUGczc/s1600/DLD_logo.png" height="46" title="" width="320" /></a></div>
Cette semaine, j'enseigne des groupes variés d'étudiants inscrits en licence, master et doctorat toute option confondue. J'ai alors célèbré cette journée avec mes étudiants en leur demandant chacun en fonction de sa spécialité de faire de la production numérique et de la partager après avec leurs communautés respectives.<br />
<h3 style="text-align: left;">
Licence et Doctorat</h3>
Pour les étudiants inscrits en licence ou en doctorat, le travail consiste à s'approprier une identité numérique à travers la création de blog et la promotion de sa personne sur le web. Pour le blog, j'ai demandé aux étudiants d'utiliser soit <a href="http://www.blogger.com/" target="_blank">Blogger</a> soit <a href="http://www.wordpress.com/" target="_blank">Wordpress</a> qui sont deux technologies gratuites, répandues et faciles à utiliser. Il est important que nos étudiants puissent disposer de leur espace de production personnel. Un espace dans lequel ils peuvent s'exprimer autour de plusieurs choses : les apprentissages, les nouvelles technologies, les domaines d'intérêts, les aspirations, etc. De nos jours, la production et la publication sur Internet s'impose de plus en plus. Par ailleurs, forger sa propre identité numérique permettra aux étudiants de s'inscrire dans l'évolution numérique actuelle et d'atteindre des communautés diversifiées où l'échange, l'apprentissage et le partage sont la monnaie courante. Un des services que j'ai ainsi recommandé pour mes étudiants est le service <a href="http://about.me/">about.me</a>. L'intérêt de ce service est de pouvoir donner un aperçu sur la personne, de présenter son parcours académique que professionnel et de publier aussi l'ensemble de ses réseaux sociaux et ce sur une seule page web. Dans ce qui suit je vous présente quelques réalisations de mes étudiants à cette occasion du digital learning day.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWNbqutZB-x4FBTeamsFzmXufEt6o8ftNvdiPDeIjtJVdFwY9w9GgjYwSpyuqvy27A-GDQogQvi3bqREa2Ns__aCY3YsquwKw7f5WzEHYNitCv9qRpKWFMdgRd1ArZx6_6vAqs_Hz67Yw/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.24.44.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWNbqutZB-x4FBTeamsFzmXufEt6o8ftNvdiPDeIjtJVdFwY9w9GgjYwSpyuqvy27A-GDQogQvi3bqREa2Ns__aCY3YsquwKw7f5WzEHYNitCv9qRpKWFMdgRd1ArZx6_6vAqs_Hz67Yw/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.24.44.png" height="159" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pages des étudiants sur about.me</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
Pour consulter les pages sur about.me ou les blogs respectifs des étudiants, veuillez suivre les liens ci dessous :</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://about.me/belahsenmohamed">http://about.me/belahsenmohamed</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://bbelsen.blogspot.com/">http://bbelsen.blogspot.com/</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.about.me/s.chaik">http://www.about.me/s.chaik</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a class="word-wrap" href="http://www.saifchaik.blogspot.com/" style="color: #3784d3; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; text-decoration: none;" target="_blank">http://www.saifchaik.blogspot.com</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a class="word-wrap" href="http://about.me/s.ennasri" style="color: #3784d3; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; text-decoration: none;" target="_blank">http://about.me/s.ennasri</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a class="word-wrap" href="http://sennasri.blogspot.com/" style="color: #3784d3; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; text-decoration: none;" target="_blank">http://sennasri.blogspot.com/</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a class="word-wrap" href="http://islamicfinance15.blogspot.com/" style="color: #3784d3; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; text-decoration: none;" target="_blank">http://islamicfinance15.blogspot.com/</a></div>
<a class="word-wrap" href="http://about.me/anas_melloul" style="color: #3784d3; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; text-decoration: none;" target="_blank">http://about.me/anas_melloul</a><br />
<div class="separator" style="clear: both; text-align: left;">
<a class="word-wrap" href="http://about.me/otmane.mokhtari" style="color: #3784d3; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; text-decoration: none;" target="_blank">http://about.me/otmane.mokhtari</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a class="word-wrap" href="http://stresstest9.blogspot.com/" style="color: #3784d3; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px; text-decoration: none;" target="_blank">http://stresstest9.blogspot.com/</a></div>
<a href="http://about.me/saber.mouna">http://about.me/saber.mouna</a><br />
<h3 style="text-align: left;">
Master</h3>
<div class="separator" style="clear: both; text-align: left;">
Pour cette classe, mes étudiants sont très liés et initiés à la technologie. Pour célébrer la journée du digital learning day, nous avons dû travailler sur deux technologies à savoir <a href="http://www.thinglink.com/" target="_blank">Thinglink</a> et <a href="https://www.smore.com/" target="_blank">Smore</a>. La première, <a href="http://thinglink.com/" target="_blank">Thinglink</a>, est une technologie innovante qui permet d'enrichir une image avec d'autres ressources de type texte, image, vidéo et audio. Ainsi, sur un même support on peut ajouter autant d'informations et de ressources que l'on veut. La deuxième technologie, <a href="https://www.smore.com/" target="_blank">Smore</a>, nous permets de produire des flyers numériques et de se les partager sur les différents réseaux sociaux.</div>
<h3 style="text-align: left;">
Atelier pratique lors du #DLDay</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigryfcHZKSo9WVtSiYJYAYTKzjyozvgQWp2EHNsZi3Kbm2J5uNleSC-ZXarpOSMnI3wbN-N3OAbVlXCFevUlSHDwS_yNRuvasLVjjta42EC0D8NqxLZH5G2q8lyz-9gkuigMlN_PRu6DE/s1600/dlday1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigryfcHZKSo9WVtSiYJYAYTKzjyozvgQWp2EHNsZi3Kbm2J5uNleSC-ZXarpOSMnI3wbN-N3OAbVlXCFevUlSHDwS_yNRuvasLVjjta42EC0D8NqxLZH5G2q8lyz-9gkuigMlN_PRu6DE/s1600/dlday1.jpg" height="239" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirqcGp6jz7BJqLQQ1b_vlP2kcTS1M_VGIQFcgN7cx2-tn5oSePeO_F1_CATzPQdHcr341zmbC02nw-krU2twnBmsmIxBJGFfiBqJMG6FVVdM0Ta0Aq-08CPwmW6WcqzxGxZy0Ev30rYxQ/s1600/dlday2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirqcGp6jz7BJqLQQ1b_vlP2kcTS1M_VGIQFcgN7cx2-tn5oSePeO_F1_CATzPQdHcr341zmbC02nw-krU2twnBmsmIxBJGFfiBqJMG6FVVdM0Ta0Aq-08CPwmW6WcqzxGxZy0Ev30rYxQ/s1600/dlday2.jpg" height="239" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68l_XNCEZK9oPTjl8nSDnIRsu7axKprRCKkArDh_pm_4dZUQe6srQ2fQ4abqNIKwc8yWE7sZ65KotFGc862rc6y98IDiEEW1HhDcHtSBfnYwE_T35uC6NEAjQPQYLpo_11p5ZGJQhAJE/s1600/dlday5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68l_XNCEZK9oPTjl8nSDnIRsu7axKprRCKkArDh_pm_4dZUQe6srQ2fQ4abqNIKwc8yWE7sZ65KotFGc862rc6y98IDiEEW1HhDcHtSBfnYwE_T35uC6NEAjQPQYLpo_11p5ZGJQhAJE/s1600/dlday5.jpg" height="239" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3B9HN1am-4yxeN-Nt8t-H0obyOovOuphTkXYsNcjiP1Qmn0LwGfZgd8j_1_UCMkBQQCNK-y7z0_ZU65zDath0vzx-1SXwk5Q_OkM_3-FzwdySZrZrQ9VYrIXlKNx2mzxLi78-j6RPfZY/s1600/dlday6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3B9HN1am-4yxeN-Nt8t-H0obyOovOuphTkXYsNcjiP1Qmn0LwGfZgd8j_1_UCMkBQQCNK-y7z0_ZU65zDath0vzx-1SXwk5Q_OkM_3-FzwdySZrZrQ9VYrIXlKNx2mzxLi78-j6RPfZY/s1600/dlday6.jpg" height="239" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSw9SBHa8eTXIFFO9VqJuPcfOcf48Hnmt4OMpNnNV-R4R0_g-iXIhRJoSNgoLJHTv93-DcCyy8NoNHlJs6ht2CEbZ1dURfPAs20Wi0wi5RrZh3dcww2HR5XAjdsCrQaRr7-ulU5e6MxCw/s1600/dlday9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSw9SBHa8eTXIFFO9VqJuPcfOcf48Hnmt4OMpNnNV-R4R0_g-iXIhRJoSNgoLJHTv93-DcCyy8NoNHlJs6ht2CEbZ1dURfPAs20Wi0wi5RrZh3dcww2HR5XAjdsCrQaRr7-ulU5e6MxCw/s1600/dlday9.jpg" height="239" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLh2SmXEucx7XEdFiDIq0jcWUu4EN9_bXMuKMWMK3aKh80XUf8Uf2weBDHdqrJ_3O-NK8ZIuYLEbkSs8ENpqnx41eipzSVMOvEg24gBQvpZfWiELy0LEZAWyM9N3DgDX7zg4jSf2JN4FA/s1600/dlday12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLh2SmXEucx7XEdFiDIq0jcWUu4EN9_bXMuKMWMK3aKh80XUf8Uf2weBDHdqrJ_3O-NK8ZIuYLEbkSs8ENpqnx41eipzSVMOvEg24gBQvpZfWiELy0LEZAWyM9N3DgDX7zg4jSf2JN4FA/s1600/dlday12.jpg" height="239" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Thinglink</h3>
<div class="separator" style="clear: both; text-align: left;">
Je vous laisse découvrir les réalisations de mes étudiants à base de la technologie <a href="http://thinglink.com/" target="_blank">Thinglink</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/633033182425382914/1024/10/scaletowidth#tl-633033182425382914;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/633067541371027458/1024/10/scaletowidth#tl-633067541371027458;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/633014207285035010/1024/10/scaletowidth#tl-633014207285035010;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/633087187600015362/1024/10/scaletowidth#tl-633087187600015362;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/632881712178659330/1024/10/scaletowidth#tl-632881712178659330;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/633035906088960002/1024/10/scaletowidth#tl-633035906088960002;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/632884653027491842/1024/10/scaletowidth#tl-632884653027491842;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/632883929870761986/1024/10/scaletowidth#tl-632883929870761986;1043138249'" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<br />
<h4 style="text-align: left;">
Smore</h4>
<div class="separator" style="clear: both; text-align: left;">
Ci après, je partage avec vous les différents flyers produits par les étudiants lors de cette journée et qui sont réalisés à base de l'outil <a href="https://www.smore.com/" target="_blank">Smore</a>.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkl7CrkwfrM1zOTYLec6mQgnjWEN277kd0wD2ps8w6-9EeBylujirIayFCqzC5zJkjanb7pVqIxoK1yS7s_TdtyctV_O36dfSYCLkf4AqsxCUzSuzoFxcLxHNBedNb3pxlnXvJYig7G9Q/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.56.03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkl7CrkwfrM1zOTYLec6mQgnjWEN277kd0wD2ps8w6-9EeBylujirIayFCqzC5zJkjanb7pVqIxoK1yS7s_TdtyctV_O36dfSYCLkf4AqsxCUzSuzoFxcLxHNBedNb3pxlnXvJYig7G9Q/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.56.03.png" height="296" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia1ZUwqexD645ZInOKbhR1lImRbQoljLU72ncqadiELsYc-3-eg6GF9-UdDNQAkF7mI8RarSV7qqaCGpD34hbdWsChWDA0ZTHQHX5TDeTAjJToH4IMHmtLpDbUKGRqh_MaKOAi9w2DjC8/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.56.58.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia1ZUwqexD645ZInOKbhR1lImRbQoljLU72ncqadiELsYc-3-eg6GF9-UdDNQAkF7mI8RarSV7qqaCGpD34hbdWsChWDA0ZTHQHX5TDeTAjJToH4IMHmtLpDbUKGRqh_MaKOAi9w2DjC8/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.56.58.png" height="297" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixFd7b4RaNbHxg7lBrhbZ-Ycm1rTSd9PAoE8jG73GMYHdCN2MT7cKBNeMJzuDadBlR_E-TZKxY0KLSL4dsX0948gKW0xwAA4u7b9b-Tiif1F5Ujz9qBtcJBa3YRcWVbCFd9GKr5fro2rM/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.58.32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixFd7b4RaNbHxg7lBrhbZ-Ycm1rTSd9PAoE8jG73GMYHdCN2MT7cKBNeMJzuDadBlR_E-TZKxY0KLSL4dsX0948gKW0xwAA4u7b9b-Tiif1F5Ujz9qBtcJBa3YRcWVbCFd9GKr5fro2rM/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B10.58.32.png" height="320" width="264" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-IC-BPc5jdanHKjILeaCj7t2DRMdE7nA4wAbWmJzd6BKF4cVMeu_WJzfhkGCQesObOfZlVqbnu7lZ0ttQdbI6rCaAAj-m836YVxa2YFIVUn_5OApJSDEcntkaz0WsRaBbB1P94w7DKNU/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.00.56.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-IC-BPc5jdanHKjILeaCj7t2DRMdE7nA4wAbWmJzd6BKF4cVMeu_WJzfhkGCQesObOfZlVqbnu7lZ0ttQdbI6rCaAAj-m836YVxa2YFIVUn_5OApJSDEcntkaz0WsRaBbB1P94w7DKNU/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.00.56.png" height="300" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFL8T1Hi6eLc6mBHaJqI270QhzQKEjJelrChsN4R6VCewraYgdg0Ee090uabO2j26-MMpPH18movAcUsz5qGAvEJyjqYnCb6lhbEMqdbp0i1WrgaxQuXmsgPJ8_Xd3Z3V52DgTvPZD_as/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.02.02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFL8T1Hi6eLc6mBHaJqI270QhzQKEjJelrChsN4R6VCewraYgdg0Ee090uabO2j26-MMpPH18movAcUsz5qGAvEJyjqYnCb6lhbEMqdbp0i1WrgaxQuXmsgPJ8_Xd3Z3V52DgTvPZD_as/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.02.02.png" height="299" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9YR6QTy5XmJpG_oc-yTWe4x3GotienXsoFb8bfdNWUK7A7J3E0mUF1esxDTcjvrj5w7-DzZHff9pN4zwBoqqvXjLS_GEjonrLbt_H5zwZFcSjKuglCMxR09DJcH_ygjl22jzoR-87pVY/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.03.28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9YR6QTy5XmJpG_oc-yTWe4x3GotienXsoFb8bfdNWUK7A7J3E0mUF1esxDTcjvrj5w7-DzZHff9pN4zwBoqqvXjLS_GEjonrLbt_H5zwZFcSjKuglCMxR09DJcH_ygjl22jzoR-87pVY/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.03.28.png" height="299" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUWPS3UaTP67N8flqFQ552eF1Aglb46GUd9XkK2qe21fHKGyQybKnITu3I_cXCIQ9AdkS9geOkqT0omfcc190hTXOlo824Va8a6jbfjTLFLgCi5AE_z0aTrpdFPKXmwK-tBU2KxGYKgmE/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.04.01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUWPS3UaTP67N8flqFQ552eF1Aglb46GUd9XkK2qe21fHKGyQybKnITu3I_cXCIQ9AdkS9geOkqT0omfcc190hTXOlo824Va8a6jbfjTLFLgCi5AE_z0aTrpdFPKXmwK-tBU2KxGYKgmE/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.04.01.png" height="302" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjDOuMt_lxfr4QEc2jo5OR-dns4T8hJ4XCBwXZPbkPtRWh_x9Qt5ha-zWkv3HUenGDqKCGyEVOzfwL89Mprg7YSZOQHv380Gi0w3EA7wzAMWobWIxzE4ZgUw3Dd33VaXfk4SFGnv3mAE0/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.04.40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjDOuMt_lxfr4QEc2jo5OR-dns4T8hJ4XCBwXZPbkPtRWh_x9Qt5ha-zWkv3HUenGDqKCGyEVOzfwL89Mprg7YSZOQHv380Gi0w3EA7wzAMWobWIxzE4ZgUw3Dd33VaXfk4SFGnv3mAE0/s1600/Capture+d'e%CC%81cran%2B2015-03-14%2B11.04.40.png" height="301" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Je vous retrouve au <a href="http://www.digitallearningday.org/" target="_blank">#DLDay</a> prochain inchallah.</div>
<br />
<br /></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com2tag:blogger.com,1999:blog-1913701376666139534.post-8375858404843195082014-07-27T08:55:00.000-07:002014-08-10T11:34:33.627-07:00ThingLink Teacher Challenges 2014<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="font: 14.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;">
Lorsque j'ai découvert l'outil <a href="http://www.thinglink.com/" target="_blank">ThingLink</a> pour la première fois, il y a maintenant deux semaines, je m'y suis rapidement accroché car j'ai senti que cet outil offre un plus par rapport aux différents outils technologiques qui accompagnent mon enseignement. En effet, <a href="http://www.thinglink.com/" target="_blank">ThingLink</a> vous offre la possibilité d'enrichir vos images par du contenu multimédia. A base du système de Tags, on peut facilement ajouter des icônes de différentes formes et couleurs à nos images. Par la suite, chaque icône est associée à un contenu soit sous forme de texte ou bien sous forme de lien web et bien sûr le lien web peut être une image, un son, une vidéo ou une page web. Du coup, une simple image devient une vraie ressource alimentée et enrichie par du contenu multimédia. A ce stade, l'usage pédagogique qu'on peut faire de <a href="http://www.thinglink.com/" target="_blank">ThingLink</a> devient intéressant et nécessite toutefois une réflexion. Pour ce faire je me suis inscris à un évènement lancé par une communauté d'enseignants basée essentiellement aux Etats unis pour développer l'usage de ThingLink dans un contexte pédagogique. L'évènement est baptisé <a href="http://thinglinkblog.com/teacher-challenges-at-a-glance/" target="_blank">ThingLink Teacher Challenges 2014</a>.</div>
<div style="font: 14.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;">
L'évènement ThingLink challenges 2014 est lancé le 6 juin 2014. C'est une opportunité qui s'inscrit dans le cadre de renforcement et du développement professionnel conçue pour aider les professeurs à transformer leurs enseignements en classe ou à distance par <a href="http://www.thinglink.com/" target="_blank">ThingLink</a><span class="Apple-style-span" style="font-family: Helvetica, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;">. </span>L'évènement se déroule sur sur sept semaines. A l'issue de chaque semaine, un travail à base de ThingLink doit être élaboré.</div>
<div style="font: 14.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;">
<h2 style="text-align: left;">
La Semaine 1 :</h2>
</div>
<div style="font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="font-family: Helvetica; margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.thinglink.com/scene/548815444425834496" style="margin-left: auto; margin-right: auto;" target="_blank"><img alt=" Comment préparer le Harira" class="alwaysThinglink" src="http://www.cvous.com/t5/image/serverpage/image-id/6866i37E0A5A2062F28FE?v=mpbl-1#tl-548815444425834496;1043138249" style="max-width: 100%;" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">La Harira marocaine</td></tr>
</tbody></table>
<div style="font-family: Helvetica;">
Cette première semaine est l'occasion pour appréhender l'usage de ThingLink. Le travail consiste à choisir une image et l'enrichir par du contenu essentiellement multimédia. La tendance était pour le choix de thématiques de type "How To". Nous sommes au mois de Ramadan, j'ai opté pour une illustration qui revient sur la préparation de la célèbre recette de ce mois : Harira. Chaque post fait l'objet d'une publication. Je vous laisse découvrir ma production ci après.<script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
</div>
<div style="font-family: Helvetica;">
<br /></div>
<h2 style="font-family: Helvetica; text-align: left;">
La Semaine 2</h2>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="font-family: Helvetica; margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/548461232366026752/1024/10/scaletowidth#tl-548461232366026752;1043138249" style="margin-left: auto; margin-right: auto; max-width: 100%;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mon identité numérique</td></tr>
</tbody></table>
<div style="font-family: Helvetica;">
L'objectif de cette semaine est de créer un <a href="http://fr.wikipedia.org/wiki/Avatar" target="_blank">avatar</a> qui va représenter en quelque sorte mon <a href="http://fr.wikipedia.org/wiki/Identit%C3%A9_num%C3%A9rique_(Internet)" target="_blank">identité numérique</a>. L'avatar doit être enrichi par plusieurs tags pour bien illustrer cette identité numérique, où les réseaux sociaux et les blogs seront bien représentés. Plusieurs outils existent pour permettre de créer un avatar. Personnellement, j'ai opté pour l'outil <a href="http://www.voki.com/" target="_blank">Voki</a>. Je vous laisse découvrir ma réalisation ci après.<script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
</div>
<h2 style="font-family: Helvetica; text-align: left;">
La Semaine 3</h2>
<span style="font-family: Arial, Helvetica, sans-serif;">L'exercice</span><span style="font-family: Helvetica;"> de cette semaine consiste à créer une image originale et de l'enrichir avec un vocabulaire qui relève d'une thématique donnée. J'ai pensé à la technologie Java et en particulier à la plateforme JavaEE. J'ai essayé de représenter sur mon image, que j'ai d'ailleurs crée par le biais de </span><a href="https://www.apple.com/fr/mac/keynote/" style="font-family: Helvetica;" target="_blank">Keynote</a><span style="font-family: Helvetica;">, les différentes technologies associées notamment les JavaBeans, les frameworks tels que JSF, PrimeFaces ou autre. Je vous laisse explorer ma production ci après.</span><br />
<div style="font-family: Helvetica;">
<div style="text-align: left;">
</div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="font-family: Helvetica; margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/549674458592313345/1024/10/scaletowidth#tl-549674458592313345;1043138249" style="margin-left: auto; margin-right: auto; max-width: 100%;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Java Technology<br />
<br />
<h2 style="text-align: left;">
<span style="font-size: large;">La Semaine 4</span></h2>
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: small;">Pour cette semaine, il a été question d'élaborer une carte (map) que l'on va enrichir toujours avec du contenu multimédia. Nous sommes en fin du mois de Juillet 2014 et nous vivons le Génocide commis par Israel à <a href="http://fr.wikipedia.org/wiki/Gaza" target="_blank">Gaza</a>. Donc, j'ai décidé de réaliser une carte qui a pour thématique le massacre par Israel des Palestiniens toute catégorie confondue : enfants, personnes âgées, femmes. Pour ce faire, j'ai tout d'abord utilisé <a href="http://www.evernote.com/" target="_blank">Evernote</a> pour capturer la carte géographique de Gaza, puis je l'ai annoté via les outils de Evernote. Après j'ai récupéré la carte sur <a href="http://www.thinglink.com/" target="_blank">Thinglink</a> et j'ai procédé à son enrichissement, ce qui a donné la réalisation suivante : </span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"><img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/550293585170268160/1024/10/scaletowidth#tl-550293585170268160;1043138249" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
</span></div>
<div style="text-align: left;">
</div>
<h2 style="text-align: center;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><i style="font-weight: normal;">Genocide in Gaza</i></span></h2>
<h2 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: large;">La Semaine 5</span></h2>
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: small;">Pendant cette semaine, il s'agissait de travailler sur un nouveau outil de thinglink qui est "<a href="http://video.thinglink.com/" target="_blank">thinglink for video</a>". L'outil vient enrichir l'outil d'annotation de base et offre la possibilité de travailler et de taguer cette fois ci les vidéos. Je pense que cela va nous donner, nous les enseignants, des possibilités importantes en matière d'usages pédagogiques à base du support vidéo. Pour ce qui est du travail à rendre pour cette semaine, j'ai travaillé sur ma vidéo que j'avais déjà enregistré lors du premier <a href="http://www.um5s.ac.ma/index.php?option=com_content&view=article&id=1170&Itemid=340" target="_blank">colloque international de l'innovation pédagogique</a> et qui a eu lieu à l'Université Mohammed V en mois d'avril 2014. Dans cette ressource j'ai évoqué un certain nombre d'outils pédagogiques pertinents de type Web 2.0, et avec le recours à <a href="http://video.thinglink.com/" target="_blank">ThingLink for Video</a>, j'ai ajouté plusieurs ressources vidéos pour </span><span style="font-family: Arial, Helvetica, sans-serif; font-size: small;">enrichir</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"> ma première ressource et c'est ce qui a donné la vidéo suivante :</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://video.thinglink.com/v/452" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfYV5B0M__0vMNFegF4Rb9tlP8aosjFuWiE7Km-DWyItKyeZicFXdra8oAJ2Il-xNaeSfgPuuV4ltc06CUiNYTpkfcqI9eA1MOCAmXQ7xS4VUEP5KpF13ILLM5bywpZD_BMU7f0jHFmoI/s1600/videoThingLink.png" height="361" width="640" /></a></div>
<div style="text-align: center;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><i>Intégration de la Vidéo</i></span></div>
<h2>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: large;">La Semaine 6</span></h2>
<br />
<span style="font-size: small;">L'objectif de cette semaine était de pouvoir découvrir les potentialités de l'application <a href="http://www.thinglink.com/app" target="_blank">Thinglink mobile</a> qui est disponible sur les deux plateformes ISO et Android. Il a été question d'installer ThingLink mobile sur sa tablette ou smartphone. Puis il fallait prendre par exemple une photo de jardin tout en se baladant et de taguer ensuite la photo via l'application ThingLink mobile. Ma production au cours de cette semaine a donné lieu à :</span><br />
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/551828985084903426/1024/10/scaletowidth#tl-551828985084903426;1043138249" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<span style="font-size: small;"><br /></span><br />
<div style="text-align: center;">
<span style="font-size: small;"><i style="font-size: 13px;"><span style="font-size: x-small;">Production par ThingLink mobile</span></i></span></div>
<br />
<span style="font-size: small;"><br /></span>
<br />
<h2>
<span style="font-size: large;">La Semaine 7</span></h2>
<br />
<span style="font-size: small;">Cette semaine était très enrichissante, on a combiné l'usage des posts classiques de ThingLink avec le support Audio. Nous avons choisi comme outil le fameux <a href="http://audioboo.fm/" target="_blank">AudioBoo</a>.</span><br />
<span style="font-size: small;">En fait, <a href="http://audioboo.fm/" target="_blank">AudioBoo</a> est une application Web, disponible aussi pour mobile, qui nous permet d'enregistrer ou d'importer des fichiers audio pour les publier sur Internet. L'idée de l'activité de cette semaine c'est de pouvoir découvrir les autres potentialités de ThingLink, notamment l'enrichissement de notre ressource par du son, et on connaît l'importance de ce media pour au moins les usages pédagogiques qu'on peut faire. Ma production de cette semaine était autour des ateliers de génie logiciel que je donne à mes étudiants en complément du cours de Génie Logiciel et a donné lieu à ça :</span><br />
<span style="font-size: small;"><br /></span>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/552494230862299136/1024/10/scaletowidth#tl-552494230862299136;1043138249" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<span style="font-size: small;"><br /></span><br />
<div style="text-align: center;">
<span style="font-size: small;"><i style="font-size: 13px;"><span style="font-size: x-small;">Ateliers du Génie Logiciel enrichis par du son</span></i></span></div>
<br />
<span style="font-size: small;"><br /></span>
<br />
<h2>
<span style="font-size: large;">La Semaine 8</span><span style="font-size: small;"> </span></h2>
<br />
<span style="font-size: small;">Pour cette semaine, l'idée était d'impliquer les étudiants dans des situations de prise de décision. Normalement les étudiants sont aussi acteurs de leurs propres apprentissages. Pour ce faire, nous allons réaliser un post sous ThingLink qui va recenser plusieurs choix concernant une seule thématique. Après, nous allons inviter les étudiants chacun, via un outil de sondage, à faire un seul choix. Les résultats vont être restitués par après et le choix ayant le meilleur score de vote va en principe être sélectionné par le professeur. En ce qui me concerne, et puisque j'étais entrain de réfléchir sur certains jeux que je peux utiliser dans mon heure de code, j'ai alors profiter pour élaborer une carte de neuf jeux qui servent à apprendre aux étudiants les activités de base de la programmation. Pour l'outil de sondage, j'ai utilisé <a href="http://polldaddy.com/" target="_blank">Polldaddy</a>. Ma production a donné lieu à ce post :</span><br />
<span style="font-size: small;"><br /></span>
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/554332010697457664/1024/10/scaletowidth#tl-554332010697457664;1043138249" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<br />
<div style="text-align: center;">
<i><span style="font-size: x-small;">Towards learning Code by Games</span></i></div>
<br />
<h2>
<span style="font-size: large;">La Semaine 9</span></h2>
<span style="font-size: small;">Lors de cette semaine, il y a lieu maintenant de revenir sur toutes les productions précédentes, créer un channel qui va nous donner la possibilité d'avoir un portfolio qui ressemble tout le travail déjà effectué et que nous pouvons bien entendu partager avec nos étudiants et vice versa. De la préparation de la Harira au niveau de la Semaine 1 jusqu'au mixage des jeux pour l'apprentissage du code, j'ai pu produire ce channel :</span><br />
<span style="font-size: small;"><br /></span></div>
<div style="text-align: left;">
<img class="alwaysThinglink" src="//cdn.thinglink.me/api/image/554262663035617281/1024/10/scaletowidth#tl-554262663035617281;1043138249" style="max-width: 100%;" /><script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
<br />
<div style="text-align: center;">
<i><span style="font-size: x-small;">Mon Portfolio sous ThingLink</span></i></div>
<br />
<span style="font-size: small;">Le travail continue bien entendu sur d'autres pistes pédagogiques à base de l'outil ThingLink. Je vous tiendrai au courant dans mes prochains billets.</span></div>
</td></tr>
</tbody></table>
<div style="font-family: Helvetica;">
<script async="" charset="utf-8" src="//cdn.thinglink.me/jse/embed.js"></script>
</div>
</div>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com2tag:blogger.com,1999:blog-1913701376666139534.post-6756825227765435502014-07-23T03:12:00.001-07:002014-07-23T03:12:22.433-07:00Mon avatar sur Voki<a href="http://www.voki.com/pickup.php?scid=10087953&height=267&width=200#.U8-Kdl7oeEQ.blogger">I just made a new Voki. See it here:</a>Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-17914739075003611732014-06-16T03:52:00.000-07:002014-06-16T03:52:12.089-07:00Projet de certification P@lmes<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Introduction</h2>
Dans le cadre du projet P@lmes, les universités marocaines vont bientôt lancer un projet cadre national commun de certification en quatre domaines : L'informatique, Langues et Communication, Entrepreneuriat et Gestion de projets. L'idée de la certification est d'offrir à nos étudiants la possibilité d'avoir de grandes chances pour l'insertion au marché du travail. En effet, aujourd'hui les compétences en Informatique, Langues, Entrepreneuriat et Gestion projet sont indispensables pour intégrer le marché de l'emploi. Avec les différents certificats, nos étudiants vont augmenter leur chance d'accès au marché. Les équipes pédagogiques relevant des différentes universités marocaines travaillent cela remonte à deux années maintenant sur l'élaboration d'un cadre de référentiel de compétences communs et qui couvre les quatre domaines cités ci haut.<br />
<h2 style="text-align: left;">
Mise en oeuvre</h2>
Le projet P@lmes est passé par plusieurs étapes. De la constitution des équipes, à l'élaboration du référentiel de compétences jusqu'au l'expérimentation. Parmi les quatre domaines cités, le domaine informatique est en avance par rapport aux autres. Quatre domaines de compétences sont déjà arrêtées :<br />
<br />
<b style="background-color: white; color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5;">D1 : Maîtriser l'environnement de travail</b><br />
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D11 : faire fonctionner son poste de travail pour tirer pleinement parti du potentiel de son environnement (périphériques, connexion,...)</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D12 : installer et utiliser des logiciels adaptés à une tache précise</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D13 : protéger les données pour assurer leur confidentialité</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D14 : assurer l'intégrité des données pour en assurer la pérennité</div>
<b style="background-color: white; color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5;">D2 : </b><b style="color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5;">Rechercher de l'information fiable et cohérente sur le Web</b><br />
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D21 : élaborer une stratégie adaptée à une situation pour trouver de l'information (mots clés, type d'outils,...)</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D22 : utiliser l'outil adapté pour chercher de l'information (hors base de données)</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D23 : critiquer l'information trouvée pour en apprécier la validité, la fiabilité, la cohérence, la pertinence, l'authenticité, l'utilisabilité</div>
<b style="color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5;">D3 : </b><b style="background-color: white; color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 21px;">Exploiter</b><b style="background-color: white; color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5;"> des données, concevoir et diffuser des documents</b><br />
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D31 : Sélectionner et Extraire des données pour produire de l'information</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D32 : produire des documents numériques composites pour présenter un projet par écrit</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D33 : produire des documents numériques composites pour présenter un projet à l'oral</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D34 : produire des documents numériques composites pour présenter un projet sur le web</div>
<b style="background-color: white; color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5;">D4 : </b><b style="background-color: white; color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 21px;">Collaborer en respectant les règles du travail en commun et les lois</b><br />
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D41 : Utiliser les outils numériques pour organiser son temps de travail individuel et en équipe</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D42 : collaborer en réseau pour partager et produire des documents ou des informations</div>
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
D43 : Utiliser différents formats de fichier pour s'assurer de l'interopérabilité au sein du groupe</div>
<br />
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
</div>
<br />
<div class="normal" style="-webkit-text-stroke-width: 0px; background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
D44 : Mettre en pratique les lois/règles relatives à la propriété intellectuelle et au respect de la vie privée et/ou la confidentialité </div>
</div>
<b style="background-color: white; color: navy; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5;">Expérimentation</b><br />
<span style="font-family: Lucida Grande, Lucida Sans Unicode, Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati;"><span style="background-color: white; font-size: 14px; line-height: 21px;">Le référentiel de compétences en Informatique est actuellement en phase d'expérimentation au niveau de certaines universités marocaines. Nous voulons lancer au niveau de l'Université Mohammed V Souissi un appel aux étudiants intéressés par l'obtention du certificat. Le nombre de candidats à la certification est limité, une attention particulière sera accordée aux étudiants inscrits en licence fondamentale. Un test de positionnement est requis pour être accepté ou non à passer la certification.</span></span><br />
<br />
<div class="normal" style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size: 14px; line-height: 1.5; margin-bottom: 1em; margin-left: 120px; padding: 0px;">
<br /></div>
</div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-62579529499015847412014-05-11T05:13:00.001-07:002014-05-11T05:13:29.845-07:00L'innovation pédagogique à l'ère du Web 2.0<iframe allowfullscreen="" frameborder="0" height="270" src="//www.youtube.com/embed/jkUosDyMKY0" width="480"></iframe>Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0tag:blogger.com,1999:blog-1913701376666139534.post-88069159806168037362014-01-01T01:52:00.002-08:002014-01-01T01:52:46.024-08:00Mon heure de code<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuVOWuMg9dEjate39Y5I7A8Y5lIZH2Yp0ix2cD98QPrjbiDXJsMWaCAuAn80CewmMsBQ2-NhCmQqo3V3FTTFxl9b_5WuVm86H6SBIeUIvNNGX-IO8saw9jdVGYjowFm9G_sVVuLVR2sp4/s1600/logoCode.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuVOWuMg9dEjate39Y5I7A8Y5lIZH2Yp0ix2cD98QPrjbiDXJsMWaCAuAn80CewmMsBQ2-NhCmQqo3V3FTTFxl9b_5WuVm86H6SBIeUIvNNGX-IO8saw9jdVGYjowFm9G_sVVuLVR2sp4/s1600/logoCode.png" /></a><a href="http://code.org/">Code.org</a>, une organisation américaine à but non lucratif dédiée à la promotion de l'éducation à l'informatique, avait annoncé le 14 Octobre 2013 une large campagne nationale au profit surtout des jeunes élèves américains pour rejoindre l'heure de code. L'idée est d'introduire plus de 10 millions d'élèves à l'art de codage et de programmation durant la semaine nationale de l'éducation à l'Informatique (Computer Science Education Week) qui a lieu du 9 au 15 Décembre et à l'heure de rédaction de ce billet, plus de 20 millions personnes ont suivi l'heure de code. L'évènement est aussi supporté par plusieurs organismes et individus tels que Apple, Google, Microsoft, Amazon, Dropbox, Bille Gates, Mark Zuckerberg, Reid Hoffman et autres. Plusieurs tutoriaux sont ainsi développés à l'occasion et qu'on peut suivre sur les deux sites dédiés à l'évènement <a href="http://code.org/">http://code.org</a> et <a href="http://csedweek.org/">http://csedweek.org</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4y5jTEJ4v8jFn3hfMhwULuzPzAUn1p9ZSfPkifJtdnsOPFOj55QrMj5sTknQcNn6Rhm34SpQed6JQOVi1YcOQtCaHx9IeUuc5HSkt_8U0BLL8lnmm5TjtlfuQHdA_LcSEE5PTa4cVnDw/s1600/codehoc3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4y5jTEJ4v8jFn3hfMhwULuzPzAUn1p9ZSfPkifJtdnsOPFOj55QrMj5sTknQcNn6Rhm34SpQed6JQOVi1YcOQtCaHx9IeUuc5HSkt_8U0BLL8lnmm5TjtlfuQHdA_LcSEE5PTa4cVnDw/s200/codehoc3.jpg" width="200" /></a></div>
<br />
<br />
A cet effet, j'ai décidé de dupliquer le même concept ici au Maroc. Naturellement, j'ai commencé par mes classes. J'ai réservé une heure de code pour initier mes étudiants à l'art de programmation.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm7FM34idzVQW6N3Xhf8N4YjvEaCcqjm_dj_ZepW4zb5bGMkRypDWv0vXu_Kof1Ee7WnwrqMDTXAY4QxGOu9V_eedhnXUv1rdhR-BDGvwQBVdq0qDlqk4qvKRi_Pb5-QfVFaexd-Jrr-8/s1600/2013-12-26+11.27.36.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm7FM34idzVQW6N3Xhf8N4YjvEaCcqjm_dj_ZepW4zb5bGMkRypDWv0vXu_Kof1Ee7WnwrqMDTXAY4QxGOu9V_eedhnXUv1rdhR-BDGvwQBVdq0qDlqk4qvKRi_Pb5-QfVFaexd-Jrr-8/s320/2013-12-26+11.27.36.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Master Qualité Logiciel</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_kO-a4u_Vgbck8VfYyxbM9_tZDAWrfd0rvOzNC2DpE1M3ZnWk8C-vzJTk-bQoZf0oJLX8vdZydRk-h5Y6OA2f5zi_9KAJJ9XCowCchkYm0Be6T_m9DDEFtqg9Ry15GZ01CJM0o7TjxVI/s1600/2013-12-23+12.47.43.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_kO-a4u_Vgbck8VfYyxbM9_tZDAWrfd0rvOzNC2DpE1M3ZnWk8C-vzJTk-bQoZf0oJLX8vdZydRk-h5Y6OA2f5zi_9KAJJ9XCowCchkYm0Be6T_m9DDEFtqg9Ry15GZ01CJM0o7TjxVI/s320/2013-12-23+12.47.43.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Licence Chargé de Clientèle de Banque</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEjYMAHQ8i_dECInW7m8h5NWh9PjVMq3ewNR4P8LwGfdFbsfMaTOWqQdMPXSoRhz3-piesMraJXQdF0YKPVyVA4RTImvM745QqwPBwVi9NCZH3bCZiWdhi5qB3o9vvhEHwgqZ8zg2Vnm8/s1600/2013-12-24+16.50.38.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEjYMAHQ8i_dECInW7m8h5NWh9PjVMq3ewNR4P8LwGfdFbsfMaTOWqQdMPXSoRhz3-piesMraJXQdF0YKPVyVA4RTImvM745QqwPBwVi9NCZH3bCZiWdhi5qB3o9vvhEHwgqZ8zg2Vnm8/s320/2013-12-24+16.50.38.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Master Entrepreneuriat et Ingénierie Managériale</td></tr>
</tbody></table>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuWpdZBiEalSpDzxtn9ZAyqK7Jg_Q-9gZMnO6OcGNMieZrNdzXqeeDeTqD_3w7GnJt4exIsIs_8ALtMR4bCh9t9sTlrg9-PeHoxh5uALTiO8BLyjg09-zqYCwWSZm1KTouR7a7_xR2bCI/s1600/2013-12-26+11.23.41.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuWpdZBiEalSpDzxtn9ZAyqK7Jg_Q-9gZMnO6OcGNMieZrNdzXqeeDeTqD_3w7GnJt4exIsIs_8ALtMR4bCh9t9sTlrg9-PeHoxh5uALTiO8BLyjg09-zqYCwWSZm1KTouR7a7_xR2bCI/s200/2013-12-26+11.23.41.jpg" width="200" /></a> L'outil d'accompagnement que j'ai choisi pour illustrer mon heure est bien évidemment <a href="http://scratch.mit.edu/" target="_blank">Scratch</a>. Lorsque MIT avait crée cet outil en 2007, on s'avait pas qu'il va prendre cette ampleur en 2013 sachant pratiquement que la plupart des tutoriaux qui sont produits à l'occasion de cet évènement sont faits à base de <a href="http://scratch.mit.edu/" target="_blank">Scratch</a>.<br />
Personnellement, j'avais eu l'occasion d'animer des ateliers Scratch lors de la semaine nationale de la science, évènement organisé par l'Université Mohammed V Souissi et l'Université Mohammed V Agdal au profit des élèves qui relèvent de l'Académie Régionale de Rabat-Salé. Scratch adopte le slogan : imaginer, programmer et partager. Actuellement, plus de 4 millions de projets écrits en Scratch sont déjà partagés.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jUGe5pnFUZ7wRUZXyBiRXbXBNeK2-mKzazk9PDsTCoc30lna4g0I5vBNJXW4AavBB6H0ZEABus0CJQO_SzRtEDu81Dwo0XhnppsIJ1dNRVXi0d43tTamuomMHaQ2L5WRb_XGqOvgNg8/s1600/2013-12-26+11.37.51.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jUGe5pnFUZ7wRUZXyBiRXbXBNeK2-mKzazk9PDsTCoc30lna4g0I5vBNJXW4AavBB6H0ZEABus0CJQO_SzRtEDu81Dwo0XhnppsIJ1dNRVXi0d43tTamuomMHaQ2L5WRb_XGqOvgNg8/s200/2013-12-26+11.37.51.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfoh1tH61k3dev6O0oa0L6gVnnZIEKCHZKhrZYxMT355y-2SE2ld4v0YqMvU5e3gL9dguepS9IlSZUPK9sQ38vIjIrIVRPYC_dS7tBrbuMJnkiipga8isftrkQ1xDJvuAltBGA0tMWoc/s1600/2013-12-26+11.41.23.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfoh1tH61k3dev6O0oa0L6gVnnZIEKCHZKhrZYxMT355y-2SE2ld4v0YqMvU5e3gL9dguepS9IlSZUPK9sQ38vIjIrIVRPYC_dS7tBrbuMJnkiipga8isftrkQ1xDJvuAltBGA0tMWoc/s200/2013-12-26+11.41.23.jpg" width="200" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVknYIOcvygN38FjyMIJlkxnjnuO4ZpijsS8k8OJq-lIhvvIrHzW7MLowxSbf_nZOi4-aO_9iMCdnUWm4tY9CtijbjD0j58kS5XGTzNSzCI7ct3e8q7d1v_uui_GtvWD9fNJgopWzgLSI/s1600/2013-12-26+11.40.53.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVknYIOcvygN38FjyMIJlkxnjnuO4ZpijsS8k8OJq-lIhvvIrHzW7MLowxSbf_nZOi4-aO_9iMCdnUWm4tY9CtijbjD0j58kS5XGTzNSzCI7ct3e8q7d1v_uui_GtvWD9fNJgopWzgLSI/s200/2013-12-26+11.40.53.jpg" width="200" /></a>Par rapport à mon heure de code, j'ai travaillé avec quatre classes, deux licences et deux masters. Parmi ces classes, deux sont novices en programmation. J'ai choisi comme thématique celle du chat et la souris. En fait, il s'agit de créer deux objets sur scène, un chat et une souris. Le chat va essayer de rattraper la souris, qui une fois touchée par le chat va disparaître. Ce mini projet pour le réaliser prend environ une heure. Mon rôle consiste uniquement à présenter Scratch, ses éléments clés et laisser après les étudiants découvrir, tester et en même temps réaliser le mini projet.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkTU5fVz9k-pqZ1LAlFaIigMEjEn7ASKD01f9TnD9Z9Z-wGh9RYEDxDH6_6JEAUCUx8t4bfCafuXTkb5QVE2IgtdzYXphS-g8jPfliSYQSCsYIyXgKluscMsUemsJHNmP9hfL9e4xcufw/s1600/2013-12-26+11.37.40.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkTU5fVz9k-pqZ1LAlFaIigMEjEn7ASKD01f9TnD9Z9Z-wGh9RYEDxDH6_6JEAUCUx8t4bfCafuXTkb5QVE2IgtdzYXphS-g8jPfliSYQSCsYIyXgKluscMsUemsJHNmP9hfL9e4xcufw/s200/2013-12-26+11.37.40.jpg" width="200" /></a></div>
<br />
<br />
<br />
<br />
<br />
Le projet heure de code doit continuer avec d'autres classes, dans d'autres établissements supérieurs ou secondaires. Mon objectif est d'atteindre un maximum et rendre l'évènement national et annuel en même temps. L'idée est de banaliser le codage au près des élèves et de rendre l'art de programmation accessible à tous. Comme l'a annoncé le président américain Obama dans son discours à la nation : "Don't just play on your phone, program. No one's born a computer scientist, but with a little hard work-- and some math and science-- just about anyone can become one.".<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Khalid Nafilhttp://www.blogger.com/profile/04319515539064372443noreply@blogger.com0