Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.

Slides:



Advertisements
Similar presentations
AspectWerkz 2 - and the road to AspectJ 5 Jonas Bonér Senior Software Engineer BEA Systems.
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.
An Aspect-Oriented Approach For Web Application Access Control Presented by: Mohamed Hassan Carleton University Carleton University
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.
Secure Systems Research Group - FAU Aspect Oriented Programming Carlos Oviedo Secure Systems Research Group.
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
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.
Data Structure: Java Programming 1 Min Chen School of Computer Science and Engineering Seoul National University.
Aspect Oriented Programming Written by Michael Beder.
(c) Copyright Palo Alto Research Center Incroporated. All rights reserved.1 AO Tools: State of the (AspectJ™) Art and Open Problems Mik Kersten.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Fall 2012.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Debugging Support.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
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)
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 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
Modularizing Web Services Management with AOP María Agustina Cibrán, Bart Verheecke { Maria.Cibran, System and Software Engineering.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
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.
Joel Phinney March 31, ◦ Concerns  Separation of Concerns, Tangled and Scattered Concerns, Cross-Cutting Concerns, Aspects ◦ Aspect-Oriented Software.
A Meta-Level Specification and Profile for AspectJ in UML Joerg Evermann School of Information Management Victoria University of Wellington.
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
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.
C++ and Ubuntu Linux Review and Practice CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Inter-Type Declarations in AspectJ Awais Rashid Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
AspectJ – AOP for Java Tom Janofsky. Instructor at Penn State Abington Consultant with Chariot Solutions JUG Member.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Topics for exam in AOSD Basic concepts: tangling, scattering, joinpoint, advice, cross-cutting, weaving AspectJ: syntax, pointcut notations, around, proceed,
Chapter 8: Aspect Oriented Programming Omar Meqdadi SE 3860 Lecture 8 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Click to edit Master text styles JavaMOP Hamid Reza Niroomand A presentation to Dr. Babamir.
Aspect Oriented Programming Adlux Consultancy Services Pvt Ltd
Kansas City Java User’s Group Jason W. Bedell July 12, 2006
问题 Code scattering Blocks of duplicated code Blocks of complementary code, and different modules implementing complementary parts of the concern Code.
Comparison of Different AOP Approaches Presented by: Xiaojing Wang.
aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October
AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori.
Introduction to Yan Cui Aspect Oriented Programming by
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.
CSC450 Software Engineering Devon M. Simmonds University of North Carolina, Wilmington 1.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Aspect-Oriented Software Development (AOSD)
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
aspectj tools new and noteworthy Mik Kersten University of British Columbia Andy Clement, George Harley IBM Hursley Labs.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
Aspect-oriented Code Generation Approaches Abid Mehmood & Dayang N. A. Jawawi Department of Software Engineering Faculty of Computer Science and Information.
Software Engineering Lecture 7
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Object-Orientated Programming
Aspect-oriented programming
AspectAda Aspect-Oriented Programming for Ada95
Road to Object Oriented Programming
Plug-In Architecture Pattern
Presentation transcript:

Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007

Background Procedural Languages like – Fortran, Pascal, C Object Oriented Programming like – Java, C++ Aspect Oriented Programming Frameworks like – AspectJ etc.

Advantages of OOP Modularity Reduce large problems to smaller Reusability Inheritance Polymorphism Reliability Robustness Maintainability Extendibility

Problems with OOP Not much strong reusability of code Every time inherit one base class Or Use delegation A functional unit can not be isolated, even they crosscut programs at many places Logging, security checks, transaction management Crosscutting concerns increases the cost of developing and maintenance cost.

Introduction Aspect Oriented Programming Was discovered in Palo Alto Research Center during 1980s and 1990s Is to Object Oriented Programming (like C++ to C)‏ Does not replace Object Oriented Programming technique, it complements it Is a technique Allows programmers to modularize the crosscutting concerns Separate crosscutting concerns from an application

Terminology Aspect Is a unit of modularity, encapsulation and abstraction Is like a class in object oriented technology Can be used to implement crosscutting concerns in a modular fashion Summarize behaviors that affect multiple classes into reusable modules Cross-cutting concerns Find out certain behavior to occur at one or more points in a program

Cont'd..... Join Points Identify the points in the execution of components where aspect should be applied For example: execution of method & constructor referred from

Cont'd..... Pointcuts Used to select join points Advice Specifies what to do at joint points For example Before(...) : PointcutExpr(...); After(...) : PointcutExpr(...); Around(...) : PointcutExpr(...); Weaving Task which is done by compiler in linking classes and aspect together Is no longer needed if there is an aspect oriented compiler available.

Example package hello; public class HelloWorld { public void sayHello() { System.out.println("Hello"); } public static void main(String[] args) { new HelloWorld().sayHello(); } public aspect World { pointcut greeting(): execution(* HelloWorld.sayHello(..)); after() returning: greeting() { System.out.println("World!"); } Advice Join Point

AOP tools in Java AspectJ(we are using this)‏ JBOSS AOP Spring AOP JAC

Installing AspectJ Command line Download AspectJ from aspectj.org Start the installation by running java-jar java –jar aspectj jar Setup path and classpath Compile AspectJ programs by ajc YourJavaClass.java YourAspect.aj >ajc Hello.java World.aj Eclipse Get the ajdt_1.4.1_for_eclipse_3.2 zip file Extract the zip file in to the eclipse folder api/index.html api/index.html

What is AJDT? “AspectJ Development Tools” Comprehensive tool support for using AspectJ in Eclipse Integrating the AspectJ compiler New editors/views/wizards for working with AspectJ artefacts Tool support is critical for AOP For day to day development of AO programs For learning AO concepts and understanding the power of AO

The outline view Shows aspect structure post compilation: – Advice – Inter-type declarations – Declared warnings/errors – Defined Pointcuts Useful feedback loop – Did my pointcut match anything? Fully navigable – Jump to advised locations

Source Annotations Gutter annotations in editor view – Highlight lines affected by advice – Hover help shows advice in affect – Context menu for annotations allows navigation to advice Important visual cue for developers – Not all users have the outline view active

Aspect Visualizer  Shows scattering, tangling, crosscutting  SeeSoft style  Optionally: Look at affect of particular aspects View at the package or class level Navigate from affected lines back to source Even zoom in !

Good Modularity: URL Pattern Matching URL pattern matching in org.apache.tomcat – red shows relevant lines of code – nicely fits in two boxes (using inheritance)‏

Problems: Logging is not modularized* instances of logging in org.apache.tomcat red represents lines of code that handle logging occurences are not in just one place, and in a significant number of places

Summary: Purpose of AOP AOP is an extension of OOP AOP does not replace OOP AOP has functions, classes and aspects Make design and code more modular Isolate the concerns for separate development Separate expression of behavioral concerns from structural ones Poor composition can lead to interference

The Future of AOP Language Design Standardization across frameworks Tool Development IDE support, UML support, aspect discovery, re-factoring, re-cutting, source level debuggers Dynamic Source Weaving (Wicca - debugs dynamically composed aspect- enabled programs)‏ Software Engineering Finding aspects that help define modularity in aspects Concern Manipulation Environment (CME) Open source Eclipse project targeting AO technologies Theory Consistency in varying compiler interpretation Fast compilation Advanced crosscut constructs

Thank you! Questions?