You Down with AOP?
Ive long been interested in the concept of aspect-oriented programming, so I checked in with one of the guys known for his involvement in the creation of the technology, Gregor Kiczales.
Kiczales is now on the faculty at the University of British Columbia but was a leader in creating AOP during his time at the Xerox Palo Alto Research Center and presenting the technology to the world in the mid- to late-90s.
I get a charge out of talking with the "fathers" of key technologies and languagessuch as James Gosling (Java), Kiczales, Bjarne Stroustrup (C++), Anders Hejlsberg (Turbo Pascal, C#) and Grady Booch (Unified Modeling Language). In short, I love it. Kiczales, like the rest of those mentioned, is driven by the notion of empowering developers because they are developers and can envision what can be done with better tools and techniques.
Read eWEEKs interview with Suns James Gosling here.
AOP builds on the concept of object-oriented programming and introduces the concept of aspects. Kiczales describes an aspect as "a particular kind of part that has this notion of cross-cutting behavior. And the way to think about cross-cutting is it means that it affects lots of the systems activities."
According to the folks at Interface21, the maintainer of the open-source Spring Framework, which employs AOP technology, aspects enable modularization of concerns such as transaction management that cut across multiple types and objects.
Kiczales said increasing system complexity spurred the creation of a language to make things simpler.
"If you look at enterprise Javawhere its the first place that aspects are getting a lot of applicationits exactly because the people making those kinds of systems are aiming to make various things pluggable," he said. "Like they want to make security pluggable. And by pluggable, I mean you want to be able to swap different ones in and out. They want to make persistence pluggable; they want to make logging pluggable. And those are just classic aspects."
Kiczales noted that Java seemed like a natural place to inject AOP. "Since there was no legacy Java code, we felt people would be open to new ideas," he said.
However, AOP is not for the squeamish. The technology is very "powerful," Kiczales admits.
According to a Wikipedia entry on AOP, "Given the power of AOP, if a programmer makes a logical mistake in expressing crosscutting, it can lead to widespread program failure."
In a 2004 interview with eWEEK, Gosling compared putting AOP into the wrong developers hands to giving razor blades to children or giving folks chainsaws without instructions.
Moreover, Kiczales said the tooling and support for AOP is much improved and success stories of uses of the technology have multiplied. Adoption of AOP is picking up and moving at a rate faster than OOP even, he said.
To read Darryl Tafts interview with Gregor Kiczales, click here.
Spring and JBoss both employ AOP, and there are flavors of AOP for practically all the popular programming languages. But its still for the serious programmer.
"We dont yet know how to teach AOP to the less technically sophisticated people," Kiczales said.
The promise of the technology still looms large.
"With AOP you can take one of these cross-cutting concerns that cut across the structure of your system and make it into a modulean easy-to-identify partthat you can pull out and put back in," Kiczales said. "And that has tons of implications; it has product and architecture implications."
Check out eWEEK.coms for the latest news, reviews and analysis in programming environments and developer tools.