Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I recently got into PostSharp, an AOP tool for weaving in code. I've been finding a lot of resistance with other developers over giving up writing code to perform the tasks the weaving was meant to simplify. For instance, I'm finding logging or error-handling code where I have postsharp already doing that. I can understand why its happening, since its hard to remember everything that weaving was setup to do (I'm applying a global attribute definition).

With that said, factoring in levels of experience, etc, is AOP beneficial to a project? What is your opinion?

Thanks.

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

AOP is beneficial to the project if you have several members of your team possessing extensive experience with AOP. Otherwise you are going to get a very odd mixture of AOP + OOP + Procedural code. My recommendation is to rely on AOP for logging and/or error handling to prove to the team that it is important and functions as expected. Additionally it can teach them proper techniques for writing the layers that are important, for example if they do the error handling wrong during testing the application will blow up, which is what you would want to happen.

share|improve this answer
add comment

Nice suggestions, Woot4Moo.

I highly recommend reading this book: http://pragprog.com/titles/trevan/driving-technical-change

share|improve this answer
    
What about the book will help the situation? As I understand it, the team has already made the technical change. –  Steve Evers Jan 14 '11 at 15:19
    
@SnOrfus: The full title of the book is "Driving Technical Change: Why People on Your Team Don't Act on Good Ideas, and How to Convince Them They Should". –  philosodad Jan 14 '11 at 16:01
add comment

As of my understanding of AOP, it should not require several team members with extensive experience. If used right (i.e., do not over-use) and properly introduced to the team, the intended gain in code readability and productivity should be obvious to everyone.

You should find a way to introduce a compendium of the aspects you provide, so that every team member can find information regarding the aspects and their functionality easily.

Although I never used it, I find the idea of caching via aspects appealing. There are many blog posts regarding this one, and I think there is an example of it in the postsharp distribution.

share|improve this answer
    
I definitely agree with this. If AOP is included in the architecture from the beginning, then most of the team don't need to know the details. That's the idea, in fact: creating code to satisfy functional requirements without worrying about non-functional requirements. –  mgroves Apr 11 '12 at 11:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.