aspect oriented software development

22
Aspect Oriented Software Aspect Oriented Software Development Development By: Maryam Malekzad M.Tech II - 11301

Upload: maryam-malekzad

Post on 30-Jun-2015

224 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Aspect oriented software development

Aspect Oriented Software Aspect Oriented Software DevelopmentDevelopment

By:

Maryam Malekzad

M.Tech II ­ 11301

Page 2: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 2

Birth of AOSD ;)Birth of AOSD ;)AOSDAOSD describes a number of approaches to software 

modularization and composition including, in order of publication:

 reflection and metaobject protocols, Composition Filters, developed at the University of Twente in the University of Twente in the NetherlandsNetherlands, 

Subject­Oriented Programming (later extended as Multidimensional Separation of Concerns) at IBMIBM

Feature Oriented Programming at University of Texas  University of Texas at Austinat Austin

Page 3: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 3

Birth of AOSD    ­ continue ­Birth of AOSD    ­ continue ­

Adaptive Programming at Northeastern University, Northeastern University, USAUSA

and Aspect­Oriented Programming (AOP) at Palo Palo Alto Research Center.Alto Research Center.

The term aspect­orientedaspect­oriented was introduced by was introduced by  Gregor Kiczales Gregor Kiczales and his team at Palo Alto Research Center

Page 4: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 4

What is the main Idea?What is the main Idea?Aspect­oriented software development (AOSD):Aspect­oriented software development (AOSD):

is an emerging software development technology that seeks 

new modularizations of software systems  in order to isolate secondary or  supporting functions from the main program's business 

logic.

 AOSD allows multiple concerns to be expressed  separately  and automatically unified into working systems.

Page 5: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 5

AOSD's target?AOSD's target?

Aspect­Oriented Software DevelopmentAspect­Oriented Software Development focuses on

the identification, specification and  representation of cross­cutting concerns and their modularization into separate functional 

units as well as their automated composition into a 

working system.

Page 6: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 6

AOSD's target?    ­ continue ­AOSD's target?    ­ continue ­

The focus of Aspect­Oriented Software Development (AOSD) is in the investigation and implementation of new structures for software modularitysoftware modularity that provide support for explicit abstractions to modularize concerns.

Page 7: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 7

What is ”Aspect” ?What is ”Aspect” ? (1)(1) An aspect is a module that encapsulates a concern.  An aspect is composed of pointcuts, advice bodies 

and inter­type declarations.  In some approaches, and aspect may also contain 

classes and methods. Inter­type declarations allow the programmer to 

modify a program's static structure, such as class members and classes hierarchy. New members can be inserted and classes can be pushed down the class hierarchy.

Page 8: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 8

What is ”Aspect” ? What is ”Aspect” ?  (2)(2)

An aspect is a common feature that's typically scattered across methods, classes, object hierarchies, or even entire object models. It is behavior that looks and smells like it should have structure, but you can't find a way to express this structure in code with traditional object­oriented techniques. 

Page 9: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 9

What is ”Pointcut” ?What is ”Pointcut” ?

In aspect­oriented computer programming:aspect­oriented computer programming:  a pointcut is a set of join points.

 ­ Whenever the program execution reaches one of the join points described in the pointcut, a piece of code associated with the pointcut (called advice) is executed.

­ This allows a programmer to describe where and when additional code should be executed in addition to an already defined behavior. 

Page 10: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 10

What is ”Pointcut” ?         ­continue ­What is ”Pointcut” ?         ­continue ­

Pointcut Pointcut  permits the addition of aspects to existing software, or the design of software with a clear separation of concerns, wherein the programmer weaves (merges) different aspects into a complete application.

Page 11: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 11

AOP ?!AOP ?!

Aspect­oriented programming (AOP)Aspect­oriented programming (AOP) is a programming paradigm that aims to:

 increase modularity by allowing the separation of cross­cutting 

concerns.  AOP forms a basis for aspect­oriented software 

development.

Page 12: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 12

Cross­cutting Concerns Vs. Core ConcernCross­cutting Concerns Vs. Core Concerncross­cutting concernscross­cutting concerns are :

aspects of a program that affect other concerns. 

These concerns often  cannot be cleanly decomposed from the rest of the 

system in both  the design  and implementation, and 

can result in either  scattering (code duplication), tangling (significant dependencies between systems),  or both.

Page 13: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 13

The implementation of a concern is scatteredscattered if its code is spread out over multiple modules. The concern affects the implementation of multiple modules. Its implementation is not modular.

The implementation of a concern is tangledtangled if its code is intermixed with code that implements other concerns. The module in which tangling occurs is not cohesive.

Scattering and tangling often go together, even though they are different concepts.

Do you know ?Do you know ?

Page 14: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 14

What is ”Concern” ?What is ”Concern” ?a concernconcern :

is a particular set of information that has an effect on the code of a computer program.

It can be as general as the details of database interaction or 

as specific as performing a primitive calculation,  depending on the level of conversation between 

developers and the program being discussed.

Page 15: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 15

  AO Requirement EngineeringAO Requirement Engineering"Early Aspects""Early Aspects" focuses on the

identification, specification and representation of crosscutting properties at the requirement level.

 Examples of such properties include: security, mobility, availability and real­time 

constraints.

Crosscutting properties are: requirements, use cases or features that have a 

broadly scoped effect on other requirements or architecture components.

Page 16: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 16

AO System ArchitectureAO System Architecture focuses on the localization and specification of 

crosscutting concerns in architectural designs.  Crosscutting concerns that appear at the 

architectural level cannot be modularized by redefining the software architecture using conventional architectural abstractions.

 Aspect­oriented system architecture languages propose explicit mechanisms to identify, specify and evaluate aspects at the architecture design level.

Page 17: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 17

AO System ArchitectureAO System Architecture

Aspect­oriented architecture starts from the observation that we need to identify, specify and evaluate aspects explicitly at the architecture design level. 

Aspectual architecture approaches describe steps for identifying architectural aspects.

Page 18: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 18

Specific Areas of Excellence are:Specific Areas of Excellence are:

    the aspect­oriented architecture process itself,     the aspect­oriented architecture notations,     aspect­oriented architecture tool support,     adoption and integration of aspect­oriented 

architecture, and     assessment/evaluation of aspect­oriented 

architecture.

Page 19: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 19

Modeling and DesignModeling and Design It has the same objectives as any software design 

activity, i.e. characterising and specifying the behavior and structure of the software system. 

Its unique contribution to software design lies in the fact that concerns that are necessarily scattered and tangled in more traditional approaches can be modularized. 

Typically, such an approach includes both a process and a language.

Page 20: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 20

Aspect­oriented languagesAspect­oriented languages

    AspectC++     AspectJ     AspectLua (a Lua extension)     CaesarJ     Compose*     ObjectTeams     e (verification language)

Page 21: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 21

??

Page 22: Aspect oriented software development

AOSD                        Maryam Malekzad                    M.Tech. ­ 11301                                                                                 PUCSD 22

Thank youThank you  forfor

  your attentionyour attention