Aspect-Oriented Software Development



Similar documents
Generating Aspect Code from UML Models

Aspect-Oriented Programming

How To Combine Feature-Oriented And Aspect-Oriented Programming To Support Software Evolution

Using an Aspect Oriented Layer in SOA for Enterprise Application Integration

Software Engineering and Technology Trends

An Aspect-Oriented Product Line Framework to Support the Development of Software Product Lines of Web Applications

Combining Feature-Oriented and Aspect-Oriented Programming to Support Software Evolution

Chapter 5 Aspect Oriented Programming

Architecture Rules Enforcement and Governance Using Aspects

Unification of AOP and FOP in Model Driven Development

Progress Report Aspect Oriented Programming meets Design Patterns. Academic Programme MSc in Advanced Computer Science. Guillermo Antonio Toro Bayona

Keywords Aspect-Oriented Modeling, Rule-based graph transformations, Aspect, pointcuts, crosscutting concerns.

The leading platform for Model Driven Architecture (MDA) Content:

Applying 4+1 View Architecture with UML 2. White Paper

Combining Static and Dynamic Impact Analysis for Large-scale Enterprise Systems

Integration of Application Business Logic and Business Rules with DSL and AOP

Component-Based Software Development with Aspect-Oriented Programming

How to Model Aspect-Oriented Web Services

Encapsulating Crosscutting Concerns in System Software

The Concern-Oriented Software Architecture Analysis Method

Designing an Enterprise Application Framework for Service-Oriented Architecture 1

A Software Development Platform for SOA

What SOA can do for Software Dependability. Karl M. Göschka Vienna University of Technology

Composing Concerns with a Framework Approach

JBOSS ENTERPRISE APPLICATION PLATFORM MIGRATION GUIDELINES

Introducing a Graduate Course on. called Aspect-Oriented Software Development

Identification of Crosscutting in Software Design

Integration of Application Business Logic and Business Rules with DSL and AOP

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

SOMA, RUP and RMC: the right combination for Service Oriented Architecture

EA-Analyzer: Automating Conflict Detection in Aspect-Oriented Requirements

Aspect-oriented software engineering

Dungeon: A Case Study of Feature-Oriented Programming with Virtual Classes

AN APPROACH TO DEVELOPING BUSINESS PROCESSES WITH WEB SERVICES IN GRID

Implementing Application and Network Security using Aspectoriented

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

The Role of the Software Architect

Traceability for Maintenance of Secure Software Systems

JBoss EntErprisE ApplicAtion platform migration guidelines

A COMPARISON OF AOP BASED MONITORING TOOLS

Sadržaj seminara: SOA Architecture. - SOA Business Challenges s: Billion Dollar Lock-In. - Integration Tools. - Point-to-Point Approach

A Case Study on Model-Driven and Conventional Software Development: The Palladio Editor

Guiding SOA Evolution through Governance From SOA 101 to Virtualization to Cloud Computing

EXTREME: EXecuTable Requirements Engineering, Management and Evolution. Dr. Ella Roubtsova Open University of the Netherlands

Service-Oriented Architecture and its Implications for Software Life Cycle Activities

Federated, Generic Configuration Management for Engineering Data

OpenSSO: Simplify Your Single-Sign-On Needs. Sang Shin Java Technology Architect Sun Microsystems, inc. javapassion.com

Service Component Architecture for Building Cloud Services

Convergence of Distributed Simulation Architectures Using DDS

OSLC ALM-PLM Interoperability Proof of Concept. Mike Loeffler Systems Engineering IT Specialist General Motors Company

JD Edwards EnterpriseOne Mobile Solutions

Aspect Weaving for OSGi. Martin Lippert (akquinet it-agile GmbH)

A standards-based approach to application integration

Toward Configurable Access Control for. Healthcare Information Systems

Scalable End-User Access to Big Data HELLENIC REPUBLIC National and Kapodistrian University of Athens

BUSINESS RULES MANAGEMENT AND BPM

Enterprise Infrastructure Architecture

Ce document a été téléchargé depuis le site de Precilog. - Services de test SOA, - Intégration de solutions de test.

Dynamic Reconfiguration Using Template Based Web Service Composition

Concern Driven Software Development

Secure the Web: OpenSSO

Challenges and Opportunities for formal specifications in Service Oriented Architectures

Figure 1: Illustration of service management conceptual framework

The Service Revolution software engineering without programming languages

Security in Domain-Driven Design. Author: Michiel Uithol

Foundations for your. portable cloud

DESIGN REPORT FOR THE PROJECT INVENTORY CONTROL SYSTEM FOR CALCULATION AND ORDERING OF AVAILABLE AND PROCESSED RESOURCES

Systems Integration: Co C mp m onent- t bas a e s d s o s ftw ft a w r a e r e ngin i eeri r n i g

Patterns for Handling Cross-Cutting Concerns in Model-Driven Software Development

Software Engineering. Software Engineering. Component-Based. Based on Software Engineering, 7 th Edition by Ian Sommerville

Migration and Developer Productivity Solutions Retargeting IT for Emerging Business Needs

Analyses on functional capabilities of BizTalk Server, Oracle BPEL Process Manger and WebSphere Process Server for applications in Grid middleware

An Integrated Quality Assurance Framework for Specifying Business Information Systems

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

Five best practices for deploying a successful service-oriented architecture

Software Engineering. Software Reuse. Based on Software Engineering, 7 th Edition by Ian Sommerville

Transcription:

Aspect-Oriented Software Development Dr. Awais Rashid Computing Department Lancaster University, UK Awais Rashid, 2005.

Fundamental to Next Generation Software AOSD is vital to our [IBM Software Group s] survival. Daniel Sabbah, IBM Vice President, speaking at AOSD Conference, Lancaster University, 2004. AOSD among top ten most promising technologies. MIT Technology Review Being employed in projects at IBM, Siemens, Boeing, BEA, Oracle and NASA. DARPA PCES Programme investing approx. 15 million USD/year Support of 4.4m Euros to AOSD-Europe by the EC Will be at the Plateau of Productivity in 5-10 years

Outline Motivation Aspect-Oriented Software Development State-of-the-art in languages, methods and tools Case studies Open issues

Source: Grady Booch, Keynote Speech, AOSD Conference 2005 Need to Tackle Complexity Software systems are becoming increasingly complex Estimated 15 million software professionals worldwide Estimated 8000 lines of code per developer per year 36 billion lines of code per year worldwide Do the above figures add up?

Complexity Affects Quality Intrinsic vs extrinsic complexity Affects quality attributes of software systems Evolvability Cost-efficiency Composability Reliability Fault tolerance Reusability Scalability Dependability Adaptability Etc.

Need for Separation of Concerns Large complex distributed software systems Development requires focusing on one concern at a time

Outline Motivation Aspect-Oriented Software Development State-of-the-art in languages, methods and tools Case studies Open issues

Aspect-Oriented Software Development (AOSD) Distribution Security Data Management AOSD tools, techniques and methodology Distribution Security Data Management

Potential Benefits of AOSD Improved ability to reason about problem domain and corresponding solution Reduction in application code size, development costs and maintenance time Improved code reuse Requirements, architecture and design-level reuse Improved ability to engineer product lines Context-sensitive application adaptation Improved modelling methods

AOSD is vital to our [IBM Software Group s] survival. Evolution History and Evolution of Daniel Sabbah, IBM Vice President, speaking at AOSD Conference, Lancaster University, 2004. AOSD More expressive Langs., Early Aspects, Middleware, Databases, Industrial Applications, Transactions on AOSD Composition Filters, Adaptive Prog., SOP, Reflection AspectJ @ PARC Hyper/J, UML Ext. AspectJ @ Eclipse, AOSD Conf. In the Initial Excitement Stabilisation Towards Time

Crosscutting: The Logging Concern in a Bank Application class Account { // some attributes void deposit(int amount) { Logger.log( Entering Account.deposit( ) ); // method code Logger.log( Leaving Account.deposit( ) ); } String holdername( ) { Logger.log( Entering Account.holderName( ) ); // method code Logger.log( Leaving Account.holderName( ) ); // return a string } class Loan { // some attributes void sendreminder( ) { Logger.log( Entering Loan.sendReminder( ) ); // method code Logger.log( Leaving Loan.sendReminder( ) ); } int getbalance( ) { Logger.log( Entering Loan.getBalance( ) ); // method code Logger.log( Leaving Loan.getBalance( ) ); // return an integer }

Tangling and Scattering Primary Functionality Persistence Security Data Classes Account Loan Customer User Interface ATM Web PC Terminal

Revisiting the Logging Example class Account { // some attributes void deposit(int amount) { Logger.log( Entering Account.deposit( ) ); // method code Logger.log( Leaving Account.deposit( ) ); } String holdername( ) { Logger.log( Entering Account.holderName( ) ); // method code Logger.log( Leaving Account.holderName( ) ); // return a string } class Loan { // some attributes void sendreminder( ) { Logger.log( Entering Loan.sendReminder( ) ); // method code Logger.log( Leaving Loan.sendReminder( ) ); } int getbalance( ) { Logger.log( Entering Loan.getBalance( ) ); // method code Logger.log( Leaving Loan.getBalance( ) ); // return an integer }

Wouldn t it be Nice if class Account { // some attributes void deposit(int amount) { // method code } String holdername( ) { // method code // return a string } class Loan { // some attributes void sendreminder( ) { // method code } int getbalance( ) { // method code // return an integer } aspect Logger { when someone calls these methods before the call {Logger.log( Entering + methodsignature);} after the call {Logger.log( Leaving + methodsignature);}

Revisiting the Persistence and Security Example Data Classes Primary Functionality Persistence Security Account Loan Customer User Interface ATM Web PC Terminal

Wouldn t it be Nice if Data Classes Account aspect Persistence Loan aspect Security Customer User Interface ATM Web PC Terminal

Aspect-Oriented Programming (AOP) Classes Class A Class B Aspect Weaver Composed Code Aspect X Aspects Aspect Y Legend Class Aspect Join Points: Reference points in classes used by aspects for specifying relationships with classes

The Notion of a Join Point class Account { // some attributes void deposit(int amount) { // method code } Type of Join Point String holdername( ) { // method code // return a string } aspect Tracing { when someone calls these methods class Loan { // some attributes void sendreminder( ) { // method code } Specific Join Points in this Program that we are Interested in int getbalance( ) { // method code // return an integer } before the call {Logger.log( Entering + methodsignature);} after the call {Logger.log( Leaving + methodsignature);}

Programmer Productivity (without AOP) Typically one class or component per file For a typical release of a software system, logging or tracing effort 15 minutes per file 100 files will require 25 person hours 1000 files will require 7 person weeks Source: Adrian Colyer, Gregor Kiczales, Adoption of AOSD,

Programmer Productivity (with AOP) Typical effort to write a tracing or logging aspect Less than 25 person hours for a simple one Less than 50 person hours for a more elaborate, properly tested aspect Write once, reuse again and again Very cost-effective Source: Adrian Colyer, Gregor Kiczales, Adoption of AOSD,

Outline Motivation Aspect-Oriented Software Development State-of-the-art in languages, methods and tools Case studies Open issues

Aspect-Oriented Programming Languages and Frameworks AspectJ and AJDT (Eclipse) IBM AspectWerkz and WebLogic BEA JBoss AOP JBoss Group Spring AOP Spring project AspectS DoCoMo Labs CaesarJ Technical Univ. of Darmstadt AspectC Univ. of British Columbia AspectC++ Univ. of Erlangen-Nuremberg A number of other AOP languages, frameworks and tools listed at: http://aosd.net

Aspect-Oriented Requirements Analysis and Design 15 million software professionals worldwide Only 30% are coders 1 A significant effort goes into: Requirements engineering Modelling Architecture and design Testing and evolution 1 Source: Grady Booch, Keynote Speech, AOSD Conference 2005

Better Understanding of the Problem Domain Early Aspects: Aspect-oriented requirements engineering Better understanding of the influence of crosscutting properties on the problem Identify trade-offs early on Support decision making amongst stakeholders Early aspects drive architectural choices A number of UML extensions are already available for subsequent modelling and design

Preserving Architectural Constraints Use aspects to declare warnings or errors on unwanted development practices Example: IBM Software Group Aspects are used to flag warnings when one product uses APIs from another Used in a portfolio of 30 products 50000 such places flagged! Facilitates packaging and deployment Source: Adrian Colyer, Gregor Kiczales, Adoption of AOSD,

Outline Motivation Aspect-Oriented Software Development State-of-the-art in languages, methods and tools Case studies Open issues

Enterprise Software: IBM WebSphere Multiple crosscutting concerns (without AOSD) Please refer to Dr. Daniel Sabbah s keynote at AOSD conference at Lancaster in 2004: http://aosd.net/2004/archive/aosd-frompromisetoreality.ppt

Enterprise Software: IBM WebSphere First Failure Data Capture (without AOSD) Please refer to Dr. Daniel Sabbah s keynote at AOSD conference at Lancaster in 2004: http://aosd.net/2004/archive/aosd-frompromisetoreality.ppt

Enterprise Software: IBM WebSphere First Failure Data Capture (with AOSD) Please refer to Dr. Daniel Sabbah s keynote at AOSD conference at Lancaster in 2004: http://aosd.net/2004/archive/aosd-frompromisetoreality.ppt

Database Evolution: Lancaster Study A: Attributes deleted from non-leaf class B: Introduction of non-leaf class C: Attributes deleted from leaf class D: Class repositioned 25 20 15 10 5 0 A B C D System X SADES A: Customising routines resulting from additive change B: Customising routines resulting from subtractive change C: Changes to entities upon customisation of instance adaptation approach 10 8 6 4 2 0 A B C System X SADES System Y

Database Aspects in Oracle TopLink Aspects used for exception raising whenever a developer attempts to write to the database in a read-only profile Aspects used to mark objects as dirty for database updates in a read-mostly profile Aspects at the vendor end only TopLink developers do not need to know AOSD

Design Pattern Implementations Design patterns are solution templates for recurring problems during software development Already help to modularise design and code by guidelines for good structure AOSD can further improve the implementation of several design patterns

Concern Diffusion over system viewpoint Components 12 Decorator Pattern Mediator Pattern CoR Pattern Memento Pattern CDC Number of of Components 10 8 6 4 2 +67% +80% +50% +25% 0% +67% 0% +57% +67% +29% AO OO +40% -20% 0% -33% 0 Before After Before After Before After Before After Before After Before After Before After Component Decorator Mediator Colleague Handler Memento Originator

Separation of Concerns 35 +88% Decorator Pattern Mediator Pattern 50 CoR +92% Pattern Memento Pattern CDLOC Number Number of of Transition Transition Points Points 30 25 20 15 10 5 +78% +75% +67% +25% +50%+50% 0% +85% 0% 0% AO OO +22% 0% 0 Before After Before After Before After Before After Before After Before After Before After Component Decorator Mediator Colleague Handler Memento Originator

Scalability: Introducing New Elements Number of of Components 12 10 8 6 4 2 +67% Decorator Pattern +80% +50% +25% Number of Operations 0% 20 15 Mediator Decorator CoR Pattern Pattern Pattern +67% 10 5 +75% +88% 0% +57% +67% +60% Mediator +88% Memento Decorator CoR -29% Pattern Pattern Pattern Pattern +29% AO OO +40% -20% +71% Number Number of of Transition Transition Points Points 0% 35 30 25 20 15 0% +67% 10 5 +78% -33% 0% +67% -46% +50%+50% 0% Mediator Memen Pattern +6% -14% +67% + +25% -4 0 0 0 Before After Before After Before After Before Before After After Before Before After AfterBefore Before After After Before After Before Before After After Before Before After AfterBefore Before After AfterBefore Component Decorator MediatorComponent ColleagueDecorator Handler Mediator Memento Component Colleague Originator Decorator Handler Mediator Memento Colle O

Other Interesting Projects Boeing: Autopilot software product lines Siemens: Software product lines and modeldriven development New Aspects of Software: Modularising security policies Near Infinity: Auditing in Intelliprints TU Darmstadt and TU Berlin: ToppRax project (evaluation in SMEs) Lancaster University: Infolab21 Knowledge Business Centre (Planned seminars for SMEs)

Outline Motivation Aspect-Oriented Software Development State-of-the-art in languages, methods and tools Case studies Open issues

Open Issues for AOSD Need for more research into models for early aspects: aspect-oriented requirements engineering and architecture design Need for more research into aspect mapping and traceability Need for effective testing and validation techniques Need for more application studies In research labs and in industry

Open Issues for AOSD Need for AOSD processes Adaptation of existing processes to incorporate AOSD Need for more empirical studies Need for an Aspect-Oriented Software Engineering