The Source for Java Technology Collaboration
User: Password:



Bruce Tate

Bruce Tate's Blog

Spring and the English Archer

Posted by batate on July 30, 2004 at 02:55 AM | Comments (9)

2004 is a year of revelation for me. Better, Faster, Lighter Java was a fun book to write, and I learned tremendously in writing it. A closer involvement in the Spring project, and in the Java persistence community, also led to similar discoveries for me. It’s humbling to evolve my thought process in this very public forum, and thanks for sharing the ride. In this blog, I’m going to ramble a little bit. I’d like to draw some analogies to what I think is going on right now in the Java community.

In recent days, I've been reading Bernard Cornwell's Archer series. It's a book on historical fiction. I've read with some fascination the impact of the English archer on the battlefields in the 100 years wars. The bows were 6 feet long, and they took 100 pounds of pressure to draw. To wield such an incredible weapon, archers trained from childhood. The arrows were three feet long, and exerted enough force to pierce the thickest plate armor. They had great range. While they couldn’t fire as far as a crossbow, six to seven arrows could be fired for every one crossbow bolt.

No one seems to know why the English were able to employ archers on the battlefield in such great numbers, while other countries were unable to leverage this weapon. We just know that it changed battlefields, and in some ways, the course of history itself. Of course, we’ve come to call tools like this one disruptive technologies.

Throughout history, we’ve seen many different disruptive technologies: the printing press, cars, trains and computers. If you look at this industry, we’ve also seen other disruptive technologies: personal computers, the Internet, Windows and Java all changed the way that we use computers in fundamental ways. On a smaller scale, some programming paradigms are also disruptive. I believe that new programming models emerge because the old ways aren’t powerful enough anymore.

Think about a typical problem these days. Many of us try to build an application, with a user interface that can work on most of the computers in the world, and communicate with thousands of disparate computers, all in seconds. We tie these seamlessly to databases or other resource tiers, and can even do distributed transactions between them. But that’s not enough. As the programming problems get more complex (and they are), we continue to need to raise the bar. I think that we’re going to see aspect oriented programming in the main stream. It will probably not happen as soon as some expect, and it may prompt a completely new language from an unexpected source, but when it happens, it will be pervasive. In other cases, disruptive revolution comes from what you do, rather than what you use.

As an extreme sports adventurer, I can relate. When we learned to run waterfalls with more speed and at an angle, the ski jump, and later the boof move, was born. These moves let kayakers separate themselves from the vertical water of a large waterfall, and at the same time, dangerous hydraulics below such beasts. We could then run much more extreme rapids with less effort, danger and skill. As a result of these techniques and those like them, the popularity of the sport is exploding. As a weekend extremist, I’ve run a waterfall that were considered unrunnable just fifteen years ago. It was the technique, more than the kayaks, that changed, but new kayaks emerged to take better advantage, much like AOP is growing and maturing without an ideal language.

Dependency injection is leading to such a disruptive revolution. I think it’s leveling the playing field between smaller open source teams and the big J2EE vendor, such that open source projects like Spring can compete and in many ways, surpass, the software that’s coming out of the big container vendors. Spring, which already lets you do declarative transactions with objects that can be deployed outside of the container, just announced support for JMS, and will follow quickly with support of JMX. They’re integrating AspectJ. But what’s amazing to me is that Spring is still very clean and modular.

Dependency injection is disruptive because it’s simple, and it brings elegance and clarity to a design without oversimplifying an application. This weapon, though, does not need training from childhood. It requires a little restructuring of what you already know, and a whole lot of common sense. From clarity and simplicity comes better structure. From better structure comes taller towers, in the form of applications with more power and flexibility than we’ve been able to achieve in other ways. This much is clear to me now.

I see Spring as perhaps the fundamental driver behind dependency injection (it’s the lightweight container with the broadest market acceptance and momentum). In an earlier blog, I also mentioned that Spring is a good way to introduce AOP into the mainstream in a safer, more limited way. That’s why you’re seeing me bet more and more of my career on it. It’s disruptive. It gives me more leverage and power than I’ve ever had before.


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

  • Are they really disruptive, or just better ways of doing what we've already done before? Bruce, I really respect your opinions, but seriously: Is Spring addressing a new problem? Is AOP addressing a new problem? Are either revolutionary? I admit that I'm a neophyte, but Spring just seems to be a better way of implementing applications that can be implemented with the existing J2EE infrastructure. AOP just seems to be a way to do things that currently requires updating several files and recompiling (take the logging examples: logging isn't better, it's just easier to apply). Perhaps these techologies are a magnitude easier to use, and that's what causes the disruption, but I don't see that yet. I just see Spring as being less expensive to procure, with a much easier learning curve, and easier to maintain. A great advancement, but not disruptive. To my way of thinking, Web Services, Service Oriented Architectures, Business Process and Rules Engines for the masses are going to impact my life (as a developer) more. Then again, I sure wouldn't want to be in arrow range of one of those English archers ;-)

    Posted by: johnreynolds on July 30, 2004 at 05:43 AM

  • That's the question, isn't it? It's not the services themselves that make Spring disruptive. It's the way that you package and consume the services. Dependency injection gives me a way to manage dependency wile coupling in configuration rather than code. AOP allows me to consume services like declarative transactions without the benefit of a cumbersome, awkward container. Layer on inversion of control concepts, like the way Spring manages JDBC and exceptions, and you get something that's incredibly modular, and incredibly powerful. Look at the speed at which it's evolving. It's not the service (declarative transactions) that's new. It's the model that lets you package and consume them that's new (decoupled declarative actions on a pojo, indepenent of the container). Is Spring disruptive? I'll grant you, it's tough to tell exactly where the secret sauce is located. AOP? Dependency injection? Inversion of control (not the same thing)? Pragmatic interfaces and decisions? A whole lot of people will argue "no", but I'm increasingly betting my career on it.

    Posted by: batate on July 30, 2004 at 05:55 AM

  • Does AOP solve a new problem? Did the English longbow solve a new problem? No, it just solved an old problem really well. So, I'd argue that Bruce's use of metaphor is excellent. Spring solves a problem ("how to access services") in a dramatically better way than in the past. Similarly, AOP does not radically change the nature of programing. Anything you can do with AOP, you could do with OOP, just as anything that you could do with OOP, you could do with a structured program. Again, like the English archer, it merely does it better than the alternatives. Better in this case means "with better modularity, clearer (big picture) design, and less code" (Incidentally, logging is a thin example of an AOP's power. I urge you to check out http://newaspects.com/presentations/ for some richer examples.)

    Posted by: ndlesiecki on July 31, 2004 at 10:00 AM

  • It's best to program to interfaces, rather than classes. Which to me seems to be the big idea in Spring. Look at their mission statement on their website. It's hardly a new idea. So its just a case of people at last doing what they have always known they should do. Its not exactly hard to be better than J2EE. That was driven by politics, not technology. Its just sad so many people have wasted five years of their life using J2EE. So if anything is disruptive its people finally being honest about how bad J2EE is.

    Posted by: c_armstrong on August 01, 2004 at 11:32 PM

  • Why the English were so successful You asked why they were so successful at deploying in numbers...The reason was that Archery practice was mandatory. It was law that every male upto 30 had to attend archery practice on Sunday. So with that said, perhaps the answer for us is to change the law!

    Posted by: sxdavies on August 02, 2004 at 01:11 AM

  • Disruptive If you can gain flexibility, consistency and power by deleting code, I'd say you have a disruptive technology. Disruptive to those with interests in keeping things complex, and to businesses who can make investments in other areas (If I don't need those expensive tools, more money for R&D).

    Posted by: d_bleyl on August 02, 2004 at 03:59 AM

  • Look at their mission statement on their website. It's hardly a new idea. So its just a case of people at last doing what they have always known they should do uk phone cards. Its not exactly hard to be better than J2EE. That was driven by politics, not technology. Its just sad so many people have wasted five years of their life using J2EE. So if anything is disruptive its people finally being honest about how bad J2EE is.

    Posted by: actane on September 04, 2007 at 11:23 AM

  • It's a really good store about AOP and JMX technologies, nice stuff! I'll try to implement this in my Free Chess Download website.

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





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