Aspect Oriented Programming An Introduction based on se-radio.net episode 106 29th October 2009 Aspect Oriented Programming - Nils Schmidt.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
ASTA Aspect Software Testing Assistant Juha Gustafsson, Juha Taina, Jukka Viljamaa University of Helsinki.
1 JAC : Aspect Oriented Programming in Java An article review by Yuval Nir and Limor Lahiani.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development.
Aspect Oriented Programming - AspectJ Radhika Rajput.
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales.
University of British Columbia Software Practices Lab 2005 CASCON A Fluid AOP Editor Terry Hon Gregor Kiczales.
October - December 2013CSC5021: The Problem With Aspects (J P Gibson)1 The Problem With Aspects (AOP) A style of programming that attempts to abstract.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
An Aspect-Oriented Approach to Dynamic Adaptation August 8, 2002 Presented by: Sherri Goings Advisors: Dr. Dillon, Dr. Cheng, Dr. Stirewalt SENS Lab
Aspect Oriented Programming Written by Michael Beder.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 2.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
1 Model Interface Implementation for Two-Way Obliviousness in Aspect-Oriented Modeling Presented by Wuliang Sun Department of Computer Science Baylor University.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Fall 2012.
 Introduction  Terms  Design – Modeling  Requirements  Languages  Maintenance  Comparison to Object Oriented  Applications 2.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
Secure Systems Research Group - FAU Aspects and mobile applications Sergio Soares Paulo Borba, “PaDA: A Pattern for Distribution Aspects” In Second Latin.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Aspect Oriented Programming (AOP) in.NET Brent Krueger 12/20/13.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
Supporting Heterogeneous Users in Collaborative Virtual Environments using AOP CoopIS 2001 September 5-7, Trento, Italy M. Pinto, M. Amor, L. Fuentes,
Aspect Oriented Programming Scott Nykl CSSE 411 Senior Seminar.
What is “model transformation”? Distinction between source and target Source may be same as target May be multiple sources, or targets Reaching a fixed.
1 Metamodel Access Protocols for Extensible Aspect-Oriented Modeling Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Shinji Sano(Kyushu Institute.
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton February 28th, 2003 Advisor: David G. Hannay Client:
Aspect Oriented Programming Gülşah KARADUMAN.
Aspect-Oriented Software Development Prof. Awais Rashid and Dr. Steffen Zschaler C41/C30 Infolab21 {marash | Computing Department.
Joel Phinney March 31, ◦ Concerns  Separation of Concerns, Tangled and Scattered Concerns, Cross-Cutting Concerns, Aspects ◦ Aspect-Oriented Software.
IE 423 – Design of Decision Support Systems Visual Studio Introduction to VB.NET programming.
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
TRANSPARENT EXTENSION OF SINGLE- USER APPLICATIONS TO MULTI-USER REAL-TIME COLLABORATIVE SYSTEMS An Aspect Oriented Approach to Framework Integration ICEIS.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
© Siemens AG, CT SE 2, Iris Groher, Markus Voelter C O R P O R A T E T E C H N O L O G Y XWeave – Models and Aspects in Concert 1 XWeave Models.
Introduction Better Faster Cheaper (pick any two) On-going issue that continues to motivate research in software engineering Applications: –continue to.
Aspect-Oriented Programming An Introductory Presentation Mike Landi MSCS Candidate Union University.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
Topics for exam in AOSD Basic concepts: tangling, scattering, joinpoint, advice, cross-cutting, weaving AspectJ: syntax, pointcut notations, around, proceed,
Aspect Oriented Development Alex Beatty.  Purpose  Cross-cutting Concerns  Join Points, Pointcuts, and Advices  Weaving  Invasive vs. Non-Invasive.
AOP-Driven Variability in Software Product Lines Vander Alves, Ayla Dantas, and Paulo Borba Informatics Center – UFPE – Brazil
问题 Code scattering Blocks of duplicated code Blocks of complementary code, and different modules implementing complementary parts of the concern Code.
aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October
Applying Aspect-Orientation in Designing Security Systems Shu Gao Florida International University Center for Advanced Distributed Systems Engineering.
Aspect Security - RaviShekhar Gopalan - Prof. Lieberherr Software Security (CSG379)
R R R A Brief Introduction to Aspect-Oriented Programming.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Spring 2012.
UBC software modularity group 1/14/02 UCSD1 Discussion with Kiczales at UBC Ontology of AOP Ontology is the study of what there is, an inventory of what.
University of British Columbia Software Practices Lab Uniform Support for Modeling Crosscutting Structure Maria Tkatchenko Gregor Kiczales Work supported.
Aspect-Oriented Software Development (AOSD)
1 An AOP Implementation Framework for Extending Join Point Models Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Hidehiko Masuhara(University.
AO Mechanisms in Demeter1 Discussion with Gregor Kiczales at UBC Ontology of AOP Ontology is the study of what there is, an inventory of what exists. An.
Aspect-oriented Code Generation Approaches Abid Mehmood & Dayang N. A. Jawawi Department of Software Engineering Faculty of Computer Science and Information.
SE 510 Principles and Applications of Software Design Aspect Oriented Programming October 5, 2005 Jeff Webb.
Software Engineering Lecture 7
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Towards Effective Adaptive User Interfaces Design
Discussion with Gregor Kiczales at UBC
Demeter Aspects Who We Are Aspectual Collaborations
ЕВОЛУЦИЈА СОФТВЕРА ПОДРЖАНА АСПЕКТНО-ОРИЈЕНТИСАНИМ ПРОГРАМИРАЊЕМ
Structuring Adaptive Applications using AspectJ and AOM
Chenchen Xi CNC Supervisor: Prof. John R. Gurd
Refactoring the Aspectizable Interfaces: An Empirical Assessment
Presentation transcript:

Aspect Oriented Programming An Introduction based on se-radio.net episode th October 2009 Aspect Oriented Programming - Nils Schmidt

Agenda Separation of concerns and the need for AOP AOP by example Join point models & weaving se.radio.net Episode 106 Questions & answers session 29th October 20091Aspect Oriented Programming - Nils Schmidt

Separation of concerns “Separation of concerns is a fundamental principal of software design and implementation” [1] –it helps structuring code according to requirements –it improves maintainability of software –It has been a driving factor for new paradigms, patterns etc. Ideal Situation: Each element of source code serves exactly one concern 29th October 2009Aspect Oriented Programming - Nils Schmidt2

Separation of concerns – Some approaches 29th October 2009Aspect Oriented Programming - Nils Schmidt3 Object Orientation Subroutines Procedural Programming Service Orientation Web Services Structured Programming Data Structures Model View Controller Functional Programming Internet Protocol Suite Separation of rooms using corridors Modular Programming Component Servers Aspect Oriented Programming

Crosscutting concerns - The need for AOP Software is usually modularized according to its core concerns (its main functionality) 29th October 2009Aspect Oriented Programming - Nils Schmidt4 Mathematics Software System Prime Number Creation Sort Algorithms Matrix Chain Multipl. …

Crosscutting concerns - The need for AOP Software is usually modularized according to its core concerns (its main functionality) 29th October 2009Aspect Oriented Programming - Nils Schmidt4 Mathematics Software System Prime Number Creation Sort Algorithms Matrix Chain Multipl. … Core concerns

Crosscutting concerns - The need for AOP “Any structural realization of a system will find that some concerns […] cross multiple elements. AOP is focused on mechanisms for simplifying the realization of such crosscutting concerns.” [2] 29th October 2009Aspect Oriented Programming - Nils Schmidt5 Mathematics Software System Prime Number Creation Sort Algorithms Matrix Chain Multipl. … Core concerns

Crosscutting concerns - The need for AOP “Any structural realization of a system will find that some concerns […] cross multiple elements. AOP is focused on mechanisms for simplifying the realization of such crosscutting concerns.” [2] 29th October 2009Aspect Oriented Programming - Nils Schmidt5 Mathematics Software System Prime Number Creation Sort Algorithms Matrix Chain Multipl. … Core concerns Caching Security Profiling

Crosscutting concerns - The need for AOP “Any structural realization of a system will find that some concerns […] cross multiple elements. AOP is focused on mechanisms for simplifying the realization of such crosscutting concerns.” [2] 29th October 2009Aspect Oriented Programming - Nils Schmidt5 Mathematics Software System Prime Number Creation Sort Algorithms Matrix Chain Multipl. … Core concerns Caching Security Profiling Crosscutting concerns

AOP by Example Matrix Chain Multiplication Solver –Calculates minimal number of elementary multiplications needed for multiplying a sequence of matrices –Use dynamic programming (caching) –Use time consumption analysis (profiling) 29th October 2009Aspect Oriented Programming - Nils Schmidt6

29th October 2009Aspect Oriented Programming - Nils Schmidt7

29th October 2009Aspect Oriented Programming - Nils Schmidt7 Core concern (MCMS) Caching concern Profiling concern Core concern (MCMS) Caching concern Profiling concern Base code is tangled by crosscutting concerns Hard to maintain!

29th October 2009Aspect Oriented Programming - Nils Schmidt8 Only the core concern is left in the class No further concerns are present anymore Only the core concern is left in the class No further concerns are present anymore Easier to maintain! But where did the crosscutting concerns go?

29th October 2009Aspect Oriented Programming - Nils Schmidt9 Crosscutting concerns are moved into so called aspects

29th October 2009Aspect Oriented Programming - Nils Schmidt9 Crosscutting concerns are moved into so called aspects An aspect is a basic concept (similar to a class); it is composed of pointcuts and advices. Crosscutting concerns are moved into so called aspects An aspect is a basic concept (similar to a class); it is composed of pointcuts and advices.

29th October 2009Aspect Oriented Programming - Nils Schmidt9 Crosscutting concerns are moved into so called aspects An aspect is a basic concept (similar to a class); it is composed of pointcuts and advices. A pointcut defines when in the execution model the aspect needs to be applied. Crosscutting concerns are moved into so called aspects An aspect is a basic concept (similar to a class); it is composed of pointcuts and advices. A pointcut defines when in the execution model the aspect needs to be applied.

29th October 2009Aspect Oriented Programming - Nils Schmidt9 Crosscutting concerns are moved into so called aspects An aspect is a basic concept (similar to a class); it is composed of pointcuts and advices. A pointcut defines when in the execution model the aspect needs to be applied. An advice defines what needs to be applied to the execution model. Crosscutting concerns are moved into so called aspects An aspect is a basic concept (similar to a class); it is composed of pointcuts and advices. A pointcut defines when in the execution model the aspect needs to be applied. An advice defines what needs to be applied to the execution model.

Join Point Models A join point is a specific point in the execution model of a program A pointcut is a query that selects a subset of all join points in the execution model A join point model defines which join points could be selected by a pointcut (e.g. method calls, variables …) The more powerful the join point model is, the more one can do with that AO language 29th October 2009Aspect Oriented Programming - Nils Schmidt10

Weaving Weaving is the process of reconnecting the separated concerns (core elements + aspects) Weaving might be done at compile-time, load-time or run- time of a system 29th October 2009Aspect Oriented Programming - Nils Schmidt11 Aspects Core Elements

se-radio.net Episode Speakers 29th October 2009Aspect Oriented Programming - Nils Schmidt12 Markus Völter Founder and Editor of se-radio.netFounder and Editor of se-radio.net Independent ConsultantIndependent Consultant Author of several books and articlesAuthor of several books and articles Christia Schwanninger Siemens AGSiemens AG Researcher in the field of AOResearcher in the field of AO Iris Grohr Siemens AGSiemens AG PhD student at University of LinzPhD student at University of Linz Researcher in the field of AOResearcher in the field of AO

Motivation and basic terms Crosscutting concerns, aspects, advices, join points, pointcutsCrosscutting concerns, aspects, advices, join points, pointcuts Join Point Model Differences of JPMsDifferences of JPMs Examples of the AspectJ JPMExamples of the AspectJ JPM Aspect weaving Static, dynamic and load-time weavingStatic, dynamic and load-time weaving se-radio.net Episode Content (shortened) 29th October 2009Aspect Oriented Programming - Nils Schmidt13 Practical experience (Patching existing systems)(Patching existing systems) Product familiesProduct families AO mindset AO analysisAO analysis AO thinkingAO thinking Outlook AO in researchAO in research AO in businessesAO in businesses

Motivation and basic terms Crosscutting concerns, aspects, advices, join points, pointcutsCrosscutting concerns, aspects, advices, join points, pointcuts Join Point Model Differences of JPMsDifferences of JPMs Examples of the AspectJ JPMExamples of the AspectJ JPM Aspect weaving Static, dynamic and load-time weavingStatic, dynamic and load-time weaving se-radio.net Episode Content (shortened) 29th October 2009Aspect Oriented Programming - Nils Schmidt13 Practical experience (Patching existing systems)(Patching existing systems) Product familiesProduct families AO mindset AO analysisAO analysis AO thinkingAO thinking Outlook AO in researchAO in research AO in businessesAO in businesses

Motivation and basic terms Crosscutting concerns, aspects, advices, join points, pointcutsCrosscutting concerns, aspects, advices, join points, pointcuts Join Point Model Differences of JPMsDifferences of JPMs Examples of the AspectJ JPMExamples of the AspectJ JPM Aspect weaving Static, dynamic and load-time weavingStatic, dynamic and load-time weaving se-radio.net Episode Content (shortened) 29th October 2009Aspect Oriented Programming - Nils Schmidt13 Practical experience (Patching existing systems)(Patching existing systems) Product familiesProduct families AO mindset AO analysisAO analysis AO thinkingAO thinking Outlook AO in researchAO in research AO in businessesAO in businesses

Motivation and basic terms Crosscutting concerns, aspects, advices, join points, pointcutsCrosscutting concerns, aspects, advices, join points, pointcuts Join Point Model Differences of JPMsDifferences of JPMs Examples of the AspectJ JPMExamples of the AspectJ JPM Aspect weaving Static, dynamic and load-time weavingStatic, dynamic and load-time weaving se-radio.net Episode Content (shortened) 29th October 2009Aspect Oriented Programming - Nils Schmidt13 Practical experience (Patching existing systems)(Patching existing systems) Product familiesProduct families AO mindset AO analysisAO analysis AO thinkingAO thinking Outlook AO in researchAO in research AO in businessesAO in businesses

Motivation and basic terms Crosscutting concerns, aspects, advices, join points, pointcutsCrosscutting concerns, aspects, advices, join points, pointcuts Join Point Model Differences of JPMsDifferences of JPMs Examples of the AspectJ JPMExamples of the AspectJ JPM Aspect weaving Static, dynamic and load-time weavingStatic, dynamic and load-time weaving se-radio.net Episode Content (shortened) 29th October 2009Aspect Oriented Programming - Nils Schmidt13 Practical experience (Patching existing systems)(Patching existing systems) Product familiesProduct families AO mindset AO analysisAO analysis AO thinkingAO thinking Outlook AO in researchAO in research AO in businessesAO in businesses

Motivation and basic terms Crosscutting concerns, aspects, advices, join points, pointcutsCrosscutting concerns, aspects, advices, join points, pointcuts Join Point Model Differences of JPMsDifferences of JPMs Examples of the AspectJ JPMExamples of the AspectJ JPM Aspect weaving Static, dynamic and load-time weavingStatic, dynamic and load-time weaving se-radio.net Episode Content (shortened) 29th October 2009Aspect Oriented Programming - Nils Schmidt13 Practical experience (Patching existing systems)(Patching existing systems) Product familiesProduct families AO mindset AO analysisAO analysis AO thinkingAO thinking Outlook AO in researchAO in research AO in businessesAO in businesses

Motivation and basic terms Crosscutting concerns, aspects, advices, join points, pointcutsCrosscutting concerns, aspects, advices, join points, pointcuts Join Point Model Differences of JPMsDifferences of JPMs Examples of the AspectJ JPMExamples of the AspectJ JPM Aspect weaving Static, dynamic and load-time weavingStatic, dynamic and load-time weaving se-radio.net Episode Content (shortened) 29th October 2009Aspect Oriented Programming - Nils Schmidt13 Practical experience (Patching existing systems)(Patching existing systems) Product familiesProduct families AO mindset AO analysisAO analysis AO thinkingAO thinking Outlook AO in researchAO in research AO in businessesAO in businesses

Cut-Outs Parts that have been cut out of the original se-radio.net episode 106: Characteristics of concerns –Business vs. software concerns –Technical vs. functional concerns Characteristics of aspects –Asymmetric vs. symmetric aspects –Heterogeneous vs. homogenous aspects –Developmental vs. productive aspects –Aspect ordering Sophisticated pointcut models Some Real World Examples Tools for AOP Research Languages 29th October 2009Aspect Oriented Programming - Nils Schmidt14

Summary Separation of concerns is an essential concept to improve maintainability AOP provides a well defined model to deal with crosscutting concerns AOP increases overall maintainability Aspects, Advices, pointcuts and joint points are the backbone of AOP The more powerful your joint point model is, the more you can do with it Weaving might be applied at different times and levels You need to think AO before you can program AO AOP is still a research topic, but yet a business relevant topic as well 29th October 2009Aspect Oriented Programming - Nils Schmidt15

Questions & Answers 29th October 2009Aspect Oriented Programming - Nils Schmidt16

Literature & Further Material Gregor Kiczales. Aspect Oriented Programming: Radical Research in Modularity. May 2006,Web Video. Tzilla Elrad and Robert E. Filman and Atef Bader. „Aspect-oriented programming“ ACM Computing Surveys (Oct. 2001): Print. G. Kiczales and J. Lamping and A. Mendhekar and C. Maeda and C. Lopes and J. Loingtier and. Irwin. „Aspect-Oriented Programming“ Proceedings of the European Conference on Object-Oriented Programming (1997): Print. Ian Sommerville. Software Engineering. Addison Wesley, 8th edition, Jun Print. „Aspect-oriented programming“ Wikipedia, the free encyclopedia. Web. Aspect-Oriented Software Development Community & Conference. Web. Ramnivas Laddad. AspectJ in Action. Manning Publications, 2nd edition, Sep Print. Siobhán Clarke and Elisa Baniassad. Aspect-Oriented Analysis and Design: The Theme Approach. Addison-Wesley Professional, Apr Print. Vladimir O. Safonov. Using Aspect-Oriented Programming for Trustworthy Software Development. Wiley-Interscience, May Print. 29th October 2009Aspect Oriented Programming - Nils Schmidt17

Bibliography [1]Ian Sommerville. Software Engineering. Addison Wesley, 8th edition, Jun Print. [2]Tzilla Elrad and Robert E. Filman and Atef Bader. „Aspect-oriented programming“ ACM Computing Surveys (Oct. 2001): Print. 29th October 2009Aspect Oriented Programming - Nils Schmidt18