Successfully reported this slideshow.
Design Patterns Round-trip     A trip in the marvellous    country of design pattern    application and detection
Us     n   Hervé Albin-Amiot         – 3rd year PhD student         – Partly funded by Soft-Maint S.A. (France)     n   Ya...
Overview on design patternsn Design   patterns are useful for:  – Designing  – Implementating  – Documentating  – Re-engin...
Our Goalsn We   want: – To help designer – To help maintainern We   do not want: – To replace the designer – To be Caliph ...
Goals of the automationn We   want to assist developers:  – In applying design patterns  – In detecting design patternsn W...
Common design patterndescription: A Meta-Model
Abstract model                                 Informal descriptions                                 from [GoF]      Trans...
PatternsBox Abstract model                                                  PtidejComposite pattern concrete model 1      ...
icA Bas xample : Application   1/4     En PatternsBox is a tool to instantiate design patterns from a repository of patterns
icA Bas xample : Application   2/4     En From the pattern, we access the pattern description
icA Bas xample : Application   3/4     En We adapt actors and roles to the current context
icA Bas xample : Application                                                      4/4     En The tool generates the code o...
icA Bas xample : Detection     1/6     En Ptidej detects instances  of the abstract model
icA Bas xample : Detection                 2/6     En It is a tool that identifies design patternsn It loads and  displays...
icA Bas xample : Detection       3/6     En Itgenerates a CSP from the  architecturen The CSP has  the architecture  for m...
icA Bas xample : Detection                4/6     EThe PaLM explanation-based constraint solver
icA Bas xample : Detection            5/6     En Thetool highlights the distorted and complete design patterns found in th...
icA Bas xample : Detection             6/6     En The tool states the differences between the distorted solutions and the ...
Future                                 1/2n To   have two separate meta-models  – One specific for design patterns  – One ...
Future                               2/2n To take few months of holidaysn To manage dynamic informationn To define an oper...
Upcoming SlideShare
Loading in …5
×

ECOOP01 PhDOOS.ppt

152 views

Published on

Published in: Technology, Design
  • Be the first to comment

  • Be the first to like this

ECOOP01 PhDOOS.ppt

  1. 1. Design Patterns Round-trip A trip in the marvellous country of design pattern application and detection
  2. 2. Us n Hervé Albin-Amiot – 3rd year PhD student – Partly funded by Soft-Maint S.A. (France) n Yann-Gaël Guéhéneuc – 2nd year PhD student – Partly funded by Object Technology International, Inc. (Canada) n PhDs hosted by the École des Mines de Nantes
  3. 3. Overview on design patternsn Design patterns are useful for: – Designing – Implementating – Documentating – Re-engineeringn Design patterns are difficult to use: – Lack of formalism – And thus, lack of automation
  4. 4. Our Goalsn We want: – To help designer – To help maintainern We do not want: – To replace the designer – To be Caliph in the Caliphs steadn We need to automate the uses of design patterns
  5. 5. Goals of the automationn We want to assist developers: – In applying design patterns – In detecting design patternsn We want to provide round-trip using design patternsn We need a common design pattern description
  6. 6. Common design patterndescription: A Meta-Model
  7. 7. Abstract model Informal descriptions from [GoF] Translates into Instance of Pattern Instance of PInterface Instance of PClass Instance of PAssoc Instance of PDelegation name() Instance of PMethod
  8. 8. PatternsBox Abstract model PtidejComposite pattern concrete model 1 Composite pattern concrete model n • • ‚ ‚ ‚ ‚ Composite pattern abstract model • •Composite pattern concrete model 1 Composite pattern concrete model n (source code) (source code)
  9. 9. icA Bas xample : Application 1/4 En PatternsBox is a tool to instantiate design patterns from a repository of patterns
  10. 10. icA Bas xample : Application 2/4 En From the pattern, we access the pattern description
  11. 11. icA Bas xample : Application 3/4 En We adapt actors and roles to the current context
  12. 12. icA Bas xample : Application 4/4 En The tool generates the code of the pattern for Java (or for PaLM, …) public interface MyComponent { public abstract void myOperation(); } public class MyComposite implements MyComponent { // Association: myChildren private java.util.Vector myChildren = new java.util.Vector(); public void add (MyComponent myComponent) { myChildren.addElement(myComponent); } public void remove (MyComponent myComponent) { myChildren.removeElement(myComponent); } // Method linked to: myChildren public void myOperation() { for (Enumeration enum= myChildren.elements(); enum.hasMoreElements (); ((MyComponent) enum.nextElement()).myOperation()); } } public class MyLeaf implements MyComponent { public void myOperation() { } }
  13. 13. icA Bas xample : Detection 1/6 En Ptidej detects instances of the abstract model
  14. 14. icA Bas xample : Detection 2/6 En It is a tool that identifies design patternsn It loads and displays an application architecture
  15. 15. icA Bas xample : Detection 3/6 En Itgenerates a CSP from the architecturen The CSP has the architecture for model and the abstract model for constraints
  16. 16. icA Bas xample : Detection 4/6 EThe PaLM explanation-based constraint solver
  17. 17. icA Bas xample : Detection 5/6 En Thetool highlights the distorted and complete design patterns found in the architecture
  18. 18. icA Bas xample : Detection 6/6 En The tool states the differences between the distorted solutions and the abstract model
  19. 19. Future 1/2n To have two separate meta-models – One specific for design patterns – One specific for source coden To extend PatternsBox to apply design patterns to existing code using a source-to-source transformation enginen To use XML for the patterns repository and XSLT to generate Java examples
  20. 20. Future 2/2n To take few months of holidaysn To manage dynamic informationn To define an operational semantics for association, aggregation, … linksn To improve the constraintsn To integrate our tools with IDEs

×