SlideShare una empresa de Scribd logo
1 de 22
1

Aspect-oriented
software
engineering
ABDELFATTAH AL ZAQQA
PSUT-AMMAN-JORDAN
Topics covered


The separation of concerns



Aspects, join points and pointcuts



Software engineering with aspects

2
Introduction-Problem
Requirements

Req

3

Complex
Relationship

Program
components

R1

Program
comp.

R2

C1

R3

C2
C3
Complex
Change on
Requirements



4

Needs

Even in reuse components (remove extra code)

understanding
and changing
several
components
AOSE

5

address
AOSE

Complexity
Problem
Maintain and
reuse easily
Program
End intro

6
Aspects, join points, and pointcuts


7

Example: Assume that we have medical records system such as MHCPMS.
handle
MHCPMS components

Holds Prescribed
medication

Patient info.

Holds Personal
Info.

updatePersonalInformation (patientId, infoupdate)
updateMedication (patientId, medicationupdate)

by authorized
person only
solutions


Problem: Somehow illegal update happen



Solutions:

1.

re-authentication before any change tangled implementation
authentication with logging or not, where?!.

2.

Modify system to do authentication each time update method
called  scattered implementation. every call?! Several different
place?

* Cross cutting between authentication and logging

8
An authentication aspect in Aspect
9
Where it will be
Oriented system
woven into
aspect authentication
program
{
before: call (public void update* (..)) // this is a pointcut
{
// this is the advice that should be executed when woven into
// the executing system
int tries = 0 ;
string userPassword = Password.Get ( tries ) ;
Advice
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
Terminology used in aspectoriented software engineering
Term

Definition

advice

The code implementing a concern.

aspect

A program abstraction that defines a cross-cutting
concern. It includes the definition of a pointcut and the
advice associated with that concern.
An event in an executing program where the advice
associated with an aspect may be executed.
The set of events that may be referenced in a pointcut.

join point

Not
standard

join point model
pointcut

weaving

A statement, included in an aspect, that defines the join
points where the associated aspect advice should be
executed.
The incorporation of advice code at the specified join
points by an aspect weaver.

10
aspect authentication
{
before: call (public void update* (..)) // this is a pointcut
Monitor: Execution (System.Logout (thisUser.uid) )
{public void get(System.systime)
}
{
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) ;
}
after: call (public void update* (..))
{
public void logging(userID.Get(uid)
}
} // authentication

11
12
Source code preprocessing

Rarely used

Link time
weaving, modify
compiler

Most common

Dynamic
weaving at
execution time

More flexible
End Aspects, join points, and
pointcuts

13
Concern-oriented requirements
engineering
Req1.

Req2.

Req3.

Req6.

Req5.

ReqC

Req4.

14

• organize the
requirements
according to stakeholder
viewpoint.
• you can then analyze
them to discover related
requirements that
appear in all or most
viewpoints.
Viewpoints and Concerns

Cross-cutting concerns are concerns that are
identified by all viewpoints.

15
Viewpoints on an equipment
inventory system
1. Emergency service users
1.1
Find a specified type of equipment (e.g., heavy
lifting gear)
1.2
View equipment available in a specified store
1.3
Check-out equipment
1.4
Check-in equipment
1.5
Arrange equipment to be transported to emergency
1.6
Submit damage report
1.7
Find store close to emergency
2. Emergency planners
2.1
Find a specified type of equipment
2.2
View equipment available in a specified location
2.3
Check-in/cCheck out equipment from a store
2.4
Move equipment from one store to another
2.6
Order new equipment

16

3. Maintenance staff
3.1
Check -in/cCheck -out equipment for
maintenance
3.2
View equipment available at each
store
3.3
Find a specified type of equipment
3.4
View maintenance schedule for an
equipment item
3.5
Complete maintenance record for an
equipment item
3.6
Show all items in a store requiring
maintenance
Viewpoints on an equipment
inventory system

Maintenance
staff

Emergency
service
users

Emergency
planners

1. Find a specified type of equipment
2. View equipment available in a
specified location
3. Check-in/cCheck out equipment
from a store

17
Availability-related requirements for
the equipment inventory system
AV.1
There shall be a ‘hot standby’ system available in a location
that is geographically well-separated from the principal system.
Rationale: The emergency may affect the principal location of the
system.
AV.1.1 The system shall send status information to the emergency
control room system every five minutes.
Rationale: The operators of the control room system can switch to the
hot standby if the principal system is unavailable.

18
Inventory system - core
requirements


C.1 The system shall allow authorised users to view the description of
any item of equipment in the emergency services inventory.



C.2 The system shall include a search facility to allow authorised
users to search either individual inventories or the complete
inventory for a specific item or type of equipment.

19
Inventory system - extension
requirements


E1.1 It shall be possible for authorised users to place orders with
accredited suppliers for replacement items of equipment.



E1.1.1 When an item of equipment is ordered, it should be allocated
to a specific inventory and flagged in that inventory as ‘on order’.

20
General rule


many concerns or extensions to the system confuse the reader and
may lead to premature design.



limits the freedom of designers and may result in a system design
that cannot meet its quality of service requirements.

21
End Concern-oriented
requirements engineering

22

Más contenido relacionado

Similar a Aspect oriented software engineering-draft

SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...vtunotesbysree
 
Season 4 [Free OpManager training] Part1- Discovery and classification
Season 4 [Free OpManager training] Part1- Discovery and classificationSeason 4 [Free OpManager training] Part1- Discovery and classification
Season 4 [Free OpManager training] Part1- Discovery and classificationManageEngine, Zoho Corporation
 
Free OpManager training Part1- Discovery and classification season#3
Free OpManager training Part1- Discovery and classification season#3Free OpManager training Part1- Discovery and classification season#3
Free OpManager training Part1- Discovery and classification season#3ManageEngine, Zoho Corporation
 
Os files 2
Os files 2Os files 2
Os files 2Amit Pal
 
Avanceon Plant PAx Process
Avanceon Plant PAx Process Avanceon Plant PAx Process
Avanceon Plant PAx Process Avanceon MEA
 
Unit 3 final
Unit 3 finalUnit 3 final
Unit 3 finalsietkcse
 
SRS for Hospital Management System
SRS for Hospital Management SystemSRS for Hospital Management System
SRS for Hospital Management Systemkataria Arvind
 
Free OpManager training Part1- Discovery and classification
Free OpManager training Part1- Discovery and classificationFree OpManager training Part1- Discovery and classification
Free OpManager training Part1- Discovery and classificationManageEngine, Zoho Corporation
 
Remote Monitoring and Alert System for Temperature Sensitive Products
Remote Monitoring and Alert System for Temperature Sensitive ProductsRemote Monitoring and Alert System for Temperature Sensitive Products
Remote Monitoring and Alert System for Temperature Sensitive ProductsEditor IJCATR
 
Availability tactics
Availability tacticsAvailability tactics
Availability tacticsahsan riaz
 
Developing Algorithm for Fault Detection and Classification for DC Motor Usin...
Developing Algorithm for Fault Detection and Classification for DC Motor Usin...Developing Algorithm for Fault Detection and Classification for DC Motor Usin...
Developing Algorithm for Fault Detection and Classification for DC Motor Usin...IRJET Journal
 
Smart Maintenance engineering
Smart Maintenance engineering Smart Maintenance engineering
Smart Maintenance engineering Michel Mafumba
 
Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18koolkampus
 

Similar a Aspect oriented software engineering-draft (20)

IETM Software: Guidelines to OEMs
IETM Software: Guidelines to OEMsIETM Software: Guidelines to OEMs
IETM Software: Guidelines to OEMs
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
 
Unit 1 - Introduction
Unit 1 - IntroductionUnit 1 - Introduction
Unit 1 - Introduction
 
Season 4 [Free OpManager training] Part1- Discovery and classification
Season 4 [Free OpManager training] Part1- Discovery and classificationSeason 4 [Free OpManager training] Part1- Discovery and classification
Season 4 [Free OpManager training] Part1- Discovery and classification
 
Free OpManager training Part1- Discovery and classification season#3
Free OpManager training Part1- Discovery and classification season#3Free OpManager training Part1- Discovery and classification season#3
Free OpManager training Part1- Discovery and classification season#3
 
Os files 2
Os files 2Os files 2
Os files 2
 
Avanceon Plant PAx Process
Avanceon Plant PAx Process Avanceon Plant PAx Process
Avanceon Plant PAx Process
 
Ch2
Ch2Ch2
Ch2
 
Ch20
Ch20Ch20
Ch20
 
Unit 3 final
Unit 3 finalUnit 3 final
Unit 3 final
 
SRS for Hospital Management System
SRS for Hospital Management SystemSRS for Hospital Management System
SRS for Hospital Management System
 
PlantPAx Process
PlantPAx ProcessPlantPAx Process
PlantPAx Process
 
Free OpManager training Part1- Discovery and classification
Free OpManager training Part1- Discovery and classificationFree OpManager training Part1- Discovery and classification
Free OpManager training Part1- Discovery and classification
 
Report On HMS
Report On HMSReport On HMS
Report On HMS
 
Remote Monitoring and Alert System for Temperature Sensitive Products
Remote Monitoring and Alert System for Temperature Sensitive ProductsRemote Monitoring and Alert System for Temperature Sensitive Products
Remote Monitoring and Alert System for Temperature Sensitive Products
 
Availability tactics
Availability tacticsAvailability tactics
Availability tactics
 
Developing Algorithm for Fault Detection and Classification for DC Motor Usin...
Developing Algorithm for Fault Detection and Classification for DC Motor Usin...Developing Algorithm for Fault Detection and Classification for DC Motor Usin...
Developing Algorithm for Fault Detection and Classification for DC Motor Usin...
 
Smart Maintenance engineering
Smart Maintenance engineering Smart Maintenance engineering
Smart Maintenance engineering
 
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
 
Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18
 

Último

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Aspect oriented software engineering-draft

  • 2. Topics covered  The separation of concerns  Aspects, join points and pointcuts  Software engineering with aspects 2
  • 4. Complex Change on Requirements  4 Needs Even in reuse components (remove extra code) understanding and changing several components
  • 7. Aspects, join points, and pointcuts  7 Example: Assume that we have medical records system such as MHCPMS. handle MHCPMS components Holds Prescribed medication Patient info. Holds Personal Info. updatePersonalInformation (patientId, infoupdate) updateMedication (patientId, medicationupdate) by authorized person only
  • 8. solutions  Problem: Somehow illegal update happen  Solutions: 1. re-authentication before any change tangled implementation authentication with logging or not, where?!. 2. Modify system to do authentication each time update method called  scattered implementation. every call?! Several different place? * Cross cutting between authentication and logging 8
  • 9. An authentication aspect in Aspect 9 Where it will be Oriented system woven into aspect authentication program { before: call (public void update* (..)) // this is a pointcut { // this is the advice that should be executed when woven into // the executing system int tries = 0 ; string userPassword = Password.Get ( tries ) ; Advice 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
  • 10. Terminology used in aspectoriented software engineering Term Definition advice The code implementing a concern. aspect A program abstraction that defines a cross-cutting concern. It includes the definition of a pointcut and the advice associated with that concern. An event in an executing program where the advice associated with an aspect may be executed. The set of events that may be referenced in a pointcut. join point Not standard join point model pointcut weaving A statement, included in an aspect, that defines the join points where the associated aspect advice should be executed. The incorporation of advice code at the specified join points by an aspect weaver. 10
  • 11. aspect authentication { before: call (public void update* (..)) // this is a pointcut Monitor: Execution (System.Logout (thisUser.uid) ) {public void get(System.systime) } { 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) ; } after: call (public void update* (..)) { public void logging(userID.Get(uid) } } // authentication 11
  • 12. 12 Source code preprocessing Rarely used Link time weaving, modify compiler Most common Dynamic weaving at execution time More flexible
  • 13. End Aspects, join points, and pointcuts 13
  • 14. Concern-oriented requirements engineering Req1. Req2. Req3. Req6. Req5. ReqC Req4. 14 • organize the requirements according to stakeholder viewpoint. • you can then analyze them to discover related requirements that appear in all or most viewpoints.
  • 15. Viewpoints and Concerns Cross-cutting concerns are concerns that are identified by all viewpoints. 15
  • 16. Viewpoints on an equipment inventory system 1. Emergency service users 1.1 Find a specified type of equipment (e.g., heavy lifting gear) 1.2 View equipment available in a specified store 1.3 Check-out equipment 1.4 Check-in equipment 1.5 Arrange equipment to be transported to emergency 1.6 Submit damage report 1.7 Find store close to emergency 2. Emergency planners 2.1 Find a specified type of equipment 2.2 View equipment available in a specified location 2.3 Check-in/cCheck out equipment from a store 2.4 Move equipment from one store to another 2.6 Order new equipment 16 3. Maintenance staff 3.1 Check -in/cCheck -out equipment for maintenance 3.2 View equipment available at each store 3.3 Find a specified type of equipment 3.4 View maintenance schedule for an equipment item 3.5 Complete maintenance record for an equipment item 3.6 Show all items in a store requiring maintenance
  • 17. Viewpoints on an equipment inventory system Maintenance staff Emergency service users Emergency planners 1. Find a specified type of equipment 2. View equipment available in a specified location 3. Check-in/cCheck out equipment from a store 17
  • 18. Availability-related requirements for the equipment inventory system AV.1 There shall be a ‘hot standby’ system available in a location that is geographically well-separated from the principal system. Rationale: The emergency may affect the principal location of the system. AV.1.1 The system shall send status information to the emergency control room system every five minutes. Rationale: The operators of the control room system can switch to the hot standby if the principal system is unavailable. 18
  • 19. Inventory system - core requirements  C.1 The system shall allow authorised users to view the description of any item of equipment in the emergency services inventory.  C.2 The system shall include a search facility to allow authorised users to search either individual inventories or the complete inventory for a specific item or type of equipment. 19
  • 20. Inventory system - extension requirements  E1.1 It shall be possible for authorised users to place orders with accredited suppliers for replacement items of equipment.  E1.1.1 When an item of equipment is ordered, it should be allocated to a specific inventory and flagged in that inventory as ‘on order’. 20
  • 21. General rule  many concerns or extensions to the system confuse the reader and may lead to premature design.  limits the freedom of designers and may result in a system design that cannot meet its quality of service requirements. 21