Helps the reader integrate techniques and technologies with real-world practices.
AOP in .NET introduces aspect-oriented programming to .NET developers and provides practical guidance on how to get the most benefit from this technique in your everyday coding. The book's many examples concentrate on modularizing non-functional requirements that often sprawl throughout object-oriented projects. Even if you've never tried AOP before, you'll appreciate the straightforward introduction using familiar C#-based examples. AOP tools for .NET have now reached the level of practical maturity Java developers have relied on for many years, and you'll explore the leading options, PostSharp, and Castle DynamicProxy.
about this book
Part 1 Getting started with AOP
1. Chapter 1 Introducing AOP
1.1. What is AOP?
1.2. Hello, World
2. Chapter 2 Acme Car Rental
2.1. Start a new project
2.2. Life without AOP
2.3. The cost of change
2.4. Refactor with AOP
Part 2 The Fundamentalsof AOP
3. Chapter 3 Call this instead: intercepting methods
3.1. Method interception
3.2. Real-world example: data transactions
3.3. Real-world example: threading
4. Chapter 4 Before and after: boundary aspects
4.1. Boundary aspects
4.2. Real-world example: detecting mobile users
4.3. Real-world example: caching
5. Chapter 5 Get this instead: intercepting locations
5.1. Location interception
5.2. Real-world example: lazy loading
5.3. Real-world example: INotifyPropertyChanged
6. Chapter 6 Unit testing aspects
6.1. Writing tests with NUnit
6.2. Castle DynamicProxy testing
6.3. PostSharp testing
Part 3 Advanced AOP concepts
7. Chapter 7 AOP implementation types
7.1. How does AOP work?
7.2. Runtime weaving
7.3. Compile-time weaving
7.4. Runtime versus compile-time weaving
8. Chapter 8 Using AOP as an architectural tool
8.1. Compile-time initialization and validation
8.2. Architectural constraints
9. Chapter 9 Aspect composition: example and execution
9.1. Using multiple aspects
9.2. Aspect roles with PostSharp
9.3. Composing aspects with DynamicProxy
9.4. Real-world example: caching and authorization
Appendix A: Ecosystem of .NET AOP tools
Appendix B: NuGet basics
© 2014 Manning Publications Co.
About the Technology
Core concerns that cut across all parts of your application, such as logging or authorization, are difficult to maintain independently. In aspect-oriented programming (AOP) you isolate these cross-cutting concerns into their own classes, disentangling them from business logic. Mature AOP tools like PostSharp and Castle DynamicProxy now offer .NET developers the level of support Java coders have relied on for years.
About the book
AOP in .NET introduces aspect-oriented programming and provides guidance on how to get the most practical benefit from this technique. The book's many examples concentrate on modularizing non-functional requirements that often sprawl throughout object-oriented projects. You'll appreciate its straightforward introduction using familiar C#-based examples.
This book requires no prior experience with AOP. Readers should know C# or another OO language.
- Clear and simple introduction to AOP
- Maximum benefit with minimal theory
- PostSharp and Castle DynamicProxy
Shows how you can clean up your code using a powerful concept.
The best single volume for the variety of .NET AOP concepts presented.
Cuts through the complexity of AOP with relevant examples.
A great introduction to AOP for .NET developers.