Sat 3 Jun 2006
Just over two and half years ago I embarked upon a large-ish Java-based ecommerce project and was pretty much pushed into Struts as the presentation layer. Struts was well known. Struts was not beta code. People on the team were skilled in Struts. The Struts community was large. So, Struts it was. Also, we needed a way to break up the web pages into manageable smaller chunks, so Tiles was the natural choice. Struts and Tiles. Tiles and Struts. Struts, Struts, Struts, Struts, Strutssss…….enough already, let’s do Struts.
I never liked Struts! I can’t put my finger on it, but I was always working around it, never with it. Another sure indicator for me was that I never really wanted to learn it. Sure, I read stuff, but only when I had a problem to fix. Typically with things you like, you do the tutorials and you enjoy them. You then read around edges, check out the news groups and blogs, gauge the community feeling, and generally dig deeper because want to learn more. So I can pretty much say for certain that Struts didn’t do it for me. Struts and I were never friends!
Now, half way through this ecommerce project we get a new web dev who says, “Why are we using this crap (tiles)? Have you not heard of sitemesh, tapestry or webwork?”. Too deeply entrenched in Struts (and boy does it lead you down a yellow brick road to hell) we couldn’t act on the web dev’s advice. (He is still miffed about doing Struts to this day!)
I have since left that project and started another web-based project. I decided to put my old web dev’s recommendations to the test. I went with WebWork and SiteMesh. Enlightenment. I cannot tell you what a joy it is to work with these two web-based technologies from opensymphony. It as though they have not only kept things simple but have provided a tool box thats enable those people that need to do complicated things. And right there IS big difference for me between WebWork and Struts. WebWork is a framework that acts as a tool box that you use to build web sites. You can start small and get bigger. Use this tool, that tool and/or somebody elses tool. The integration with other techologies (Hibernate, Spring, Freemarket, Velocity, Sitemesh, yada, yada, yada) is smooth. Struts, in comparison, is large and clunky. Sorry, but that’s just the way it is. It’s as though from day one you step into ring with Struts and fight until someone, typically Struts, is the winner.
I am not going to go into the details of WebWork and SiteMesh, except to say if you are a Struts and Tiles web developer, you must, absolutely must, no questions asked, try them out. Take off your Struts boxing gloves and try something new. It took me 2 days to grasp the basics of WebWork. In that time I implemented a web site that provided most of the horizontal services that I need in place such as securing uris, logging, timing requests and handling dumb ass users that double-click hyperlinks (why, o why do users do this?) and any unnecessary use of the back button. I’m still impressed.
However, things are changing. Damn, just when you find what you need…stuff happens!
Struts and WebWork are merging. It’s not surprising given WebWork is the superior implementation and Struts has the larger community. The new product is called Struts 2.0. I sincerely hope that the name is more politics and that the product is more like a WebWork 3.0…