cours de génie logiciel / esiea 2014-2015
DESCRIPTION
Slides du cours de Génie Logiciel pour les étudiants de l'ESIEA, année 2014-2015. Le Génie Logiciel, c'est "l'ensemble des activités de conception et de mise en œuvre des produits et des procédures tendant à rationaliser la production du logiciel et son suivi." UML, Xp, Scrum, Méthodes agiles, Java, Design Pattern, Swing, SVN, Objet, Tests, etc. et un peu de bavardages...TRANSCRIPT
![Page 1: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/1.jpg)
Génie Logiciel
ESIEA 2014-2015
Mise-à-jour : 24/01/2015
![Page 3: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/3.jpg)
Cours • 26 février • 27 février • 5 mars • 6 mars
Evaluation
• Semaine du 21/05/2015 (aucun document)
Planning ( INF3038 )
![Page 4: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/4.jpg)
Test DISC Essentiel
(gratuit)
http://profil4.com/disc-essentiel.php
![Page 5: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/5.jpg)
Projet ( LAB3416 )
par équipe de 6-8
Dates clés : • 5 mars : constitution des équipes • 6 mars : Présentation du sujet • 15 mai : Remise du projet par email
![Page 6: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/6.jpg)
Pédagogie ( futurs jeunes ingénieurs )
www.icauda.com/cours
![Page 7: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/7.jpg)
L’ESIEA
l’Ecole qui forme l’Ingénieur et l’Homme
![Page 8: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/8.jpg)
Arrêté ministériel du 30 décembre 1983 (Journal officiel du 19 février 1984)
Le génie logiciel est « l'ensemble des activités de conception et de mise en œuvre des produits et des procédures tendant à rationaliser la production du logiciel et son suivi »
![Page 9: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/9.jpg)
Wikipedia
Le génie logiciel « est une science de génie industriel qui étudie les méthodes de travail et les bonnes pratiques des ingénieurs qui développent des logiciels. » Le génie logiciel « s'intéresse en particulier aux procédures systématiques qui permettent d'arriver à ce que des logiciels de grande taille correspondent aux attentes du client, soient fiables, aient un coût d'entretien réduit et de bonnes performances tout en respectant les délais et les coûts de construction. »
![Page 10: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/10.jpg)
![Page 11: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/11.jpg)
UML + Java (en support)
![Page 12: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/12.jpg)
Un peu d’histoire… pourquoi UML ?
![Page 13: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/13.jpg)
http://en.wikipedia.org/wiki/File:OO-historie-2.svg
![Page 14: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/14.jpg)
http://en.wikipedia.org/wiki/Unified_Modeling_Language
![Page 15: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/15.jpg)
9 diagrammes :
• de classes ; • de cas d’utilisation (use case) ; • d’objets ; • de collaboration ; • de séquence ; • d’états-transitions ; • d’activités ; • de composants ; • de déploiement
![Page 16: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/16.jpg)
Diagramme de classe
![Page 17: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/17.jpg)
Des exemples simples
![Page 18: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/18.jpg)
public interface Mammifere {
int getNombreMamelle();
}
public class Loup implements Mammifere {
private int nbMamelle;
@Override
public int getNombreMamelle() {
return nbMamelle;
}
public void setNombreMamelle(int nbMamelle) {
this.nbMamelle = nbMamelle;
}
}
Accesseurs ( getter / setter )
![Page 19: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/19.jpg)
La classe Loup implémente l’interface Mammifere
Attributs
Méthodes
Graphes UML avec ObjectAid
Fleche avec trait en pointillé
![Page 20: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/20.jpg)
public class Chien extends Loup {
private boolean lof;
private String tatouage;
public boolean isLof() {
return lof;
}
public void setLof(boolean lof) {
this.lof = lof;
}
public String getTatouage() {
return tatouage;
}
public void setTatouage(String tatouage) {
this.tatouage = tatouage;
}
}
![Page 21: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/21.jpg)
La classe Chien étend la classe Loup
Fleche avec trait plein
![Page 22: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/22.jpg)
La classe Chien étend la classe Loup qui implémente l’interface Mammifere
Fleche avec trait plein
Fleche avec trait en pointillé
![Page 23: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/23.jpg)
Un exemple vachement plus complexe ( mais qui reste courant )
![Page 24: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/24.jpg)
gén
éral
isat
ion
spéc
ialis
atio
n
Graphes UML avec Omondo
![Page 25: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/25.jpg)
Pour la prochaine fois
Trouver le sigle utilisé pour représenter le « protected » Pour « private » on utilise « - » Pour « public » on utilise « + »
Et pour « protected » ???
![Page 26: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/26.jpg)
public enum Genre {
HOMME(1, "Garcon"),
FEMME(2, "Fille"),
TEMPORAIRE(8, "Temp");
final int codeSecu;
final String label;
Genre(final int codeSecu, final String label) {
this.codeSecu = codeSecu;
this.label = label;
}
public int getCodeSecu() {
return codeSecu;
}
public String getLabel() {
return label;
}
}
![Page 27: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/27.jpg)
public interface Mammifere {
int getNombreMamelle();
Genre getSexe();
}
public class Loup implements Mammifere {
private int nbMamelle;
private Genre sexe;
@Override
public Genre getSexe() {
return sexe;
}
public void setSexe(Genre sexe) {
this.sexe = sexe;
}
...
}
![Page 28: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/28.jpg)
La classe Louppossède un attribut du type Genre (sexe). On parle d’une association.
Association *-1
![Page 29: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/29.jpg)
Graphes sympas avec yUML : http://yuml.me/
Associations Télécommande et piles
![Page 30: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/30.jpg)
Agrégation Télécommande et son couvercle
Une télécommande sans couvercle est-elle toujours
une télécommande ?
Diamant vide
![Page 31: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/31.jpg)
Composition Télécommande et ses touches
Une télécommande sans touche est-elle toujours une
télécommande ?
Diamant plein
![Page 32: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/32.jpg)
Association, Agrégation, Composition
Composition 1-1..* (biilatérale)
Association *-* (unilatérale)
Agrégation 1-1 (unilatérale)
Graphes UML avec Omondo
![Page 33: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/33.jpg)
Démo UML avec YUML
![Page 34: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/34.jpg)
![Page 35: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/35.jpg)
[Telecommande|-piles;|+getPiles();+setPiles();]*-*[Pile]
![Page 36: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/36.jpg)
[Telecommande|-couvercle;|+getCouvercle();
+setCouvercle();]<>1-1>[Couvercle]
![Page 37: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/37.jpg)
[Telecommande|-touches|+getTouches();+setTouches();]++1-
1..*>[Touche|-telecommande|+getTelecommande();
setTelecommande();]
![Page 38: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/38.jpg)
Diagramme de séquence
![Page 39: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/39.jpg)
Au volant de sa voiture
![Page 40: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/40.jpg)
Démo UML avec Web Sequence Diagrams
![Page 41: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/41.jpg)
![Page 42: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/42.jpg)
![Page 43: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/43.jpg)
A->B: text
activate B
B-->A: text
deactivate B
A->A: text
A->B: text
![Page 44: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/44.jpg)
participant Conducteur
participant Cle
participant Pedale
participant Voiture
participant Demarreur
participant Moteur
participant Arbre
Conducteur->Cle: tourner
activate Cle
Cle->Voiture: demarrer
activate Voiture
Voiture->Demarreur: activer
activate Demarreur
Demarreur->Arbre: entrainer
activate Arbre
Arbre-->Demarreur: ok
deactivate Arbre
Demarreur-->Voiture: ok
deactivate Demarreur
deactivate Voiture
deactivate Cle
Conducteur->Pedale: appuyer
activate Pedale
Pedale->Voiture: accelerer
activate Voiture
Voiture->Moteur: accelerer
activate Moteur
Moteur->Arbre: entrainer
activate Arbre
Arbre-->Moteur:
deactivate Arbre
Moteur-->Voiture: vitesse_rotation
www.websequencediagrams.com
![Page 45: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/45.jpg)
Diagramme de séquence du programme suivant
Pour la prochaine fois Copie individuelle à rendre sur papier au stylo
public class Launcher {
public static void main(String[] args) {
Job job = new Job();
int result = job.work();
System.exit(result);
}
} public class DogReader {
public DogReader(String string) {
...
}
public List<Dog> getByRace(String string) {
...
}
}
![Page 46: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/46.jpg)
suite
Pour la prochaine fois Copie individuelle à rendre sur papier au stylo
public class Job {
public int work() {
try {
DogReader dr = new DogReader("c:/files/dog.xml");
List<Dog> labradors = dr.getByRace("labrador");
AnimalService service = AnimalService.getInstance();
service.send(labradors);
return labradors.size();
} catch (Exception e) {
return -1;
}
}
}
![Page 47: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/47.jpg)
suite
Pour la prochaine fois Copie individuelle à rendre sur papier au stylo
public class AnimalService {
private static AnimalService instance = null;
private AnimalService() {
...
}
public static AnimalService getInstance() {
if (instance == null) {
instance = new AnimalService();
}
return instance;
}
public void send(List<Dog> labradors) {
...
}
}
![Page 48: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/48.jpg)
Diagramme d’états-transitions
![Page 49: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/49.jpg)
Feux tricolores
Etat (adjectif)
Transition
![Page 50: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/50.jpg)
Lave vaisselle
![Page 51: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/51.jpg)
Laver la vaisselle en machine
Graphes avec Visual Paradigm (community edition) pour Eclipse http://www.visual-paradigm.com/
![Page 52: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/52.jpg)
Laver la vaisselle en machine
Fin (Ronds imbriqués)
Début (Ronds plein)
![Page 53: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/53.jpg)
Laver la vaisselle en machine
![Page 54: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/54.jpg)
Laver la vaisselle en machine
![Page 55: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/55.jpg)
Historique
Laver la vaisselle en machine
![Page 56: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/56.jpg)
Diagramme d’état-transitions d’un œuf qu’on cuit dans une casserole d’eau et/ou dans une poêle.
Pour la prochaine fois Copie individuelle à rendre sur papier au stylo
(un seul diagramme pour la casserole et la poêle)
![Page 57: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/57.jpg)
Bifurcation
![Page 58: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/58.jpg)
Bifurcation
final
![Page 59: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/59.jpg)
Bifurcation
![Page 60: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/60.jpg)
http://uml.free.fr
![Page 61: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/61.jpg)
![Page 62: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/62.jpg)
![Page 63: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/63.jpg)
![Page 64: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/64.jpg)
Diagramme d’activité
![Page 65: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/65.jpg)
Laver la vaisselle en machine (encore)
Action (verbe)
Transition
![Page 66: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/66.jpg)
Laver la vaisselle en machine (encore) Diagramme très proche de l’état-transitions
Etat (adjectif)
Action (verbe)
![Page 67: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/67.jpg)
Représentation des conditions
![Page 68: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/68.jpg)
Représentation D’une décision
Décision
![Page 69: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/69.jpg)
Synchronisation
![Page 70: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/70.jpg)
Signaux
![Page 71: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/71.jpg)
![Page 72: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/72.jpg)
Prochaines conférences
Scrum Day 10-11 avril 2014 http://www.scrumday.fr/
Devoxx France 16-18 avril 2014 http://www.devoxx.fr/
Mix-it 29-30 avril 2014 http://www.mix-it.fr/
Breizth Camp 21-23 mai 2014 http://www.breizhcamp.org/
Agile France 22-23 mai 2014 http://2014.conference-agile.fr/
![Page 73: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/73.jpg)
![Page 74: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/74.jpg)
Tests avec JUnit
Prouver que ça fonctionne
![Page 75: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/75.jpg)
public class SimpleCalculette
implements Calculette {
@Override
public int additionner(int a, int b) {
return a + b;
}
@Override
public int multiplier(int a, int b) {
return a * b;
}
}
public interface Calculette {
int additionner(int a, int b);
int multiplier(int a, int b);
}
![Page 76: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/76.jpg)
import static junit.framework.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class SimpleCalculetteTestCase {
private Calculette calculette;
@Before
public void doBefore() {
calculette = new SimpleCalculette();
}
@Test
public void testAdditionner() {
final int a = 2;
final int b = 3;
final int result = calculette.additionner(a, b);
assertEquals(5, result);
}
Conventions de nommage
Avant chaque test
Test
![Page 77: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/77.jpg)
C’est vert donc c’est ok
Les tests de la classe
Temps d’exécution
![Page 78: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/78.jpg)
Démo dans Eclipse ( calcul de φ : 1,618 033 988 7 Fibonacci )
![Page 79: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/79.jpg)
Pour la prochaine fois Copie individuelle à rendre sur papier au stylo
(code des tests ET code de la calculette)
Factoriser les tests et les faire tous passer au vert (y compris le dernier sur le durée) Utiliser une HashMap
![Page 80: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/80.jpg)
Dossier – La suite de Fibonacci et le nombre d’or : http://www.podcastscience.fm/dossiers/2011/03/17/la-suite-de-fibonacci-nombre-d-or/
![Page 81: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/81.jpg)
One more thing
![Page 82: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/82.jpg)
Tests
A la découverte de Junit
« Les Tests en Trois Temps » icauda.com/articles.html#3t
![Page 83: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/83.jpg)
![Page 84: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/84.jpg)
![Page 85: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/85.jpg)
Les méthodes agiles ( Scrum, Xp, Kanban, Lean… )
![Page 86: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/86.jpg)
Cycle en V
![Page 87: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/87.jpg)
![Page 88: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/88.jpg)
![Page 89: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/89.jpg)
Manifeste agile
Les 4 valeurs : • Les individus et leurs interactions plus que les processus et les outils. • Des logiciels opérationnels plus qu’une documentation exhaustive. • La collaboration avec les clients plus que la négociation contractuelle. • L’adaptation au changement plus que le suivi d’un plan.
Wikipedia : http://fr.wikipedia.org/wiki/Manifeste_agile
![Page 90: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/90.jpg)
Manifeste agile
Les 12 principes : • Notre plus haute priorité est de satisfaire le client en livrant rapidement et
régulièrement des fonctionnalités à grande valeur ajoutée. • Accueillez positivement les changements de besoins, même tard dans le
projet. Les processus agiles exploitent le changement pour donner un avantage compétitif au client.
• Livrez fréquemment un logiciel opérationnel avec des cycles de quelques semaines à quelques mois et une préférence pour les plus courts.
• Les utilisateurs ou leurs représentants et les développeurs doivent travailler ensemble quotidiennement tout au long du projet.
• Réalisez les projets avec des personnes motivées. Fournissez-leur l’environnement et le soutien dont ils ont besoin et faites-leur confiance pour atteindre les objectifs fixés.
• La méthode la plus simple et la plus efficace pour transmettre de l’information à l'équipe de développement et à l’intérieur de celle-ci est le dialogue en face à face.
![Page 91: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/91.jpg)
Manifeste agile
Les 12 principes (suite) : • Un logiciel opérationnel est la principale mesure d’avancement. • Les processus agiles encouragent un rythme de développement soutenable.
Ensemble, les commanditaires, les développeurs et les utilisateurs devraient être capables de maintenir indéfiniment un rythme constant.
• Une attention continue à l'excellence technique et à une bonne conception renforce l’agilité.
• La simplicité – c’est-à-dire l’art de minimiser la quantité de travail inutile – est essentielle.
• Les meilleures architectures, spécifications et conceptions émergent d'équipes auto organisées.
• À intervalles réguliers, l'équipe réfléchit aux moyens de devenir plus efficace, puis règle et modifie son comportement en conséquence.
![Page 92: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/92.jpg)
« Mémento Manifeste Agile »
![Page 93: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/93.jpg)
« En route vers l'agilité, SCRUM et XP : retour d'expérience » http://rad-hass.developpez.com/tutoriels/conception/route-vers-agilite-scrum-et-xp-retour-
experience/
![Page 94: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/94.jpg)
![Page 95: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/95.jpg)
Des rôles : • Product Owner • Scrum Master • Team
Des concepts :
• Story points • Velocity • User story • Done
Des rituels : • Sprint • Daily stand up • Sprint review • Planning poker • Retrospective
Des artefacts :
• Product backlog • Sprint backlog • Task board • Burn down
Scrum
![Page 96: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/96.jpg)
User story
![Page 97: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/97.jpg)
Cartes Scrum ( planning poker )
![Page 98: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/98.jpg)
Planning poker
![Page 99: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/99.jpg)
Stand up
![Page 100: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/100.jpg)
Stand up
![Page 101: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/101.jpg)
Dashboard
![Page 102: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/102.jpg)
Taskboard
![Page 103: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/103.jpg)
Dashboard (taskboard) pour de vrai
![Page 104: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/104.jpg)
Dashboard (taskboard) pour de vrai
![Page 105: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/105.jpg)
Cherchez ce qui ne va pas
![Page 106: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/106.jpg)
Burndown d’un sprint
![Page 107: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/107.jpg)
Burndown en vrai
![Page 108: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/108.jpg)
0
5
10
15
20
25
30
35
40
45
50
1 2 3 4 5 6 7 8 9 10
RAF
idéal
Idéal adapté
![Page 109: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/109.jpg)
Démo
![Page 110: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/110.jpg)
Rétrospective de fin de sprint
![Page 111: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/111.jpg)
Quelques lectures
« 3T en pratique » http://thierry-leriche-dessirier.developpez.com
« Scrum et Agile avec des bonhommes » http://hingchanscrum.blogspot.com
« Présentation des méthodes agiles et Scrum » http://ineumann.developpez.com/tutoriels/alm/agile_scrum
« Scrum Xp depuis les tranchées » http://henrik-kniberg.developpez.com/livre/scrum-xp
« Mémento Scrum gratuit » http://thierry-leriche-dessirier.developpez.com/tutoriels/general/memento-scrum-destination-
equipe/
« Petit guide du lean » http://leanagilecamp.fr/guide.html
![Page 112: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/112.jpg)
![Page 113: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/113.jpg)
![Page 114: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/114.jpg)
https://www.youtube.com/watch?v=HsB0UZR7XvE&index=1&list=PLypC2fA0xsaWULkC3Q9b1dXdZGIi0oj-h
![Page 115: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/115.jpg)
![Page 116: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/116.jpg)
Multitâche au volant ?
![Page 117: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/117.jpg)
Multitâche au travail ?
Dossier sur le « multitasking » sur Podcast Science : http://www.podcastscience.fm/dossiers/2013/05/23/le-multitasking/
![Page 118: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/118.jpg)
Multitâche en réunion ?
![Page 119: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/119.jpg)
![Page 120: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/120.jpg)
![Page 121: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/121.jpg)
Test DISC gratuit : www.profil4.com Podcast : http://www.outilsdumanager.com
DISC Comportement et Communication
![Page 122: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/122.jpg)
Taureau
Vous êtes bourré d’énergie, centré sur l’action et constamment en mouvement. D’un naturel plutôt positif et factuel, vous pouvez être agressif. Vous êtes extraverti, tenace et vous savez vous concentrer sur les résultats à atteindre. Vous abordez les autres de manière directe et autoritaire.
• A une vision macro • Est (trop) franc • Accepte les chalenges • Va droit au but • Parle fort • N’a pas peut de se tromper
![Page 123: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/123.jpg)
Vous êtes soucieux d’avoir de bonnes relations personnelles, généralement positif et extraverti. Vous prenez plaisir à la compagnie des autres et estimez que la vie doit être amusante. Rayonnants et amicaux, vous abordez les autres de façon convaincante, démocratique. Coq
• Montre/communique de l’enthousiasme • Est (trop) optimiste • Aime collaborer • Ne supporte pas d’être ignoré • Délègue (beaucoup) • A du mal à finir les taches
![Page 124: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/124.jpg)
Vous appréciez la cohérence dans votre vie et vous pouvez combattre pour une cause avec obstination. Vous vous appliquez à être sérieux et fiable. Vous ne répondez pas facilement à l’ambiguïté ou à une structure impersonnelle et vous pouvez être timide dans votre façon d’aborder les autres. Chien
• Ne supporte pas d’être pressé • communique/agit de façon calme • Aide volontiers • Est humble • Parle doucement
![Page 125: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/125.jpg)
Vous aimez réfléchir avant d’agir et vous pouvez être perçu comme froide et indifférent. Vous manifestez un fort désir de connaître et de comprendre ce qui vous entoure. Vous avez du mal à répondre à une pression autoritaire et vous préférez communiquer par écrit. Hibou
• A besoin d’indépendance • Est objectif/réfléchi • Aime les détails • A peur de se tromper • A du mal à prendre des décisions sans
avoir toutes les infos
![Page 126: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/126.jpg)
![Page 127: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/127.jpg)
User groups
Paris JUG (Java User Group) http://www.parisjug.org/
Duchess France http://www.duchess-france.org/
Angular JS Paris http://www.meetup.com/AngularJS-Paris
Paris AUG (Android User Group) http://www.paug.fr/
![Page 128: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/128.jpg)
![Page 129: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/129.jpg)
Story board et maquettes
![Page 130: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/130.jpg)
![Page 131: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/131.jpg)
Dessins sympas avec Iphone Mockup : http://iphonemockup.lkmc.ch
![Page 132: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/132.jpg)
Dessins sympas avec Iphone Mockup : http://iphonemockup.lkmc.ch
![Page 133: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/133.jpg)
![Page 134: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/134.jpg)
![Page 135: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/135.jpg)
![Page 136: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/136.jpg)
![Page 137: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/137.jpg)
![Page 138: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/138.jpg)
Balsamiq mockups : http://balsamiq.com/products/mockups Axure : http://www.axure.com/ Mockingbird : https://gomockingbird.com/mockingbird/# Pencil : http://pencil.evolus.vn/en-US/Home.aspx Iphone mockup : http://iphonemockup.lkmc.ch/
![Page 139: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/139.jpg)
![Page 140: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/140.jpg)
Source Code Management (SCM)
http://fr.wikipedia.org/wiki/Source_Code_Management
Subversion CVS Mercurial Git
![Page 141: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/141.jpg)
![Page 142: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/142.jpg)
pratique ?
![Page 143: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/143.jpg)
disque réseau
Pourquoi pas sur un disque réseau ?
![Page 144: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/144.jpg)
Pourquoi pas par email ?
![Page 145: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/145.jpg)
• Travail à distance ? • Echanges de fichiers (nombreux) dans tous les sens ? • Versions des fichiers ? • Sauvegardes ? • Conflits sur des modifications parallèles ?
![Page 146: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/146.jpg)
Subversion : SCM centralisé
![Page 147: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/147.jpg)
Gestion de sources et contrôle de versions : • garder un historique des différentes versions des
fichiers d'un projet ; • permettre le retour à une version antérieure
quelconque ; • garder un historique des modifications avec leur
nature, leur date, leur auteur... ; • permettre un accès souple à ces fichiers, en local ou
via un réseau ; • permettre à des utilisateurs distincts et souvent
distants de travailler ensemble sur les mêmes fichiers.
![Page 148: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/148.jpg)
Copie de travail (working copy) La copie de travail est un répertoire situé en local sur l’ordi de l'utilisateur et qui contient une copie des fichiers. C'est cette copie qui sert de base de travail et qui est modifiée en local avant d'être envoyée vers le dépôt.
Dépôt (repository) Un dépôt Subversion est l'emplacement central où sont stockées toutes les données relatives aux projets gérés. Le dépôt contient l'historique des versions des fichiers stockés, les logs enregistrés lors des modifications, les dates et auteurs de ces modifications, etc. Un dépôt apparaît de l'extérieur comme un système de fichiers composé de répertoires au sein desquels on peut naviguer, lire et écrire selon les permissions accordées.
![Page 149: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/149.jpg)
Import / checkout ( création de la copie locale )
![Page 150: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/150.jpg)
Update ( récupération de la dernière
version des fichiers )
![Page 151: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/151.jpg)
Commit ( envoie des fichiers modifiés
vers le repository )
![Page 152: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/152.jpg)
Opérations Le checkout est l'opération qui consiste à récupérer pour la première fois les fichiers déjà existant au sein d'un projet du dépôt. Cette opération ne se fait en général qu'une fois par projet. Le résultat est une copie de travail. L'update consiste à synchroniser la copie de travail locale avec le dépôt en récupérant la dernière version des fichiers du dépôt. C'est à cette occasion que des conflits de version peuvent apparaître. Un commit est l'opération inverse d'un update. Elle consiste à mettre à jour le dépôt à partir de la copie de travail locale. Une nouvelle révision est alors créée. Un log (simple message texte contenant une description des modifications effectuées) doit être saisi à cette occasion. Remarque : pour qu'un commit soit possible, il faut que la copie de travail corresponde à la dernière version du dépôt (modifications locales exceptées). Si ce n'est pas le cas, il est nécessaire d'effectuer d'abord un update et de résoudre les conflits éventuels avant de réessayer le commit.
![Page 153: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/153.jpg)
Commit ( bonne pratique : faire un update avant )
❶
❷
![Page 154: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/154.jpg)
![Page 155: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/155.jpg)
Version 1
Version 2
Version 3
Branches ( versions )
![Page 156: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/156.jpg)
Version 1
Branche debug
Branches - merge ( versions )
![Page 157: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/157.jpg)
Version 1
Version 2
Tags ( révisions )
1.1 1.2
2.1
![Page 158: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/158.jpg)
![Page 159: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/159.jpg)
![Page 160: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/160.jpg)
![Page 161: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/161.jpg)
Git : SCM décentralisé
![Page 162: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/162.jpg)
Espaces
Repo local Repo distant
Working copie
![Page 163: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/163.jpg)
Commandes quotidiennes
push
fetch
pull
commit
clone
![Page 164: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/164.jpg)
Git process
merge fetch
commit push
Tutoriel Git chez Atlassian : https://www.atlassian.com/fr/git/tutorial
![Page 165: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/165.jpg)
Travail en branche ( les branches ne sont pas chères avec Git )
A B C D
E F G
Master
M-7548-DEV
![Page 166: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/166.jpg)
Merge
A B C D
E F G
Master
M-7548-DEV
![Page 167: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/167.jpg)
Rebase
A B C D
E F G Master
M-7548-DEV
E’ F’ G’
![Page 168: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/168.jpg)
Cherry-pick
A B D G
E C E
E’
Master
une autre branche
F H
![Page 169: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/169.jpg)
« Git en 15 minutes »
https://try.github.io/levels/1/challenges/1
![Page 170: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/170.jpg)
Quelques logiciels : • Tortoise • Sourcetree • Ungit • Git bash • Plugins d’IDE (Netbeans/Eclipse/etc.)
![Page 171: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/171.jpg)
![Page 172: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/172.jpg)
Intégration continue
![Page 173: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/173.jpg)
![Page 174: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/174.jpg)
mvn clean install
mvn sonar:sonar
![Page 175: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/175.jpg)
![Page 176: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/176.jpg)
Design patterns
![Page 177: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/177.jpg)
Les 23 Design patterns de GOF :
Abstract factory, Builder, Factory, Prototype, Singleton, Adapter, Bridge, Composite, Decorator, Facade, Flyweight,
Proxy, Chain of responsability, Command, Interpreter, Iterator, Mediator, Memento, State, Strategy, Template,
Visitor, Observer
![Page 178: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/178.jpg)
Les patterns JEE :
MVC (Model-View-Controller), Business delegate, Composite entity, DAO (Data Access Object), Front controller,
Intercepting filter, Service locator, Transfer object, IOC (Inversion Of Control)
JEE : Java Enterprise Edition
![Page 179: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/179.jpg)
3 grosses familles :
• Création : Factory, Builder, Singleton, etc.
• Structure : Facade, Decorator / Adaptor, Proxy, etc.
• Comportement : Iterator, Observer, etc.
![Page 180: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/180.jpg)
Chez vous
Classer les design patterns GOF dans les 3 familles : création, structure ou comportement.
![Page 181: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/181.jpg)
A lire sur le Web : http://www.developpez.com
![Page 182: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/182.jpg)
Singleton
![Page 183: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/183.jpg)
Le S
ingl
eto
n
![Page 184: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/184.jpg)
Le Singleton
public class NotesDesElevesService {
public Map<String, Double> findNotesDernierExamen() {
Map<String, Double> notes = new HashMap<String, Double>();
notes.put("Jean Dupont", 14.5);
notes.put("Alice Marini", 16.0);
notes.put("Marc Tonnolu", 8.0);
...
return notes;
}
}
![Page 185: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/185.jpg)
Le Singleton
public class NotesDesElevesService {
public Map<String, Double> findNotesDernierExamen() {
Map<String, Double> notes = new HashMap<String, Double>();
// recherche longue en base de donnees
return notes;
}
}
![Page 186: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/186.jpg)
Le Singleton
NotesDesElevesService service = new NotesDesElevesService();
Map<String, Double> notes = service.findNotesDernierExamen()
![Page 187: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/187.jpg)
Le Singleton
service1 = new NDES();
service1.findNDE()
service3 = new NDES();
service3.findNDE()
service2 = new NDES();
service2.findNDE()
service4 = new NDES();
service4.findNDE()
NDES 1
NDES 2
NDES 3
NDES 4
![Page 188: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/188.jpg)
Le Singleton
public class NotesDesElevesService {
private static NotesDesElevesService instance
= new NotesDesElevesService();
private NotesDesElevesService() {
...
}
public static NotesDesElevesService getInstance() {
return instance;
}
public Map<String, Double> findNotesDernierExamen() {
...
}
}
![Page 189: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/189.jpg)
Le Singleton
NotesDesElevesService service =
NotesDesElevesService.getInstance();
Map<String, Double> notes = service.findNotesDernierExamen()
![Page 190: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/190.jpg)
Le Singleton
service1 = getInstance();
service1.findNDE()
service3 = getInstance();
service3.findNDE()
service2 = getInstance();
service2.findNDE()
service4 = getInstance();
service4.findNDE()
NDES
![Page 191: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/191.jpg)
Le Singleton
public class NotesDesElevesService {
private static NotesDesElevesService instance;
private NotesDesElevesService() {
...
}
public static NotesDesElevesService getInstance() {
if(instance == null) {
instance = new NotesDesElevesService();
}
return instance;
}
...
}
![Page 192: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/192.jpg)
Chez vous
Dessiner le diagramme de classe UML du Singleton (avec les bonnes associations)
![Page 193: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/193.jpg)
Le S
ingl
eto
n
synchronized ?
![Page 194: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/194.jpg)
« Mémento Singleton » http://thierry-leriche-dessirier.developpez.com/tutoriels/java/design-pattern-mementos/
![Page 195: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/195.jpg)
Factory
![Page 196: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/196.jpg)
Fact
ory
![Page 197: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/197.jpg)
Factory
public enum RaceChienEnum {
LABRADOR("Labrador"),
CANICHE("Faux chien"),
DOBERMAN("Chien méchant");
private final String name;
RaceChienEnum(String name) {
this.name = name;
}
...
}
![Page 198: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/198.jpg)
Fact
ory
public class AnimalFactory {
public Chien getChien(RaceChienEnum race) {
switch (race) {
case CANICHE:
return new Caniche();
case DOBERMAN:
return new Doberman();
case LABRADOR:
return new Labrador();
default:
throw new IllegalArgumentException(
"Race de chien non gérée");
}
}
public Vache getVache(RaceVacheEnum race) {
...
}
}
![Page 199: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/199.jpg)
Façade
![Page 200: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/200.jpg)
Facade
![Page 201: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/201.jpg)
public class CommisDeCuisine {
public Plat cuisiner(String recette) {
Placard placard = Placard.getInstance();
Frigo frigo = Frigo.getInstance();
PlaqueDeCuisson plaque = PlaqueDeCuisson.getInstance();
Poele poele = placard.prendre("poele");
plaque.allumer();
List<Ingredient> ingredients
= frigo.prendre( {"oeuf", "oeuf", "fromage", "beurre"} );
while( plaque.chauffer(poele, ingredients) ) {
// attendre
}
Plat plat = poele.getContenu();
return plat;
}
...
}
pseudo code d’une façade
![Page 202: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/202.jpg)
Faca
de
participant Chef
participant CommisDeCuisine
participant Placard
participant Frigo
participant PlaqueDeCuisson
Chef->CommisDeCuisine: cuisiner
activate CommisDeCuisine
CommisDeCuisine->Placard: prendre
activate Placard
Placard-->CommisDeCuisine: poêle
deactivate Placard
CommisDeCuisine->PlaqueDeCuisson: allumer
activate PlaqueDeCuisson
CommisDeCuisine->Frigo: prendre
activate Frigo
Frigo-->CommisDeCuisine: oeufs, fromage,
beurre
deactivate Frigo
CommisDeCuisine->PlaqueDeCuisson: chauffer
PlaqueDeCuisson-->CommisDeCuisine: cuit_ok
deactivate PlaqueDeCuisson
CommisDeCuisine-->Chef: omelette
deactivate CommisDeCuisine
![Page 203: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/203.jpg)
Podcasts
Les Cast Codeurs http://lescastcodeurs.com
Le rendez-vous Tech http://frenchspin.com/fr
niptech / nipdev http://nipcast.com
Podcast science http://www.podcastscience.fm
Outils du manager http://www.outilsdumanager.com
![Page 204: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/204.jpg)
Iterator
![Page 205: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/205.jpg)
Iterator
John Marie Lucie Marc Paul
List<String> prenoms = new ArrayList<String>();
prenoms.add( "John" );
prenoms.add( "Marie" );
...
for( int i = 0; i < prenoms.size(); i++ ) {
String prenom = prenoms.get(i);
System.out.println(prenom);
}
![Page 206: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/206.jpg)
Iterator
John Marie Lucie Marc Paul
List<String> prenoms = ...
Iterator<String> iter = prenoms.iterator();
while( iter.hasNext() ) {
String prenom = iter.next();
System.out.println(prenom);
}
for( String prenom : prenoms ) {
System.out.println(prenom);
}
![Page 207: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/207.jpg)
Iterator
public class EnfantQuiCompteIterator
implements Iterator<Integer> {
public final static int NOMBRE_MAX = 100;
public final static int NOMBRE_DEPART = 1;
private int nombre = NOMBRE_DEPART;
public boolean hasNext() {
return nombre < NOMBRE_MAX;
}
public Integer next() {
return ++nombre;
}
![Page 208: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/208.jpg)
Observer
![Page 209: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/209.jpg)
Ob
serv
er
public enum FeuState {
VERT(60000), // 60 secondes
ORANGE(3000), // 3 secondes
ROUGE(60000); // 60 secondes
private final long duree;
FeuState(long duree) {
this.duree = duree;
}
public FeuState next() {
switch (this) {
case VERT: return ORANGE;
case ORANGE: return ROUGE;
case ROUGE: return VERT;
default: throw new ISE("...");
}
}
![Page 210: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/210.jpg)
Ob
serv
er
public class FeuTricolor extends Observable
implements Runnable {
private FeuState state;
public FeuState getState() {
return state;
}
@Override
public void run() {
while (true) {
try {
Thread.sleep(state.getDuree());
state = state.next();
notifyObservers(state);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
![Page 211: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/211.jpg)
Observ
er
public class Conducteur implements Observer {
Voiture voiture = ...
@Override
public void update(Observable obj, Object value) {
if (obj instanceof FeuTricolor) {
FeuState state = (FeuState) value;
if (state == FeuState.VERT) {
voiture.accelerer();
}
}
}
}
![Page 212: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/212.jpg)
![Page 213: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/213.jpg)
JDBC
![Page 214: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/214.jpg)
id name race nb_de_mamelle poids
1 Tigrou labrador 6 45.6
2 Titi caniche 4 6.2
3 Uta labrador 47.1
… … … … …
35 Medor doberman 4 60.0
… … … … …
Table CHIEN
![Page 215: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/215.jpg)
@Override
public List<Labrador> findLabradors() {
List<Labrador> labradors = new ArrayList<Labrador>();
...
return labradors;
}
![Page 216: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/216.jpg)
// (1)
Class.forName("oracle.jdbc.driver.OracleDriver");
// (2)
Connection con
= DriverManager.getConnection("monUrl",
"monLogin", "monPassword");
// (3)
String sql
= "SELECT * FROM chien WHERE race = 'labrador' ";
// (4)
Statement statement = con.createStatement();
// (5)
ResultSet rs = statement.executeQuery(sql);
JDBC
select
![Page 217: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/217.jpg)
// (6)
while ( rs.next() ) {
// (7)
String name = rs.getString("name");
double poids = rs.getDouble("poids");
int nbMamelle = rs.getInt("nb_de_mamelle");
// (8)
Labrador labrador = new Labrador();
labrador.setName(name);
labrador.setWeight(poids);
labrador.setNombreMamelle(nbMamelle);
// (9)
labradors.add(labrador);
}
JDBC
select Iterator ?
![Page 218: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/218.jpg)
JDBC
insert
String sql = "INSERT INTO chien "
+ " (name, race, nb_de_mamelle, poids) "
+ " VALUES ( '" + labrador.getName()
+ "', 'labrador', "
+ labrador.getNombreMamelle() + ", "
+ labrador.getWeight() + " )";
Statement stmt = con.createStatement();
stmt.executeUpdate(sql);
![Page 219: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/219.jpg)
JDBC
Insert (PreparedStatement)
String sql = "INSERT INTO chien "
+ " (name, race, nb_de_mamelle, poids) "
+ " VALUES ( ?, 'labrador', ?, ?) ";
PreparedStatement stmt = con.prepareStatement(sql);
stmt.setString( 1, labrador.getName() );
stmt.setInt( 2, labrador.getNombreMamelle() );
stmt.setDouble( 3, labrador.getWeight() );
stmt.executeUpdate(sql);
![Page 220: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/220.jpg)
« Introduction à JPA, application au chargement de données depuis une base MySQL » http://thierry-leriche-dessirier.developpez.com/tutoriels/java/charger-donnees-mysql-jpa-intro/
« JDBI » http://www.jdbi.org/
« Named Parameters for PreparedStatement » http://www.javaworld.com/article/2077706/core-java/named-parameters-for-
preparedstatement.html
« Charger des données depuis une base MySQL en 5 minutes » http://thierry-leriche-dessirier.developpez.com
![Page 221: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/221.jpg)
![Page 222: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/222.jpg)
Ce qu’on a vu en cours et en TD :
• UML ; • Java ; • Tests (TDD, 3T) ; • Design pattern ; • DAO (JDBC / CSV / …) ; • Swing (table model) ; • Story board ; • Maven ; • Subversion/Git ; • Scrum/Kanban ; • etc.
![Page 223: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/223.jpg)
Archive ZIP projet_GLPOO_ESIEA_2014-2015_groupe-Dupont.zip
Rapport PDF rapport.pdf
Notice notice.txt
Email Projet GLPOO ESIEA 2014-2015 groupe Dupont
![Page 224: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/224.jpg)
Thème du projet de GL ( Eternity )
Projet ( http://www.icauda.com/cours.php )
![Page 225: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/225.jpg)
![Page 226: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/226.jpg)
icauda.com © 1996-2015 Tous droits et bases réservés
Reproduction partielle ou complète strictement interdite sans l’autorisation de l’auteur.
![Page 227: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/227.jpg)
Cours
FAQ
Interviews
Articles / tutoriels
Magazine
Forums
News
Agendas
Critiques
![Page 228: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/228.jpg)
13 OOO OOO pages vues par mois
5 500 000 visites par mois
2 500 000 visites uniques par mois
5 000 messages forum par jour
![Page 229: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/229.jpg)
![Page 230: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/230.jpg)
SWING
![Page 231: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/231.jpg)
JButton JRadioButton JCheckBox
JComboBox JList
JMenu
JTextField JTextArea
![Page 232: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/232.jpg)
JLabel
JFileChooser JTable
JDialog JFrame
JProgressBar
![Page 233: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/233.jpg)
« A Visual Guide to Swing Components »
http://docs.oracle.com/javase/tutorial/ui/features/components.html
http://docs.oracle.com/javase/tutorial/ui/features/compWin.html
![Page 234: Cours de Génie Logiciel / ESIEA 2014-2015](https://reader034.vdocuments.mx/reader034/viewer/2022052506/557ca7b0d8b42ab4218b52b2/html5/thumbnails/234.jpg)