ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Introduction to Aspect-Oriented Programming
Subject:   Resistance
Date:   2006-03-12 23:10:11
From:   Deus-ex-machina
One thing I won't understand ever, or maybe until I'm a bit older, is why in all articles about AOP all through the 'net, I always find there's some form of resistance and opression.


In my firm, there are some old guys that would like to see OOP altogether drop dead and work in procedural languages. My coleague, which is on the other hand very open-minded and realizes the benefits of for example code-generation and even aspect programming, he still gives out resistance when I talk for example about language oriented programming.


This long intro serves to shout out the message: this technologies do not exist to complicate your life. Sure they will badly if you missuse them! But they're there to help us, and people who invent them surely did that because they felt they needed some specific way to generalize solutions for certain problems. We do that all the time, on the code level with class abstractions, or frameworks. Some of us just go further.


Aspects should be treated with respect, and we should find ways to improve our code with using them, not go to extremes and then blame the technology.


I personally use aspects through Spring framework which does dynamic weaving, and it works very good for the purpose I chosed it: it separates all my heavy logging out from the bussines code. I find it very appropriate for such tasks, and I will continue using it for this solely purpose, until I get more comfortable with it. Just as I had to learn to find out class responsibility, I'll have to learn to find out crosscuting concerns.


In my eyes, its just one step forward.