1 / 27

Aspect Oriented Software Development

Aspect Oriented Software Development. By: Mostafa El Barbary. On July 20 th 2008, our name has changed from to. Objectives. To explain the principle of separation of concerns in software development To introduce the fundamental ideas underlying aspect-oriented development

oksana
Télécharger la présentation

Aspect Oriented Software Development

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 By: Mostafa El Barbary

  2. On July 20th 2008, our name has changed from to

  3. Objectives • To explain the principle of separation of concerns in software development • To introduce the fundamental ideas underlying aspect-oriented development • To show how an aspect-oriented approach can be used at all stages of development

  4. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  5. Introduction • A concern is an area of interest or focus in a system. Concerns are the primary criteria for decomposing software into smaller, more manageable and comprehensible parts that have meaning to a software engineer. • Object-oriented programming, describing concerns as objects • Procedural programming, describing concerns as procedures

  6. Introduction • Separation of concerns (SOC) The principle of separation of concerns states that software should be organized so that each program element does one thing and one thing only. • Each program element should therefore be understandable without reference to other elements. • Object-oriented programming languages such as Java can separate concerns into objects. • Service-oriented architecture can separate concerns into services. • Procedural programming languages such as C and Pascal can separate concerns into procedures.

  7. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  8. Problem Statement Transfer Concern Authentication Concern Logging Concern TransactionConcern

  9. Problem Statement Banking System Transfer Concern Cash Deposit Concern Authentication Concern Authentication Concern Logging Concern Logging Concern Transaction Concern Transaction Concern Cash Withdrawal Concern Authentication Concern Logging Concern Transaction Concern

  10. Problem Statement • Code is scattered when one concern (like logging) is spread over a number of modules (e.g., Transfer method). • Modules end up tangled with multiple concerns (e.g., Transfer, logging, and Authentication).

  11. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  12. Aspect Solution • AOSD attempts to solve this problem by allowing the programmer to express cross-cutting concerns (e.g., Transaction, logging, and Authentication) in stand-alone modules called aspects. • Used in conjunction with other approaches - normally object-oriented software engineering. • Aspects encapsulate functionality that cross-cuts and co-exists with other functionality. • Aspects include a definition of where they should be included in a program as well as code implementing the cross-cutting concern.

  13. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  14. Aspect Anatomy aspect authentication //this is the aspect { before: call (public void Transfer (..)) // this is a pointcut { // this is the advice int tries = 0 ; string userPassword = Password.Get ( tries ) ; while (tries < 3 && userPassword != thisUser.password ( ) ) { // allow 3 tries to get the password right tries = tries + 1 ; userPassword = Password.Get ( tries ) ; } if (userPassword != thisUser.password ( )) then //if password wrong, assume user has forgotten to logout System.Logout (thisUser.uid) ; } } // authentication

  15. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  16. Aspect Terminology

  17. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  18. Aspect Weaving • Aspect weavers process source code and weave the aspects into the program at the specified pointcuts.

  19. Aspect Weaving

  20. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  21. Evolution of Systems Development Methods

  22. Agenda Introduction Problem Statement Aspect Solution Aspect Anatomy Aspect Terminology Aspect Weaving Evolution of Systems Development Methods Aspect Oriented Software Development

  23. Aspect Oriented Software Development • A holistic approach to developing software systems with aspects. • Better modularity for functional requirements, nonfunctional requirements, platform specifics, and so on and keeping them separate from each other. • AOSD is not just AOP. It encompasses a whole range of techniques to help you achieve better modularity. • object orientation • component-based development • design patterns • object-oriented frameworks such as J2EE and .NET, and more

  24. Aspect Oriented Software Development ... Requirements Engineering ... Architecture ... Design Aspect-oriented... ... Programming ... Verification techniques

  25. Q&A

  26. Mostafa Elbarbary 012-428-6547 Mostafa.elbarbary@its.ws

  27. Thank You

More Related