Presentation is loading. Please wait.

Presentation is loading. Please wait.

Aspect-Oriented Software Development (236608) 1 Aspect-Oriented Software Development (AOSD) Tutorial #1 Course site :

Similar presentations


Presentation on theme: "Aspect-Oriented Software Development (236608) 1 Aspect-Oriented Software Development (AOSD) Tutorial #1 Course site :"— Presentation transcript:

1 Aspect-Oriented Software Development (236608) 1 Aspect-Oriented Software Development (AOSD) Tutorial #1 Course site : http://webcourse.cs.technion.ac.il/236608/Winter2007-2008/ T.A. :Emilia Katz emika@cs.technion.ac.il Reception hours: Sunday 17:00 – 18:00 Taub 641

2 Aspect-Oriented Software Development (236608) 2 Tutorial 1: Why aspects? We will see: Example system Illustration of tangling and scattering

3 Aspect-Oriented Software Development (236608) 3 General Remarks Facts about aspects: Aspects can be identified at different stages of the development cycle Ideally: “Low impact (non-invasiveness) of changes” Additive changes in requirements  additive change in design and code. Tangling and scattering reduce reusability and traceability, and changes become invasive

4 Aspect-Oriented Software Development (236608) 4 Example : SEE Software Engineering Environment for programs consisting of expressions Description: Supports specification of expression programs Contains set of tools for expressions: –evaluation –display –check (syntactic & semantic correctness)

5 Aspect-Oriented Software Development (236608) 5 Example : SEE – contd. Development process (simplified): Requirements (in natural language) Design (UML) Implementation (Java) decompose by tool decompose by object Intuition: difference in decompositions causes scattering and tangling!

6 Aspect-Oriented Software Development (236608) 6 Design for SEE (partial) expression number … binary operator … unary operator … plus … minus … unary plus … unary minus … access/modify apply tools create() getters setters eval() display() check()

7 Aspect-Oriented Software Development (236608) 7 New Requirements for SEE Persistence: expressions should be optionally persistent Style check support: it should be possible to check expressions against multiple styles (fonts, naming conventions, etc.)

8 Aspect-Oriented Software Development (236608) 8 Adding Persistence expression number … binary operator … unary operator … plus … minus … unary plus … unary minus … access/modify apply tools save - retrieve persistent objects on first access - flush modifications back to database  scattering  tangling

9 Aspect-Oriented Software Development (236608) 9 Adding Style Checks expression number … binary operator … unary operator … plus … minus … unary plus … unary minus … access/modify apply tools let 3 style checkers be defined visitor ch. 1ch. 2ch. 3 accept(visitor) affect display() method instead of check() method

10 Aspect-Oriented Software Development (236608) 10 Style Checks + Persistance expression number … binary operator … unary operator … plus … minus … unary plus … unary minus … access/modify apply tools save persistence of style- checkers state information accept(visitor) visitor ch. 1ch. 2ch. 3

11 Aspect-Oriented Software Development (236608) 11 Adding Persistence as Aspect expression number … binary operator … unary operator … plus … minus … unary plus … unary minus … access/modify apply tools persistence asp. pointcut definition advice() save() retrieve() flush()

12 Aspect-Oriented Software Development (236608) 12 Crosscutting More than one Hierarchy Example - system for exams in arithmetic Initially, includes exams: Questions: each question is an expression Answers: each answer is a number Grade: grade is calculated based on answers checks (use the “eval()” function of the questions, check equality with the answers, count correct answers percentage) Addition: Persistency of the exams (the whole history)!

13 Aspect-Oriented Software Development (236608) 13 Adding Persistency - Results Crosscutting more than one class hierarchy? Expressions (Questions)? Answers? Grades? Exam class? Yes! Crosscutting more than one class hierarchy! ✔ ✔ ✔ ✔

14 Aspect-Oriented Software Development (236608) 14 Adding Persistency - Treatment Without aspects – changes in: Expressions (Questions) Answers Grades Exam as a whole With aspects – Reuse persistency aspect, with changes in: Pointcut definition [on what classes to be applied, …] Additional aspect advice (may be unnecessary)


Download ppt "Aspect-Oriented Software Development (236608) 1 Aspect-Oriented Software Development (AOSD) Tutorial #1 Course site :"

Similar presentations


Ads by Google