Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
AOP Technology Update
A framework comparison and internals tour

Aspect-Oriented Programming (AOP) is undeniably one of the coolest things to happen in the software technology in a long time. AOP has been called the "third dimension of programming" (copyright by Frank Sauer, Technical Resource Connection, Inc.) and has tremendous power in dynamically inserting logic into pre-existing programs. It can help solve some of the key problems (technology gaps, so to speak) still facing IT organizations. More specifically, AOP is now beginning to bridge the gap in three areas of software technology:

  1. Separation of concerns - so developers can focus on the business logic they need to design, implement, and test.
  2. Making IDE-type tooling simpler and more standards-based (e.g., for Model-Driven Architectures, code-generation, deployment artifacts-generation, etc.).
  3. Runtime management of software systems - including profiling, auditing, and trouble-shooting.
The purpose of this article is to give the reader an understanding of the various AOP technologies available today and put AOP in perspective so it's judiciously used. But first let me give you a brief overview of AOP and AOP terminology. The source code for this article can be downloaded from www.jdj.sys-con.com.

AOP Overview and Terminology
OOP took the first step toward separating concerns in letting software designers compartmentalize their code - both logically and physically. OOP also supports polymorphism so designers can generalize their code in such a way that functionality can be applied (and hence reused) to various sub-types without knowing in advance which specific sub-type is being used. This aids developers in designing more extensible and manageable software, making their code more reusable.

AOP takes this concept a step further and lets this separation of concerns be applied easily to a class of functions that tend to permeate a software system; examples are logging, security, transactions, exception handling, and monitoring. These are examples of what we call crosscutting concerns, and they tend to be extremely critical to the success of a software system - especially over its lifetime. Yet, until AOP came on the scene, these crosscutting concerns caused enormous inefficiencies, inconsistencies, and bugs, and as a result, these systems typically fell short of expectations on quality, manageability, and extensibility.

AOP technology introduces several new terms to our software technology vocabulary. In essence, it allows completely independent Java methods (advice) to intercede transparently and be executed while running pre-existing Java application code - at well-defined points called join points. Examples of join points are before and after method calls, or when a particular object is instantiated, or when a particular member variable is referenced. The way developers specify which join points are relevant is via a pointcut expression that refers to one or more join points in a particular software system or subsystem. A pointcut could, for example, apply to a collection of Java classes in a directory hierarchy, a JAR, or an EAR, and the expression typically takes advantage of your class naming conventions and uses a regular-expression-like syntax. Finally, an aspect is a more general term referring to one or more related advice functions. An aspect can then also serve as a focal point for specifying the pointcut(s) that relate to the aspect. What follows are some commonly used AOP terms:

Join point: a well-defined point in programs where AOP functions (advice) can intercede and affect execution

Advice: the action taken by the AOP framework at a particular join point. This functionality (implemented via a Java method) will transparently intercede and be executed while executing your Java application code. Examples of different types of advice are: before, after, and around

Aspect: a general term referring to a collection of one or more related advice methods, typically implemented in a single Java class, and class, and potentially accepting join point context information as a parameter to those advice methods

Pointcut: the expression that specifies which join points will be affected by one or more aspects

Introductions: a more intrusive type of intercession that modifies the structure/type of your (Java application) classes, for example, by implementing a new interface or adding a new member variable

Mixin: a mixin refers to adding new class(es) to a pre-existing class

Weaving: the application/activation of an advice across one or more pointcuts so that the advice will be executed when the join points are encountered

Target: the application object being advised (affected by the aspects) at any point in time

Interceptor: an aspect with only one advice method named "invoke"

AOP Use-Cases
Now let's briefly consider some typical use-cases for AOP. Candidate functionality would be any horizontal/crosscutting type functionality (required across multiple applications and multiple subsystems) that architects and/or application developers are often faced with implementing. Some common examples are:

  1. Logging, tracing, auditing
  2. Security authentication and authorization
  3. Rules engine
  4. Testing and test-harness support
  5. Persistence and O/R mapping
  6. Caching: caches objects transparently to the application developer
  7. Transactions support
  8. Synchronization and thread safety
  9. Exception handling
As you can imagine, implementing these kinds of system-wide features once, perhaps in a single class or subsystem, would have tremendous ROI and cost-savings benefits for IT organizations. It should be noted here that the application infrastructure (middleware) addresses many of the crosscutting requirements listed above; however, some of them are only partially addressed by middleware (e.g., one example is testing), and standards-based middleware is currently largely API-driven.
About Patrick Fendt
Patrick Fendt lives in Atlanta and spent the first 7 years of his career designing and developing high-performance middleware at IBM, Scientific Software, and S2 Systems. He then served as the lead architect for several major 3-tier/N-tier architecture initiatives - for companies such as Fidelity Investments and S1 Technologies. Patrick has been in the technical/pre-sales organization at BEA for over 6 years - serving in various roles.
Patrick graduated with honors from Georgia Institute of Technology with a B.S. in Computer Science

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Latest Cloud Developer Stories
Citrix has opened up a beta of its CloudStack 3, the first release of the open source cloud platform under the Citrix brand. Citrix acquired the Java-based cloud management last year when it bought Cloud.com. A full production version of the branded stuff is supposed to be avai...
EMC and VMware are going into the cloud business with Atos, the big, publicly owned, Paris-based global IT services firm, intending to take an equity position in Canopy, an end-to-end cloud company Atos is setting up using EMC and VMware technology. The companies said Wednesday...
A Tel Aviv start-up called Porticor that’s just hit the radar says it’s got a way to secure the cloud, any cloud. Fancy that, a trustworthy cloud. And Porticor delivers its data encryption solution to IaaS and PaaS users through the cloud in minutes. Fancy that. It’s supposed...
Rackspace Hosting, the service leader in cloud computing, on Thursday announced its acquisition of SharePoint911, an industry leader in SharePoint consulting, training, and "JumpStart" services within SharePoint. The unification of both companies provides capabilities to deliver ...
"The volume of data we're generating now from machines pales in comparison to the volume of data we'll soon generate from our own bodies," says data security expert Dave Asprey. Writing in a Trend Micro blog, Asprey - who is one of the leaders in the emerging Quantified Self move...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE

Breaking Cloud Computing News
Cut the Rope, the worldwide phenomenon created by global gaming and entertainment company ZeptoLab, ...