advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
AOP Sample Code
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Aspect- vs. Object-Oriented Programming: Which Technique, When?

Aspect-oriented programming claims to address problems that traditional object-oriented programming doesn't completely or directly solve. Find out how true that claim is with a line-by-line comparison of the two techniques. 


advertisement
ike most developers, I have been developing software systems using object-oriented programming (OOP) techniques for many years. So when I read that aspect-oriented programming (AOP) addresses many problems that traditional OOP doesn't solve completely or directly, I wanted to better understand its benefits in real world application development. I thought comparing both techniques would provide some practical insight. So I decided to design a case study: an OOP application in which I identified aspects where AOP might be a good fit.

This article presents a similar case study. It begins by introducing a problem domain and then demonstrates two solutions: one that uses OOP and one using AOP. The AOP solution uses a JDK 1.5, JUnit, and AspectWerkz implementation. (The complete source code for both approaches is available in the "Download the Code" section in the left-hand column.) Finally, it demonstrates how to code a few aspects.


It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement