• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AOP refactoring article posted at TSS

 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For those who have given up on TSS and don't even read the articles/news there anymore, here's a link that some of you might be interested in:
Aspect-Oriented Refactoring (Part 1)
 
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a good article. Somewhere in the discussions on the article AOP was refered to as another design approach. Is it really ?
[ December 10, 2003: Message edited by: HS Thomas ]
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by HS Thomas:
Somewhere in the discussions on the article AOP was refered to as another design approach. Is it really ?

Sure it is. Ripping out logic into a separate island called an aspect is definitely a design decision.
 
Ranch Hand
Posts: 1376
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AOP is an even more extreme version of XP, in many ways. Aspects deal primarily with system-wide functions such as logging and persistence, and allow you to write your core business logic without worrying about these things. Given XP's mantra of "don't worry about it until you need it", AOP is a perfect fit. You can add logging, for example, to your entire application after the fact, completely non-invasively. You need an AOP aware language such as AspectJ, but it's got some really interesting ramifications.
On the other hand, my guess is that AOP doesn't fit in particularly with test-driven software, since an aspected class doesn't know it's aspected, so I can't imagine how you would know to unit test the externally aspected characteristics of a class.
Joe
 
Joe Pluta
Ranch Hand
Posts: 1376
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:
Sure it is. Ripping out logic into a separate island called an aspect is definitely a design decision.


Actually, the idea behind AOP is not about "ripping out" logic, but rather about never entangling crosscutting concerns into your core concerns in the first place. The idea is that there is an entire class of code function that really stands outside the realm of the business logic, and those functions should not even be part of the design.
I don't know that I buy the entire argument, and it seems that there is a relatively limited scope for this sort of thing. Only so many functions crosscut an entire application; once you get past logging, security and persistence, I'm not sure what else there is.
Joe
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joe Pluta:
You can add logging, for example, to your entire application after the fact, completely non-invasively. You need an AOP aware language such as AspectJ, but it's got some really interesting ramifications.
On the other hand, my guess is that AOP doesn't fit in particularly with test-driven software, since an aspected class doesn't know it's aspected, so I can't imagine how you would know to unit test the externally aspected characteristics of a class.
Joe


One would expect to only test aspects in Systems Testing or Integration Testing. But if persistence is treated as aspects you certainly would want to do it earlier. You'd have to!
reply
    Bookmark Topic Watch Topic
  • New Topic