Aspect-Oriented Programming. Procedural Programming Abstract program into procedures. Object-Oriented Programming Abstract program into objects. Aspect-Oriented.

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.
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.
Aspect Oriented Programming - AspectJ Radhika Rajput.
1 Lecture 11 Interfaces and Exception Handling from Chapters 9 and 10.
Secure Systems Research Group - FAU Aspect Oriented Programming Carlos Oviedo Secure Systems Research Group.
Figures – Chapter 21. Figure 21.1 Cross-cutting concerns.
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 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.
Modules Program is built out of components. Each component defines a set of logically related entities (strong internal coupling) A component has a public.
(c) Copyright Palo Alto Research Center Incroporated. All rights reserved.1 AO Tools: State of the (AspectJ™) Art and Open Problems Mik Kersten.
AspectJ2EE/Clasa Israel Institute of Technology The Computer Science department Itay Maman.
A Formal Model of Modularity in Aspect-Oriented Programming Jonathan Aldrich : Objects and Aspects Carnegie Mellon University.
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
Taming Obliviousness in Aspects with Data-flow Analysis and Design by Contract Tim Molderez and Dirk Janssens Ansymo Antwerp Systems and Software Modelling.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Debugging Support.
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.
Spring core v3.x Prepared by: Nhan Le. History v3.0 Spring Expression Language Java based bean metadata v3.1 Cache Abstraction Bean Definition Profile.
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.
©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 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:
A Distributed Aspect-Oriented System for J2EE Applications Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) Background - As benefits.
Design Rules for Increasing Modularity with CaesarJ Carlos Eduardo Pontual Advisor: Paulo Borba 17/06/2010.
AOSD1 Aspect-Oriented Software Design Karl Lieberherr Theo Skotiniotis.
TRANSPARENT EXTENSION OF SINGLE- USER APPLICATIONS TO MULTI-USER REAL-TIME COLLABORATIVE SYSTEMS An Aspect Oriented Approach to Framework Integration ICEIS.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
CCC: An Aspect-Oriented Intermediate Language on.Net Platform Yingfei Xiong and Feng Wan University of Electronic Science and Technology of China, China.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
Adaptive Software Kevin Cella Graduate Seminar 02/04/2005.
Aspect-Oriented Action Semantics Descriptions Luis Menezes University of Pernambuco
Aspect Oriented Architecture (AOA) Why – to alleviate crosscutting in a system Why – to alleviate crosscutting in a system When – When – 1984.
Inter-Type Declarations in AspectJ Awais Rashid Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Demeter Aspects We study techniques for the emerging area of Aspect-Oriented Software Development and focus on the following areas:  Aspectual Collaborations.
Software Engineering Lecture 6 Vladimir Safonov, Professor, head of laboratory St. Petersburg University WWW:
Chapter 8: Aspect Oriented Programming Omar Meqdadi SE 3860 Lecture 8 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Alloy-based Lightweight Verification for Aspect-oriented Architecture Naoyasu Ubayashi(Kyushu Institute of Technology) Yuki Sato(Kyushu Institute of Technology)
AOP-Driven Variability in Software Product Lines Vander Alves, Ayla Dantas, and Paulo Borba Informatics Center – UFPE – Brazil
Extending the Field Access Pointcuts of AspectJ to Arrays ICS 2006 – Taipei, December 2006 Kung Chen and Chin-Hung Chien* National Chengchi University.
1 Deriving Refactorings for AspectJ Leonardo Cole Paulo Borba Informatics Center Federal University of Pernambuco Brazil.
Towards an Aspect-oriented Language Module: Aspects for Petri Nets Tim Molderez, Bart Meyers, Dirk Janssens and Hans Vangheluwe Ansymo Antwerp Systems.
问题 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
AOP/cross-cutting What is an aspect?. An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease.
R R R A Brief Introduction to Aspect-Oriented Programming.
CSC450 Software Engineering Devon M. Simmonds University of North Carolina, Wilmington 1.
AOP with AspectJ Awais Rashid, Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
It is about programming languages…
Aspect-Oriented Programming
Chengyu Sun California State University, Los Angeles
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Aspect Oriented Programming
JAsCo an Aspect-Oriented approach tailored for
CS520 Web Programming Spring – Aspect Oriented Programming
AspectAda Aspect-Oriented Programming for Ada95
Presentation transcript:

Aspect-Oriented Programming

Procedural Programming Abstract program into procedures. Object-Oriented Programming Abstract program into objects. Aspect-Oriented Programming Abstract program into aspects.

Aspects are stand-alone modules that allow the programmer to express crosscutting concerns in. Crosscutting concerns are concerns of a program which affect (crosscut) other concerns. A concern is any piece of interest or focus in a program. separation of concerns (SoC) is the process of breaking a computer program into distinct features that overlap in functionality as little as possible.

void transfer(Account from, Account to, int amount) { if (!getCurrentUser().canPerform(OP_TRANSFER)) { throw new SecurityException(); } if (amount < 0) { throw new NegativeTransferException(); } Transaction tx = database.newTransaction(); try { if (from.getBalance() < amount) { throw new InsufficientFundsException(); } from.withdraw(amount); to.deposit(amount); tx.commit(); systemLog.logOperation(OP_TRANSFER, from, to, amount); } catch(Exception e) { tx.rollback(); throw e; }

void transfer(Account from, Account to, int amount) { if (!getCurrentUser().canPerform(OP_TRANSFER)) { throw new SecurityException(); } if (amount < 0) { throw new NegativeTransferException(); } Transaction tx = database.newTransaction(); try { if (from.getBalance() < amount) { throw new InsufficientFundsException(); } from.withdraw(amount); to.deposit(amount); tx.commit(); systemLog.logOperation(OP_TRANSFER, from, to, amount); } catch(Exception e) { tx.rollback(); throw e; }

Logging Security Persistence … Implementation Module

Requirements Concern Identifier Security Logging Persistence

A seamless aspect-oriented extension to the Java programming language. The widely-used de-facto standard for AOP. Born at Xerox Palo Alto Research Center (PARC) and later available in Eclipse Foundation open-source projects. Java-like syntax and IDE integration. Easy to learn and use.

Join Points Join Points -- Points in a running program where additional behavior can be usefully joined. Pointcuts Pointcuts -- Ways to specify (or quantify) join points. A pointcut determine whether a given join point matches. Advice Advice -- A means of specifying code to run at a join point.

public aspect TraceAspect { private Logger _logger = Logger.getLogger("trace"); pointcut traceMethods() : execution(* *.*(..)) && !within(TraceAspect); before() : traceMethods() { Signature sig = thisJoinPointStaticPart.getSignature(); _logger.logp(Level.INFO, sig.getDeclaringType().getName(), sig.getName(), "Entering"); }

Requirements Concern Identifier Weaver

class Wheel implements Visitable { //... public void accept(Visitor visitor) { visitor.visit(this); }

class GPA include Comparable def (another) #... end a, b = cat.gpa, dog.gpa cat.bg if cat.gpa > dog.gpa

template < typename T, template class OwnershipPolicy = RefCounted, class ConversionPolicy = DisallowConversion, template class CheckingPolicy = AssertCheck, template class StoragePolicy = DefaultSPStorage > class SmartPtr;

# equip the spider with cache def equip(spider) orig_get_page = spider.class.instance_method :get_page dir spider.define_singleton_method :get_page do |url| filename = dir + url if File.exists? filename File.open(filename) { |file| file.read } else page = orig_get_page.bind(self).call(url) File.open(filename, "w") { |file| file.write page } page end

before_filter :determine_locale before_filter :configure_charsets before_filter :load_personal_preferences before_filter :login_required, :except => [:index, :login] before_init_gettext :default_locale

Lack of tool support, and widespread education. Unfriendly to refactor: something as simple as renaming a function can lead to an aspect no longer being applied leading to negative side effects. Security concern: injecting bad code. …