Aspect Oriented Software Engineering

21
Aspect Oriented Software Engineering By : Abhay Nitin Pai (13MCC1032)

Transcript of Aspect Oriented Software Engineering

Page 1: Aspect Oriented Software Engineering

Aspect Oriented Software Engineering

By : Abhay Nitin Pai (13MCC1032)

Page 2: Aspect Oriented Software Engineering

Introduction

● Aspect-oriented software engineering (AOSE) is an approach to software development that is intended to address this problem and so make programs easier to maintain and reuse.

● AOSE is based around abstractions called aspects, which implement system functionality that may be required at several different places in a program.

● Aspects encapsulate functionality that cross-cuts and coexists with other functionality that is included in a system.

● They are used alongside other abstrations like objects and methods.

● Aspect oriented programs = Objects, methods and aspects

Page 3: Aspect Oriented Software Engineering

● Key benefit – Seperation of concerns

● Example : User authentication before accessing the database.

● Example of Aspect Oriented Language : AspectJ

Page 4: Aspect Oriented Software Engineering

Seperation of Concerns

● It means that you should organize your software so that each element in the program (class, method, procedure, etc.) does one thing and one thing only.

● You can then focus on that element without regard for the other elements in the program.

● You can understand each part of the program by knowing its concern, without the need to understand other elements.

● When changes are required, they are localized to a small number of elements.

● Arrival of this concept : Cross-cutting concerns

Page 5: Aspect Oriented Software Engineering

● What is a concern ?● functional notion (i.e., a concern is some element of functionality in a

system).● Any piece of interest or focus in a program

● Concerns are really reflections of the system requirements and priorities of stakeholders in the system.

● Example : System Performance

● Expressed as a requirement or a related set of requirements, to the program components that implement these concerns.

● There are several different types of stakeholder concern:

Page 6: Aspect Oriented Software Engineering

● Functional concerns : which are related to the specific functionality to be included in a system. For example, in a train control system, a specific functional concern is train braking.

● Quality of service concerns : which are related to the non-functional behavior of a system. These include characteristics such as performance, reliability, and availability.

● Policy concerns : which are related to the overall policies that govern the use of a system. Policy concerns include security and safety concerns and concerns related to business rules.

● System concerns : which are related to attributes of the system as a whole, such as its maintainability or its configurability.

● Organizational concerns : which are related to organizational goals and priorities. These include producing a system within budget, making use of existing software assets, and maintaining the reputation of the organization.

Page 7: Aspect Oriented Software Engineering

● Core Concern Example : For a hospital patient information system, the core functional concerns are the creation, editing, retrieval, and management of patient records.

Page 8: Aspect Oriented Software Engineering

● Tangling and Scattering

Page 9: Aspect Oriented Software Engineering
Page 10: Aspect Oriented Software Engineering

Aspects, Join points and pointcuts

Page 11: Aspect Oriented Software Engineering
Page 12: Aspect Oriented Software Engineering

Extensions

● Secondary functional extensions

● Policy extensions

● QoS extensions

● Infrastructure extensions

Page 13: Aspect Oriented Software Engineering

Software Engineering with Aspects

Page 14: Aspect Oriented Software Engineering
Page 15: Aspect Oriented Software Engineering
Page 16: Aspect Oriented Software Engineering

Inventory Management System(Use Case)

Page 17: Aspect Oriented Software Engineering
Page 18: Aspect Oriented Software Engineering
Page 19: Aspect Oriented Software Engineering
Page 20: Aspect Oriented Software Engineering
Page 21: Aspect Oriented Software Engineering