Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

UML for Aspect Oriented Design

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Aspect oriented architecture
Aspect oriented architecture
Wird geladen in …3
×

Hier ansehen

1 von 17 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Anzeige

Ähnlich wie UML for Aspect Oriented Design (20)

Anzeige

Aktuellste (20)

UML for Aspect Oriented Design

  1. 1. Understanding The need of A UML-based- 3D modeling tool for Aspect-oriented Software Development Jorge Edison Lascano ESPE Faculty Member USU Phd student
  2. 2. Motivation • Aspect-oriented Software Development, the need of modeling tools and techniques has arisen • The most accepted Modeling Language is UML • When weaving the modeled aspects in the base models, the woven code disappears visually to the designer, making difficult if not impossible to verify the Cross-Cutting Concerns (CCC) throughout the generated diagrams.
  3. 3. The solution • A 3D-modeling/viewing tool based on UML and AspectJ to surpass a real representation of the woven advices in the correspondent join points for any AOSD project in its modeling from requirements, to analysis and design
  4. 4. Introduction • a tool should be capable to apply reverse engineering to get the UML diagrams and allow to see where Aspect Oriented is applied. • UML diagrams do not give a correct representation of the weaving, and they visualized the merged diagrams as traditional UML diagrams, therefore, CCCs got lost visually and the developers can not track their models.
  5. 5. Introduction • In a 3D modeling tool, the third dimension would be the Cross-cutting concern(s) represented by an aspect, and the two dimensions will be the base diagrams before applying the correspondent advice.
  6. 6. Aspect Oriented Programming • According to Kuloor and Eberlein, AOP “focuses on identifying crosscutting concerns in a system and implement them as a collection of loosely coupled aspects.”
  7. 7. Definitions • A concern, is a requirement of the system, and if this affects more than one class and their actions are tangled, it is called a crosscutting concern. • an Aspect, is a construct that allows the introduction of some new behavior, the advice, in some point of the program, the join point.
  8. 8. Definitions • Inter-type declarations, an aspect also may introduce new attributes or inheritance, an inter-type declaration. • Weaving. The process of interfering the common state or behavior of one or more classes by an aspect is known as weaving. Weaving may happen when code is written, through compile-time, post-compile time, load time and run-time
  9. 9. AOP support • Haskell, • Java AspectJ, • JavaScript, • Logtalk, • Lua, • make, • ML, • PHP, • Racket, • Perl, • Prolog, • Python, • Ruby, • Squeak Smalltalk. • .NET Framework languages (C# / VB.NET), • ActionScript, • Ada, • AutoHotkey, • C / C++, • COBOL, • The Cocoa Objective-C frameworks, • ColdFusion, • Common Lisp, • Delphi, • Delphi Prism, • Emacs Lisp, • Groovy,
  10. 10. AspectJ • An aspect in AspectJ is defined as a class with three main sections: • its attributes, which are a set of local variables that can represent the state of the aspect; • the pointcuts, which will define the points where the behavior of the base code will be affected, usually they are defined as executions or as calls based on a signature that specify the set of points (join points); and • the advices that implement the behavior to be injected before, after or around the specific join point.
  11. 11. Sample code • public abstract aspect DeployingGenerator { • static boolean isCodeGenerated; • static boolean isCodeBuilt; • static Object obj; • StringBuilder sb=new StringBuilder(""); • • abstract pointcut generateCode(); • abstract pointcut build(); • • boolean around () : generateCode(){ • obj=thisJoinPoint.getTarget(); • isCodeGenerated = proceed(); • sb=new StringBuilder(""); • if(!isCodeGenerated){ • sb.append(obj.getClass().getSimpleName() + ", when " + thisJoinPoint.getSignature().getName() + "ing, was " + isCodeGenerated); • sb.append("nRead log screen to locate the errors"); • JOptionPane.showMessageDialog(Screens.frm05BP, sb.toString()); • } • return isCodeGenerated; • } • }
  12. 12. UML and aspects A logging Aspect Model using a UML collaboration Stereotype, source: Kande et al.
  13. 13. UML and Aspects Sequence Diagram Weaving Example, source: Kienzle et al.
  14. 14. 3D UML modeling • There is a need to address the orthogonal modeling of Core components alongside aspectual components”, so a 3D modeling tool is needed. • pointcuts and advice affect program flow (SD), inter-type declarations affect a program´s classes structure” • the weaving process, Aspects, Pointcuts and Advices are modeled as classifiers; Pointcuts and advices also need SDs
  15. 15. An example of 3d UML Class Diagram Class Diagrams merging
  16. 16. Questions ?
  17. 17. References • Kuloor; Ch., Eberlein; A., 2003. “Aspect-Oriented Requirements Engineering for Software Products Lines”, 2003 IEEE Computer Society • Kande; J., Kienzle; J., Strohmeier; A., 2002. “From AOP to UML – A Bottom-up Approach”Workshop on Aspect-Oriented Modeling with UML at AOSD2002, Enschede, The Netherlands, April 22, 2002 • Kienzle; J., Abed; W., Klein; J., 2009. “Aspect- Oriented Multi-View Modeling”, March 2-6, 2009 AOSD, pp. 87-98.

×