1 / 14

Aspect-Oriented Software Development (AOSD) Tutorial #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.

oren-spence
Download Presentation

Aspect-Oriented Software Development (AOSD) Tutorial #1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 Aspect-Oriented Software Development (236608)

  2. Tutorial 1: Why aspects? We will see: • Example system • Illustration of tangling and scattering 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 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) 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! Aspect-Oriented Software Development (236608)

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

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

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

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

  11. Adding Persistence as Aspect save() retrieve() flush() persistence asp. expression pointcut definition access/modify advice() apply tools binary operator … unary operator … number … minus … unary plus … unary minus … plus … 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)! 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! ✔ ✔ ✔ ✔ 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) Aspect-Oriented Software Development (236608)

More Related