Ready or Not, Here Comes AOP

The case for aspect oriented programming (AOP) has been making headway for some time now, largely behind the lead of IT giant IBM , which has been working closely with the open source Eclipse Project on several tools to make the next-generation technology a reality.

That’s not to say it’s ready for mainstream use. Because the tools are
still relatively immature, you won’t see an AOP 101 class for computer science undergrads taught anytime soon.

But experts say the promise of AOP is considerable, especially when compared with today’s leading
programming methodology: object-oriented programming . Brian Barry, Ph.D, technology project management committee lead for Eclipse Foundation,
Eclipses emerging technologies arm, said it is one of the more significant
new developments in programming. And, he added, it offers benefits that are near and dear to every CIO’s heart: cost savings, faster time to market and better maintainability.

“In terms of just how big a deal AOP will be, I think the jury is still out,” he said in an e-mail interview. “But it certainly offers a lot of
tantalizing evidence that something pretty interesting is going on. AOP
offers a modularity mechanism that is orthogonal to the OO mechanisms —
encapsulation and inheritance — which, in some cases works remarkably well
and results in significant code reduction, like 10 times or more, in the
same way the OO mechanism reduces code bulk when compared with procedural
code.”

Last month, IBM made a big push for tools within the Eclipse Project that
implement AOP-powered applications. The first release candidate for AspectJ
1.2 was launched April 15, and AspectJ Development Tools (AJDT) 1.1.8 for
Eclipse 3.0M8 came out April 21.

The tools were demonstrated at the Aspect-Oriented Software Development
(AOSD) organization’s conference in March, and the technology will surely be
mentioned at TheServerSide Java Symposium’s AOP keynote panel in Las Vegas, which kicked off this week.

AspectJ is one of several AOP frameworks leading the Java community’s
efforts around the technology. Originally created at the Palo Alto Research
Center (PARC) labs, the code and
authority were transferred
to the Eclipse Project in March 2003.

Other Java-based technologies include Hyper/J, JBoss-AOP, AspectWerkz and
Nanning. Microsoft’s .NET implementations include
AspectC++ and LOOM.NET.

All provide form for the rather simple concept behind AOP, which is to help developers build or reassemble applications that deal with aspects of a problem, not objects.

For example, placing security-handling features (called
concerns) in one module and letting objects access the security features makes good programming sense when dealing with complex applications like Web services. Rather than going through every line of code and trying
to parse out only the code snippets handling security, you can go to the
security-handling component and change it once, affecting all.

“The concept is simple enough for my 5-year-old,” IBM researcher Bill Chung
told internetnews.com. “Basically, it’s a matter of taking things
apart and putting them back together.”

But the devil, as they say, is in the details. AOP is frustratingly hard to master and so far has been limited to developers with the know-how to work
around the limitations of tools like AspectJ.

Juri Memmert, an independent software consultant out of Dusseldorf, Germany,
has been using Hyper/J for nearly four years and said AOP needs more time to evolve, even though he uses the tools regularly on his projects. He offered a cautionary tale about the release of public tools that, he said, could have the same effect as the introduction of a now-popular programming language C++ years ago.

“Depending on which tool you choose, you could get into trouble. Releasing
it to the public and having tens of thousands of programmers just adopt it
without thought, that is a problem,” he told internetnews.com. “It’s
akin to the release of C++ — you had some nice new ideas and nice new
functions and all these people started using it, and most of them crashed in
the beginning.”

But like the early days of C++, when experienced developers were on hand to correct problems, he said AOP is a safe tool for first timers if there is an experienced programmer to mentor them on the language.

Eclipse’s Barry, however, thinks the tool is ready for real-world use.

“The programming tools like AspectJ and AspectWerkz are coming along very
fast, and really are good enough to try on substantial problems,” Barry
said. “The fact that IBM has stepped up to take major responsibility for
AspectJ tools through [Eclipse] is pretty significant. It’s not COBOL , but
neither is it some fly-by-night research language, either.”

Officials at IBM said AspectJ is at about the 80 percent to 90 percent level of maturity.

But one analyst thinks more work awaits before the
technology hits prime time.

“It is immature; it has a very steep learning curve and there’s a lot of
subtlety you have to understand about the abstraction process and
abstracting your components,” said Rikki Kirzner, a senior analyst for
application development and deployment at research firm IDC. “Developers
have been reluctant to create components because there’s too much one-off
stuff. By the time the programmer figures out what he’s got to change, it
would probably be better if he rewrote the whole thing himself.”

That’s not to say she’s bearish on the technology; Kirzner said AOP is
particularly suited for Web services development.

“The principle behind it is cool, because reuse of software [and]
componentization is really the wave of how you’re going to achieve Web
services,” she said. “If you can’t componentize, you’re not going to be
able to get a Web service created.”

So IBM has been pushing another Eclipse project, called the Concern
Manipulation Environment (CME), which went into a public beta April 8. The
CME is considered a stepping-stone to the straight-out alternative of diving
into the code, looking for similar concerns, and building a component from
there.

CME is an integrated development environment
that works on any Java platform,
and lets AOP programmers identify, encapsulate, extract and compose
individual concerns into one module. Currently, IBM officials say, the CME is only about 50 percent mature and the Eclipse project’s Web site states it
will only extract concern modules into AspectJ and Hyper/J.

But even non-programmers are able to run their Java application through the CME to identify and encapsulate the different concerns scattered throughout the program. It’s only at the extraction and composition stage where an AOP tool is needed.

Given the buzz surrounding AOP, Memmert expects the technology to mature enough within the next year that it would encourage widespread adoption.

“I don’t think this will take overly long, given the state of the AspectJ
platform and the plug-ins in various environments,” he said. “It shouldn’t
be too long before people can use it without really having too much
knowledge of what’s going on behind the scenes.”

Get the Free Newsletter!

Subscribe to our newsletter.

Subscribe to Daily Tech Insider for top news, trends & analysis

News Around the Web