The Source for Java Technology Collaboration
User: Password:



Bruce Tate

Bruce Tate's Blog

Time, wisdom and AOP

Posted by batate on October 13, 2004 at 01:27 PM | Comments (7)

I'm teaching a programming symposium on most weekends called nofluffjuststuff. I've had the opportunity to attend some excellent classes by my peers. One of my favorite was given by Nicholas Lesiecki, on using AOP in main stream projects. He contends that AOP is here, ready for prime-time today. He provided some persuasive examples of how his team used AOP in real-world projects to solve crosscutting problems. (If you ever get the chance to hear him speak, I'd recommend it.) I've long said that we're not ready as an industry to move to AOP, and others share that view. Why the disconnect?

In another session, Dave Thomas (Pragmatic Dave) spoke about the learning patterns of programmers as they make the journey from novice to expert. I won't give away the talk, but the gist is that as we grow as developers, we learn in different ways, and progress from thinking in steps to thinking abstractly. We can increasingly put experience in context, and use the experience of others. I agree with this premise.

Here's my leap of insight. I think that we, as an industry, need to move through a very similar progression before we move on to a new programming paradigm. I think that we need to build that collective wisdom that only time and experience can bring. Sure, we need to succeed, and fly high. But we also need to crash a few times, and have the time to collectively pick through the wreckage and understand what's gone wrong. We need to establish how far we can push AOP (like we needed to learn how far to push inheritance.) We need to understand what constructs work (like programming to interfaces) and those that might not (like intercepting property accesses, or introductions, or advising an aspect.) How do we package? How will an approach hold up over time? How easy is it to maintain? How do we have a visual clue that something is advised? Do we need a clue?

Here's the thing. We've got 40 years of history to study the emergence of new paradigms. We can look in the rear view mirror and understand the same process for object technology, or structured programming, or high level languages. From a distance, it always looks like we move forward in surges, and stay stagnent for decades. It's not really that way, though. If you take a closer look, you can see the individual tiny little surges when we try slices of a new paradigm before we actually get it right. For example, a few people succeeded with SmallTalk, but the mainstream could not make it work. We were never able to make it succeed on a broader scale, maybe because it was too alien, and maybe because it was too tightly coupled to the smalltalk environments. But others tried to make objects fly in limited ways, like Ada and encapsulation, or like COM components and aggregation. It finally took an adaptation of a procedural language, C to C++, to give us a safe environment. C++ was safe because you could write oo code, and retreat to procedural code when you needed to. Sure, most of us wound up writing procedural code, but with the combined experience and community, we were finally ready for objects when Java burst onto the scene.

So my premise is that we need to look for ways to use AOP with training wheels. We'll see limited techniques that simulate AOP behavior, like interceptors. We'll see frameworks that let you configure prepackaged AOP services, like Spring. With technologies like these, we'll be able to use limited AOP power, and get some limited benefit. All of this time, we can more safely collect the wisdom that will make it possible to push AOP from small, expert-laden successful projects to the mainstream.

It's all about collecting wisdom.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Concrete before Abstract: In my experience, OO did not gell until I had concrete examples to work from. Once OO made things easier for me in a specific instance, I was able to make the leap and understand how it would help me elsewhere. I think that's what AOP needs.

    A few months back I heard Marc Fleury's AOP speel... It "works" because he focuses on how AOP can simplify and decouple the current J2EE monster. When AOP successfully slays that beast, it may lead the way to wider adoption.

    Posted by: johnreynolds on October 14, 2004 at 08:52 AM

  • I think I am feeling the same way Nicholas is feeling about AOP and some time ago I have said it loadly.

    Posted by: the_mindstorm on October 14, 2004 at 09:39 AM

  • As a guy who's gotten tremendous impact from better technology, I agree with much of what you're saying. But doesn't it make more sense for they guys writing the pay checks to try to temper the risk/reward curve somewhat? Less reward, but with significantly less risk? Why not bolt on those training wheels, and slowly move them up over time? I do think that the potential rewards for AOP are significant. I also think that the risk profile is fairly high, especially at this stage.

    Posted by: batate on October 14, 2004 at 10:12 AM

  • I don't think that everyone will get AOP or use it in the mainstream (beyond tracing/logging etc). AspectJ has been around for a long time and I remember a colleague talking about it a couple of years ago. It's only recently that I've understood the significance and how to use AOP effectively. I think it's fantastic in helping to simplify code, enforce consistent policies and mechanisms for transactions, security etc. But I do think that the risks are stacked up - for example how many of us remember the 'inheritance' mantra when OO hit the mainstream such as "if A it isn't derived from B then it isn't a proper object model.." we've all suffered from misuse - as always it's great to be able to explore a 'sane subset' of the technology without getting burnt. I would like to do more than 'AOP with training wheels' though - I always found training wheels were a pain. 'Controlled accidents' were often more formative

    Posted by: ndwyer on October 18, 2004 at 05:02 AM

  • It's "Smalltalk". Big S, small T. Smalltalk.

    Posted by: don8201 on October 21, 2004 at 07:25 AM

  • It's an interesting reading this 3 years old stuff! :) I've just used this free online auction and PPC management services company website and it looks really great using AOP technologies.

    Posted by: adelante on October 02, 2007 at 02:39 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds