Programmation orientée aspect - Free
Transcript of Programmation orientée aspect - Free
![Page 1: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/1.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 1
BorCon 2002 : 2106 – Programmation orientée aspect
Emmanuel Boudrant - Olivier MangezCross Systems
Course # 2106
Programmation orientée aspect
(AOP)
![Page 2: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/2.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 2
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Petite théorie de l’évolution…Petite théorie de l’évolution…
![Page 3: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/3.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 3
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
• Appels centralisés : bonne modularité
Parseur XML de Tomcat Parseur XML de Tomcat
© C
opyr
ight
199
9-20
02 X
erox
Cor
pora
tion
![Page 4: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/4.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 4
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
• Appels centralisés : bonne modularité
Analyse des requêtes de Tomcat Analyse des requêtes de Tomcat
© C
opyr
ight
199
9-20
02 X
erox
Cor
pora
tion
![Page 5: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/5.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 5
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Les traces de Tomcat Les traces de Tomcat
• Appels non centralisés : mauvaise modularité
© C
opyr
ight
199
9-20
02 X
erox
Cor
pora
tion
![Page 6: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/6.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 6
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Les limitesLes limites
Module 1
Module 2
Module 3
Module de traces
• Le seul moyen mettre en oeuvre un module de log en programmation objet, c’est de l’appeler…la dépendance est inévitable.
![Page 7: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/7.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 7
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Une solutionUne solution
Module 1
Module 2
Module 3
Module de traces
![Page 8: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/8.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 8
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Un saut dans l’évolutionUn saut dans l’évolution
![Page 9: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/9.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 9
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
PlanPlan• Anatomie d’un aspect• Aspect, mode d’emploi• Utilisation des aspects• Solutions orientées aspect
![Page 10: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/10.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 10
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Anatomie d’un aspectAnatomie d’un aspect• Quoi : Advice• Quand : PointCut
![Page 11: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/11.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 11
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
PlanPlan• Anatomie d’un aspect• Aspect, mode d’emploi• Utilisation des aspects• Solutions orientées aspect
![Page 12: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/12.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 12
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Aspect, mode d’emploiAspect, mode d’emploi• Pointcut
• Méthode• Attribut• Exception…
• Advice• Paramètres• Valeur de retour• Appelé…
![Page 13: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/13.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 13
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
PlanPlan• Anatomie d’un aspect• Aspect, mode d’emploi• Utilisation des aspects• Solutions orientées aspect
![Page 14: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/14.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 14
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Utilisation des aspectsUtilisation des aspects• Aide au développement• Composants de l’application
![Page 15: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/15.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 15
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
PlanPlan• Anatomie d’un aspect• Aspect, mode d’emploi• Utilisation des aspects• Solutions orientées aspect
![Page 16: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/16.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 16
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
Solutions orientées aspectSolutions orientées aspect• AspectJ• JAC
• AspectJ = 1 solution orientée aspect• AspectJ est à POA ce que Java est à POO
• JAC = une autre solution orientée aspect• JAC propose des aspects ~ serveur
d’application
![Page 17: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/17.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 17
BorCon 2002 : 2106 – Programmation orientée aspect
The end
![Page 18: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/18.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 18
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
ConclusionConclusion• La POA dans les projets
![Page 19: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/19.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 19
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
RéférencesRéférences• aspectj.org• jac.aopsys.com
![Page 20: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/20.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 20
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
ContactContact• Emmanuel Boudrant :
[email protected]/~eboudrant/borcon2002/
• Olivier Mangez :[email protected]
![Page 21: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/21.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 21
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
ContactContact• Cross Systems :
13 rue Fernand Léger, 75020 Paris
Tel : 01 43 58 61 61Fax : 01 43 58 62 43
![Page 22: Programmation orientée aspect - Free](https://reader035.fdocument.pub/reader035/viewer/2022081515/62b0339256d4c564d31353a8/html5/thumbnails/22.jpg)
Emmanuel Boudrant - Olivier Mangez, Cross Systems 22
BorCon 2002 : 2106 – Programmation orientée aspect
E. Boudrant et O. Mangez - Cross Systems
A vos questions !A vos questions !