Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.

Similar presentations


Presentation on theme: "Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo."— Presentation transcript:

1 Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo

2 Introduction Project: UML Class Diagram Drawing Complex Issue Project Objective Practice Aspect Oriented Design & Development No problem with Rational! ;)

3 Problem Statement Complex nature of Software Design Notation UML Develop a UML Design Tool Implement using Aspect Technology

4 Requirements Analysis Create Class Structures Present the Structure Logical View Diagram View Support Basic UML Elements Export Images Print Images

5 User Interface Prototype

6 Use Cases

7

8 Object-Oriented Design Logical Model Diagram Model Views Tools Managers TreeViewManager DiagramViewManager

9 Logical Model Composite Pattern

10 Managers - Singleton Pattern public class Manager { private static Manager instance = null; private Manager() { } public static Manager getInstance() { if (instance == null) { instance = new Manager(); } return instance; }

11 Other Design Patterns Factory Method Creating diagram element UIs Observer Reflecting data model updates to views Faćade Saving, loading Project Drawing diagram contents

12 Crosscutting Concerns (Aspects) View Update Product Version Generation

13 View Updating Update of views due to model change View Updating Crosscutting Concern

14 View Updating Tangling Code Scattered Concern class NodeTool { void handleMouseMove() {... DiagramViewManager.getInstance(). getCurrentDiagramEditor().repaint(); } class AssociationTool { void handleMouseMove() {... DiagramViewManager.getInstance(). getCurrentDiagramEditor().repaint(); }

15 Aspect Code View Update aspect ViewUpdating { }

16 Aspect Code View Update aspect ViewUpdating { pointcut updatesView(): call(* tool.*.*(..)); }

17 Aspect Code View Update aspect ViewUpdating { pointcut updatesView(): call(* tool.*.*(..)); after(): updatesView() { DiagramViewManager.getInstance(). getCurrentDiagramEditor().repaint(); }

18 View Updating using AOP Crosscutting is localized No scattering No tangling Increased modularity Aspect Code Base Code Changes can be easily handled Scenario: Interface of “DiagramEditor” has changed Solution: Just need to change the “advice” code after(): updatesView() { DiagramViewManager.getInstance(). getCurrentDiagramEditor().repaint(); } after(): updatesView() { DiagramViewManager.getInstance(). getCurrentDiagramEditor().invalidate(); }

19 Product Version Generation Different Versions Personal Standard Enterprise How to develop? Different Source Trees  Enterprise Edition Source Personal Edition Source Standard Edition Source Changes are unmanageable

20 Product Version Generation Different Versions Personal Standard Enterprise How to develop? Different Source Trees  Inline checking  public void printDiagram() { int version = getVersion(); if ( version == ENTERPRISE ) {... } else if ( version() == STANDARD ) {... } else {... } Scattered Concern Tangling Code

21 Product Version Generation Different Versions Personal Standard Enterprise How to develop? Different Source Trees  Inline checking  Aspects

22 Aspect Code Version Control aspect VersionControlling { }

23 Aspect Code Version Control aspect VersionControlling { pointcut enterpriseOps(): call(* MainFrame.printDiagram()) || call(* MainFrame.exportDiagram()); }

24 Aspect Code Version Control aspect VersionControlling { pointcut enterpriseOps(): call(* MainFrame.printDiagram()) || call(* MainFrame.exportDiagram()); around(): enterpriseOps() { JOptionPane.showMessageDialog(null, "This operation is supported in Enterprise Edition.", "Warning", JOptionPane.WARNING_MESSAGE); }

25 Product Version Generation using AOP Crosscutting is localized No scattering No tangling Increased modularity Aspect Code Base Code Changes can be easily handled Scenario: Change supported operations in versions Solution: Just need to change the “pointcut” pointcut enterpriseOps(): call(* MainFrame.printDiagram()) || call(* MainFrame.exportDiagram()); pointcut enterpriseOps(): call(* MainFrame.layoutDiagram());

26 Aspect Oriented Design Simple, easy to understand design Aspect notation UML extension mechanism (stereotypes)

27 Aspect Specification Using Composition Filters Version Control versionControl: Error = { enterpriseEdition => {printDiagram, exportDiagram}, standardEdition ~> {printDiagram, exportDiagram} };

28 Conclusion Complex Software Systems Several concerns were crosscut Not easy to localize, scattering, tangling Reduces modularity We have overcame these using AOP Design became more modular Changes became more manageable

29 Demo

30 Thank You! Questions?


Download ppt "Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo."

Similar presentations


Ads by Google