This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
www.orbitone.comAspect Oriented Programming - The Spring.NET Approach
Aspect Oriented Programming - The Spring.NET Approach
AOP key terms I
Whereas OO decomposes applications into a hierarchy of objects, AOP decomposes programs into aspects or concerns
Computer programming techniques aim to provide better separation of concerns
The term separation of concerns is a design principle which promotes the partitioning of a computer program intro distinct entities or features, overlapping as little as possible in functionality
A concern is a feature or behavior of the program
10 May, 2009
Aspect Oriented Programming - The Spring.NET Approach
AOP key terms II
The emergence of the Aspect Oriented Programming (AOP) paradigm is driven by the need for better ways of describing and encapsulating concerns in a software application
Joinpoint: Point during the execution of a program, such as a method invocation or a particular exception being thrown.
Advice: Action taken by the AOP framework at a particular joinpoint. Different types of advice include "around," "before" and "throws" advice
Pointcut: A set of joinpoints specifying when an advice should fire.
Target object: Object containing the joinpoint. Also referred to as advised or proxied object
10 May, 2009
Aspect Oriented Programming - The Spring.NET Approach
Back to the real world
Joinpoint = before a method call, after a method call, during the call itself
Pointcut = the method call itself
Advice = extra actions executed before, in place of or after the method call
10 May, 2009
Aspect Oriented Programming - The Spring.NET Approach
The problem
I want to retrieve some data from a data source.
Data retrieval has to be secured. Only specific authenticated users have acces to it.
I want to solve this with Sring.NET’s AOP features
10 May, 2009
Aspect Oriented Programming - The Spring.NET Approach
Demo
……………………………………….
10 May, 2009
Aspect Oriented Programming - The Spring.NET Approach