Introduction to Yan Cui Aspect Oriented Programming by

Slides:



Advertisements
Similar presentations
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Advertisements

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.
NCSoft China PD Dept. training - Session 4 -- Lance Zhang
Overview of AspectJ Aspect Oriented Software Development Seminar Technion presented by Oren Mishali.
Copyright © 2008 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. Andrew Stone Common Security.
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
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.
Aspect Oriented Programming Written by Michael Beder.
Introduction to AOP.
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)
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.
What is “model transformation”? Distinction between source and target Source may be same as target May be multiple sources, or targets Reaching a fixed.
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 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.
On the Modularity Assessment of Aspect- Oriented Multi-Agent Systems Product Lines: a Quantitative Study Camila Nunes
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 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.
Architectural pattern: Interceptor Source: POSA II pp 109 – 140POSA II Environment: developing frameworks that can be extended transparently Recurring.
INRIA - LaBRICharles Consel Jan-06 1 Domain-Specific Software Engineering Charles Consel Phoenix Research Group LaBRI /INRIA-Futurs January 2006.
CCC: An Aspect-Oriented Intermediate Language on.Net Platform Yingfei Xiong and Feng Wan University of Electronic Science and Technology of China, China.
Introduction Better Faster Cheaper (pick any two) On-going issue that continues to motivate research in software engineering Applications: –continue to.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
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.
AOP-Driven Variability in Software Product Lines Vander Alves, Ayla Dantas, and Paulo Borba Informatics Center – UFPE – Brazil
The New Solution? Translate XHTML to Java GUI.. Advantages Using XML W3C support XSLT Language Testing Language Specification Using XHTML Reuse web tools.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
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.
aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October
Aspect-Oriented Software Development (AOSD)
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
Inspections on Testing Aspect-Oriented Programs Rodrigo Manuel Lopes de Matos Moreira 4 th Doctoral Symposium on Informatics Engineering Porto, 6 th February.
 Is a programming paradigm  Extends OOP  Enables modularization of cross cutting concerns.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
Software Engineering Lecture 7
Aspect-oriented programming
Chengyu Sun California State University, Los Angeles
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Part 3 Design What does design mean in different fields?
Module 1: Getting Started
Implementation of the INFOD System using AOP
Chengyu Sun California State University, Los Angeles
AOP in .NET Business Rules + Plumbing = Enterprise Software
JAsCo an Aspect-Oriented approach tailored for
Structuring Adaptive Applications using AspectJ and AOM
CS520 Web Programming Spring – Aspect Oriented Programming
AspectAda Aspect-Oriented Programming for Ada95
Implementing FOP Framework
Refactoring the Aspectizable Interfaces: An Empirical Assessment
Presentation transcript:

Introduction to Yan Cui Aspect Oriented Programming by

Server-side

Overview  Cross-Cutting Concerns  AOP  What’s in it for you AOP  Terminologies  AOP and OOP  Solutions Q&A

C ROSS -C UTTING C ONCERNS the PROBLEM...

Image by Mike Rohde Cross-Cutting Concerns

Cuts across multiple abstractions Difficult to decompose High-coupling Boilerplate code

Code tangling and scattering  Poor traceability  Lower productivity  Less code reuse  Harder refactoring

A SPECT -O RIENTED P ROGRAMMING the SOLUTION...

“AOP is a programming paradigm which aims to increase modularity by allowing the separation of cross-cutting concerns” - wikipedia

AOP

Image by Mike Rohde AOP

Centralize concerns implementation Intercept method calls Inject new behaviour More reusable code Cleaner code

What’s in it for YOU ?

Write less code Read less code More concise and easy to understand More maintainable

Fewer code = Less boilerplate code More interesting work Increased attention More PRODUCTIVITY! FEWER DEFECTS!

AOP dive a little deeper into...

Join Point  Place where behaviour can be added  start/end of method  property getter/setter ...

Advice  Code that’s injected at join points  Logging  Validation ...

Point cut  Join points where advice should be applied

Aspect  Container holding point cuts and advice  Aspect is to AOP what class is to OOP

Weaving  Combines advices with point cuts

AOP is complementary to OOP AOP targets a specific problem Code modularization  OOP – Real world objects  AOP – Functionalities

Help you S.O.L.I.Dify your code  Single responsibility  Open/close

You can do AOP via:  Dynamic Proxies  Functional Programming  Code Generation  Dynamic Languages  Static Weaving

D YNAMIC P ROXIES AOP via...

IoC framesworks  Castle  Spring.Net Dynamic interceptors

Image by Mike Rohde Dynamic Proxies

Advantages  Can use existing DI framework  Built-in aspects (logging, etc.)  Aspects can be configured after build

Disadvantages  Significant change to base code required to adapt  Limited AOP features  Do not work on static, non-public methods  Do not work on fields, properties, or events  Higher run-time overhead  No build-time verification  Objects must be instantiated using the container

Class, is AOP the same as Dependency Injection? NOOOO Sir!!

F UNCTIONAL P ROGRAMMING AOP via...

Image by Mike Rohde Functional Programming

Advantages  No external dependencies

Disadvantages  Requires modification to every function  No support for matching rules  Manual aspect composition

C ODE G ENERATION AOP via...

T4, CodeSmith tools

Advantages  Easy to generate complex source code

Disadvantages  Input is usually XML  Cannot inject new behaviour to existing code

D YNAMIC L ANGUAGES AOP via...

Image by Mike Rohde Dynamic Languages

Advantages  Meta-programming is easy

Disadvantages  Switch to a dynamic language can be hard  No (limited) Visual Studio tooling

S TATIC W EAVING AOP via...

PostSharp, AspectJ Uses low-level MSIL transformation Compile time

Aspect Decomposition Aspects Core program Aspect Recomposition Requirements Final System

Image by Mike Rohde PostSharp

Advantages  Most complete support of AOP features  Aspect usage is verified at build time  Better runtime performance

Disadvantages  Increased build time  New to many developers

PostSharp Examples Auto-implement INotifyPropertyChanged Undo/Redo Thread dispatching Transaction handling Performance Monitoring

 Method execution time  Method execution count  Error count

Record exec time Publish to Amazon CloudWatch

Amazon CloudWatch  Cheap to run  Supports alarms and notifications  Visualization tool

Thank theburningmonk.com