Jump to ratings and reviews
Rate this book

AOP in .NET: Practical Aspect-Oriented Programming

Rate this book
Summary 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 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 this 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.

What's Inside
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

Table of Contents
PART 1 GETTING STARTED WITH AOP PART 2 THE FUNDAMENTALS OF AOP PART 3 ADVANCED AOP CONCEPTS

296 pages, Paperback

First published May 28, 2013

4 people are currently reading
32 people want to read

About the author

Matthew Groves

17 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
17 (41%)
4 stars
13 (31%)
3 stars
10 (24%)
2 stars
1 (2%)
1 star
0 (0%)
Displaying 1 - 8 of 8 reviews
Profile Image for Iman Jahandideh.
13 reviews8 followers
March 19, 2021
The concept of Aspect-Oriented Programming is an interesting one. I’m struggling with some important use cases which in theory, AOP suits well and can greatly decrease the cost of the development and reduce the maintainability.
To use AOP in practice some principles are needed, since like many concepts in programming the cost of misuse can be high. I know the book tries to have a practical approach, but principles are as important as of tools and technologies (if not more). The book doesn’t delve into the principles and general concepts of AOP much, even in sections named “The Fundamentals of AOP”. This is very unfortunate, because even in the simple examples used in the book, I find some design and architectural issues. One of the main one is the heavy coupling between the AOP library and the code base (it seems to be more prominent in compile-time AOP libraries). Another issue is automated testing, which is addressed in the book but the solutions presented are far from ideal. There are also other issues like debugging and complexity and dependencies of aspects.
In general, for someone trying to understand the concept and principles of AOP in a tool independent environment, this book is a very poor choice.
Profile Image for Daniel Schulte.
357 reviews4 followers
October 18, 2020
This book is a great introduction to Aspect Oriented Programming (AOP). After reading this book, I think that AOP is much too magical for me. I prefer my programs to be sequential and to not jump to another part of the code without a clear call site/method call. I know that AOP can be slightly more convenient than just using the decorator pattern, but I feel that the decorator pattern is simpler to understand, debug, and to maintain, so for me decorators are still preferable to AOP.
25 reviews
April 20, 2019
Brilliant position related to AOP paradigm. It contains all necessary information and examples about major AOP frameworks in .NET environment.
Profile Image for Sean Mcdonough.
21 reviews6 followers
June 9, 2014
If you've ever been tempted to dip your toes into the waters of aspect-oriented programming in the .NET world, this book is an excellent way to "boot into" it. Matt Groves does a fantastic job of starting with the basics and explaining what AOP is. He covers how AOP works, how it can be used in .NET, and takes time to introduce the reader to a sampling of the tools that make AOP possible.

Full disclosure: I came to this book as a PostSharp owner who wanted to make more use of the tools he had purchased. I had some AOP knowledge coming in ... but not a lot. After completing the book (a relatively straightforward read) and playing around a bit, I feel much more confident in my ability to leverage PostSharp in my day-to-day development. I also feel well-positioned to grab other tools (e.g., something like Castle's DynamicProxy) that use run-time weaving (as opposed to PostSharp's post-compile weaving) and make use of them.

Given that I tend to develop a lot of middleware and service-related software that typically contains many cross-cutting concerns (logging, tracing, performance tracking, etc.), I'm confident that what I've learned with this book will be a tremendous asset going forward. Nice job, Matt!
624 reviews5 followers
July 9, 2013
This was a very interesting read. I have never used any Aspect Oriented Programming practices before, but I immediately started thinking about places to incorporate it, particularly in the WinForms world where I've been working so much recently. We could use this for reentrancy checking, a standard exception handler for all Form and UserControl event handlers, and so on.

The book was laid out nicely, I thought, with plenty of real-world examples. Having also never used an IoC container, some of the examples took an extra bit of effort to read. Our code's regular use of constructor injection helped in that regard.

Apart from the "primary" sections of how to use AOP, I found two chapters especially interesting and helpful. The chapter comparing compile-time and run-time AOP frameworks was very helpful, as well as the note toward the end of the book suggesting that both have their place in the same project. I also appreciated the chapter on unit testing aspects and the code to which aspects are applied.

Now I'll have to hand this book on to a few others at work to see where we can go from here.
Profile Image for Kevin.
35 reviews2 followers
May 27, 2014
Very easy read to get through, but nothing particularly revolutionary -- many of the concepts have existed outside of the .NET ecosystem for years. The first section especially seemed to drag on through concepts that are not difficult to comprehend.

Particularly interesting was the chapter explaining how the various tools work "under the hood", along with the appendix cataloguing some up and coming AOP tools in .NET.
Profile Image for Miguel Alho.
58 reviews10 followers
October 11, 2013
well written and very easy to read, especially the first two thirds of the book. The examples are super simple to go through and are easy to understand. Unit testing is also covered which is a plus.
Displaying 1 - 8 of 8 reviews

Can't find what you're looking for?

Get help and learn more about the design.