Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)

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.
An Aspect-Oriented Approach For Web Application Access Control Presented by: Mohamed Hassan Carleton University Carleton University
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.
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.
Programming Creating programs that run on your PC
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.
Aspect Oriented Programming Written by Michael Beder.
1 Model Interface Implementation for Two-Way Obliviousness in Aspect-Oriented Modeling Presented by Wuliang Sun Department of Computer Science Baylor University.
Software Engineering Muhammad Fahad Khan
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.
Introduction to AOP.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
1 N Degrees of Separation: Multi-Dimensional Separation of Concern (MDSOC) HyperJ: language and concepts of general concern combination.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
An Introduction to Software Architecture
Aspect Oriented Programming (AOP) in.NET Brent Krueger 12/20/13.
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
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.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
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.
Modularizing Web Services Management with AOP María Agustina Cibrán, Bart Verheecke { Maria.Cibran, System and Software Engineering.
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.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Top-Down Design and Modular Development. The process of developing methods for objects is mostly a process of developing algorithms; each method is an.
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
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.
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.
Component Oriented Programming 1 Introduction to COP.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Aspect Oriented Development Alex Beatty.  Purpose  Cross-cutting Concerns  Join Points, Pointcuts, and Advices  Weaving  Invasive vs. Non-Invasive.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
1 Modularity Analysis of Use Case Implementations Fernanda d’Amorim Advisor: Paulo Borba.
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.
Advanced Software Development Karl Lieberherr CSG 260 Fall Semester
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.
Applying Aspect-Orientation in Designing Security Systems Shu Gao Florida International University Center for Advanced Distributed Systems Engineering.
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.
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.
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
SE 510 Principles and Applications of Software Design Aspect Oriented Programming October 5, 2005 Jeff Webb.
Software Engineering Lecture 7
OO Methodology OO Architecture.
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Aspect-Oriented Programming
An Introduction to Software Architecture
Structuring Adaptive Applications using AspectJ and AOM
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
AspectAda Aspect-Oriented Programming for Ada95
Aspect Oriented Software Design
Refactoring the Aspectizable Interfaces: An Empirical Assessment
Presentation transcript:

Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)

programming languages and software design processes  Design processes : break a system down into smaller and smaller units  Programming languages : define abstractions of system sub-units, compose those abstractions to produce the overall system  Abstraction and composition mechanisms is common key object-oriented languages, procedural languages and functional languages

Requirement  Functional : system must able to do it. e.g. registering in education system.  Nonfunctional : Issues in connection with the system and how to do tasks well. e.g. Performance, Quality of Service.

What is a Concern ? One or more requirement related to stakeholders and development, able to implement with a code structure  Core Concerns : –Necessary for correct ? –Is part of program Logic –Encapsulate in module

What is a Concern ? (cont 1)  Crosscutting Concerns: –Is not part of program Logic. e.g. Logging –Cannot be cleanly encapsulated in a module and affect on many module –Lack of clear separation in design and implementation –Tangling and Scattering

What are the Crosscutting Concerns ?  Tangling –Code separate in multiple module  Scattering –Code mixed with code of other concerns

Crosscutting Concerns  Infrastructure Concern –Nonfunctional requirement. e.g. security, logging  Peers Concern –Functional requirement –Overlap in implementation  Extension Concern –Functional requirement –New concern over basic concerns

What Is an Aspect ?  Aspects are an program unit of modularity.  Avoid of separation cross-cutting code  Implement Crosscutting Concerns Without Aspect With Aspect

What Is an Aspect ? (cont.) Aspect Consists of two sections :  Advice code Including piece of code that must be executed (After, Before, Around)  Pointcut Points that advice code must be executed in

Aspect Oriented programming  Crosscutting concerns are implemented in aspects instead of fusing them into core modules.  By reducing code tangling it makes it easier to understand what the core functionality of a module is.  Not replacement for OOP

Aspect Weaver  Integration takes the aspects and the core modules and composes the final system  Can be implemented in various ways Compile-Time By the language compiler Loading-Time first compile source with original compiler, then weave aspects into class files Run-Time By a classloader

Aspect Weaver

Programming environment  Use a Object Oriented language –E.g. Java, C++  AspectJ Weaving in loading and compiling time  Java Aspect Component (JAC) Weaving in run time  JBoss AOP Weaving in run time And open source

Example public class Example { public static void deliverMessage(String essage) { println ("The message is: " + message); } public static void main(String [] args) { deliverMessage("I'm here"); … deliverMessage("AspectJ rocks"); }

Example public aspect ExampleAspect { pointcut helloPC() : call(void Example.deliverMessage(..)); before() : helloPC() { System.out.print("Hello! "); } after() : helloPC() { System.out.println("The message has been delivered."); }

Current CBSE problems  Lack of reusability and adaptability in CBSE  Code-tangling is inherent to CBSE program (crosscutting concern)  Uses statement (like CCM statement) during component specification may be considered harmful

Current CBSE problems (cont.)  CBS adaptability and reusability  Updating Non-functional properties in CCM each component can be configured in Package Phase.  Updating functional properties Container can not be used, business rules change for system, specify in Design Phase

Current CBSE problems (cont.)  Aspect Component Based Software Engineering (ACBSE) solved this problem  New requirements involve change in all of the component life cycle  AOP create changes in each component based system development phase

Dependency in Specification Phase  Belong to the component  Must be maintained by all implementations  Use of component is quite limited  New dependencies becomes difficult task  Solution : Specify dependencies avoiding crosscutting at the Implementation Phase

Dependency in Implementation Phase  Dependency 1.Intrinsic 2.Non-intrinsic  Solution : Each component only implements the basic business functionality (intrinsic)

Dependency in Package Phase 1.Define during system design phase (UML) 2.Dependencies in UML translated to XML Descriptor Specification 3.XML descriptor describes the on-intrinsic for each component 4.Recompile the component code, add restriction and dependencies that specified in XML descriptor 5.These dependencies are expressed as aspect

Dependency in Package Phase  XML descriptors use to describe the component properties  Allows us to apply the non-intrinsic dependencies  Dependencies with other component are not expressed in the implementation

Dependency in Assembly and Deployment Phase  Define non-intrinsic and intrinsic dependencies  Dependencies in UML translated to XML Assembly Descriptor  Permit us to connect the component implementation

ACBSE advantages  Reusability Component is not recoded, implementation adapted to new business rules by changing non- intrinsic dependencies  Adaptability Modifying the component descriptor by altering the final component functionality  Scalability New components with their intrinsic and non- intrinsic dependencies can be used to compose new system

References [1] Pedro J. Clemente and Juan Hernández, Aspect Component Based Software Engineering, University of Extremadura. Spain [2] Gregor Kiczales, et al., Aspect-Oriented Programming, proceedings of the European Conference on Object-Oriented Programming (ECOOP), Finland. Springer-Verlag LNCS June 1997.

Aspect Oriented Programming The end Aspect Component Based Software Engineering (ACBSE)