View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
Problem Domain Cross-Cutting Concerns Solution Domain Separation of Concerns
What is AOP? An extension of (not an alternative to) OOP that addresses the issue of cross-cutting concerns by providing a mean to: Encapsulate cross-cutting concerns into Aspects = collection of transformations of code Applyaspects to elements of code
15 Years of AOP History Hype Years Productivity Years Research Years
Why You Should Care The benefits of aspect-oriented programming
The benefits of aspect-oriented programming Decrease Development Costs WriteFewer lines of code ReadFewer lines of code Concise, clear, understandable code Size-Cost relationship is superlinear
The benefits of aspect-oriented programming Improve Quality Fewer lines of code -> Fewer Defects More automation -> Fewer Defects Less boiler-plate code -> More interesting work -> Increased attention -> Fewer Defects
The benefits of aspect-oriented programming Decrease Maintenance Costs Remember: Fewer Defects Maintenance = 75% Reading Code How do you change a pattern once it’s implemented? Better architecture metrics: Decreased component coupling Increased component cohesion
The benefits of aspect-oriented programming Decrease Maintenance Costs
Comparing Aspect Frameworks Static vs Dynamic AOP Spring.NET Castle MS Unity/PIAB PostSharp LinFu Build-Time: Very Expressive Robust Model Not InvasiveStatic Run-Time:Less ExpressiveBrittle Model InvasiveDynamic Hybrid
Comparing Aspect Frameworks Expressiveness (1/2) What can you do with the framework?
Comparing Aspect Frameworks Expressiveness (2/2) How do you apply aspects to code?
Comparing Aspect Frameworks Non-Invasiveness Can you use aspects without deep refactoring? Require the use of factory methods
Comparing Aspect Frameworks Robustness Can you prevent aspects from being improperly used?
Comparing Aspect Frameworks Misc. Other points that matter