What is Web 2.0 is still the article that most people read on O’Reilly’s Website , week on week. I’d like to think that in some small way it’s because we linked to it. And , in the networking / linking world of Web 2.0 , that’s probably true.
A while back I wrote an article for an O’Reilly sister site, Java.net , on Sprinkle Some Ajax Magic into your Struts Web Application. I’m going to repeat one thing I said in this article: while coding Ajax is cool, you really want to use a framework if you have the choice. If you don’t believe me , check out some of the podcasts on Ajaxian.com. When you listen to the problems that the frameworks have overcome (What if the ActiveX XmlHttpRequest Object is turned off? What if you want to do local storage? What if the user hits the back button?), you’ll be a convert to the ‘Frameworks are better’ approach. So which Ajax enabled framework should you use as an Enterprise Java developer?
Pre Ajax, the answer to ‘which Java presentation framework should I use?’ would have been Apache Struts. Not because it was technically better than any of the other frameworks (although feel free to leave your comment!) but because everybody else is using it. This meant
(a) using Struts is good for your client, as they can replace you if you get run over by a bus and
(b) using Struts is good for you, as you can take your Struts skills to your next piece of work.
With this in mind, I did some research on the Ajax Enabled Java frameworks that are currently (Feb 06) available. I tried to pick out the best ones (best for your career, and hopefully technically best) based on the following criteria:
- Java – Web development frameworks with Ajax capability.
- Rating based on technical capabilites, and which is most likely to be the ‘next Struts’ (i.e. become the defacto standard for Java-Web Development).
- Rating is based partly on downloading and running the projects and partly on evaluation of what the websites / other people say.
- Products must be available (at least partly) in open source form with a recognised open source licence – as these are most likely to get community traction.
Before we get into the list, there a couple of items that you may think are missing:
- Whatever you may think of non-Java frameworks (e.g. Ruby on Rails, PHP with Ajax), these are not included here. The notion of Java being replaced by Language / Framework ‘X’ is an entirely different article.
- The list also does not include several excellent ‘server neutral’ frameworks such as BackBase, Dojo, Prototype, or JSON. While these frameworks are included with some of the toolsets listed below, we’re aiming to get an ‘out of the box’ toolkit for the Web tier of Enterprise Java applications.
- You’ll also probably note that there are 3 implementations of the Java Server Faces (JSF) standard on this list – MyFaces , Ajax JSF and Struts (Shale).
Think we got the evaluation wrong? Leave your comments at the bottom of this post.
Ajax Java Web Presentation Frameworks
|AjaxAnywhere||Independent of Java framework (e.g. Struts, JSF or Spring). Closest in approach to Java.net Struts-Ajax Article. Good interim solution based on existing frameworks, but can’t see this being the main framework long term.|
|Apache Myfaces||Apache implementation of JSF, including technology donated by Oracle from ADF / Oracle Fusion. Being Apache, will become one of the main JSF implementations in use. But is JSF the best way of doing your website?|
|App Fuse||combines a lot of the leading frameworks (Struts, Dwr, Spring with JSF as an option) into one easy to use package. Already a very good ready to go package (for web , mid and business tiers) and the Appfuse team have a good track record in integrating the latest, most widely used frameworks.|
|Ajax JSF||Ajax implementation of the Java Server Faces Specification. Good indication of what a full JSF Ajax implemention would be like, but implemented by only one brave developer!|
|Echo 2||Evolution of original Echo Framework, can run in any Servlet container. Original has cult following, but doubt if it will become the number 1 web framework.|
|JSP Controls||Aims to be drop in (Ajax enabled) replacement for JSP Tags. Can be used both with simple JSP and other frameworks, but at the time of writing has less than 1000 downloads|
|JWIC||Dynamically add Ajax to Java class based application – similar to Velocity concepts. A good simple framework, based on POJO’s but doesn’t (yet) seem to have much traction on sourceforge.|
|Struts||The original, and to many, still the best. Many changes are afoot in the next version, including the integation with WebWork (which already has Ajax capabilities) and the move to the JSF compatible (‘Shale’) Struts aims to be backwards compatible, and the forthcoming JSF and Ajax capabilities look good. Pity there is no ‘offical’ milestone release yet.|
|Struts Layout||Struts Tags, but with Ajax capabilities. Another good interim solution based on Struts, but is the Struts Event model suited for the Ajax world? (e.g. multiple events being raised from the ajax web page, instead of just the one (GET or POST) in the standard HTML model)|
|Swato||Integration with Java Servlets through use of Servlet filters.Not a lot of documentation, nor a demo to encourage me to invest more time in it.|
|Tacos||aimed at providing Ajax for Tapestry
Tapestry is technically a good framework, just didn’t seem to get the traction Struts did. Not sure if adding Ajax is going to change that.
|Webwork||Will integrate with next version of Struts (as Model – called the ‘struts action framework’). Strong contender, gives Ajax functionality through (integrated) DWR and Dojo.|
|WidgetDev||Hybrid (Open-source/ commercial) Framework. (In my opinion) Not enough maturity / features to justify open source version with reduced features|
|zk8||XUL / XAML type framework , capable of being rendered in either Swing or HTMLGood Framework, might attract people who are familiar with extending Firefox using XUL, but can’t see XUL (no matter who much I think it is a good idea) being mainstream without a visual designer.|
The New Struts is …. Struts. Some other framework may overtake Struts to become the new standard, but I would recommend the following Struts-related frameworks based on the following scenarios
Scenario 1: Adding Ajax to existing Struts Applications. Use AjaxAnywhere – closest to the approach taken in the article Sprinkle Some Ajax Magic into your Struts Web Application. Despite writing this article , I see the frameworks evolving rapidly to the point where you would only take such an approach for adding Ajax to ‘Legacy’ applications.
Scenario 2: Need Ajax Now for a new Java Application. Use Appfuse as it gives Struts, Ajax (with DWR) and the possiblity of JSF integration now, all ‘out of the box’. This fits in well with …
Scenario 3: Medium Term. Use an implementation of JSF (either MyFaces or whatever Appfuse promotes – probably Struts Shale). Struts Shale (JSF) has so far released only ‘overnight’ builds. Apache MyFaces (JSF) tool support and Ajax capabilities are likely to improve over time. Both Struts-Shale and MyFaces are likely to play well with AppFuse , making it a safe bet for investing your time checking it out.
And it’s not just blogs that waste time in your life. A colleague was good enough to pass on the handbook from a ‘more effective time management’ course he was on (and swears by). It was given by Priority Management , on Getting Smart with Outlook , but it’s applicable to whatever email client that you use.
Notes from the Handbook are here on the KnowledgeBase.
Before you yawn and click elsewhere , consider the remainder of your life as 1 page per day diary – no matter how long you have left , you have a finite amount of blank pages left. It’s up to you how you use them. The headlines are:
- Get yourself organised *before* you read your emails in the morning. This way you are working to your agenda, not somebody elses.
- Only check your email 4 times a day – constant interuptions means that a task can take up to 4 times longer to complete (as your brain needs time to focus back on the task each time).
- When you get an Email , do one of the 4 D’s
- Do it now
- Decide When to do it
- Delegate – give it to somebody else
- Dump (ie Delete it)
It now seems obvious that the Healthcare Payroll system was destined to fail. If you were working on the project, I’m sure it felt very differently at the time. How can your projects avoid a similar fate? While IT may sometimes seem disconnected from reality, the following guidelines show that ‘Real World’ lessons still apply.
- Know what you want and stick to it. If you’re building a house and change the plans several times the builder is going to fleece you, no matter how low the initial quote was. The same goes for IT Projects – if you change your mind after the price is agreed, you’re going to pay more.
- If you don’t know what you’re doing , find a friend who does. I know very little about houses, so when I was buying my own I got a friendly surveyor to check it out. With IT projects, this ‘friend’ should be genuinely on your side, and have something to lose (e.g. financial or reputation) if things go wrong.
- Little and often is better. Like exercise, smaller projects that deliver results little but early are best. If the results are good, try a second (and third) round to add more functionality based on the feedback from users.
- It’s been all done before. Tailored suits cost a lot more than ready-made ones – and most people are happy with a ‘Good enough’ instead of ‘Perfect fit’. There are literally thousands of ‘off-the-peg’ computer systems out there ready for final alteration to what you need.
- If you don’t understand the answer, ask more questions. Thankfully the days we sat and nodded at the Doctor’s Latin words are long gone. IT Consultants may sometimes speak a different language, but if they can’t explain what they’re talking about in English that you understand, the chances are they’re trying to hide something.
- Don’t build on sand. Like houses , projects need good foundations. For IT Projects , the good foundations are sound knowledge of the Business Processes being coded into the system. Changing processes and changing IT systems at the same time is like building on sand.
- Sometimes the tortoise wins the race. Unless your entire business model is built around being the very first to market, then being a tortoise and letting others race ahead has very big advantages. Not only can you learn from other people’s mistakes, but the chances are you’ll get it at a much reduced cost – For example websites now cost a fraction of what they did during the dot.com boom.
- Use a safety net. When building houses, often the first thing to go up is scaffolding, for safety reasons. The equivalent safety net in IT is called ‘Unit Tests’. Not only do they help you get there faster, but they let you know if you’ve broken something you’ve already built.
- Be a good poker player. Good poker players never give away valuable cards. For IT projects, owning all cards mean just that – make sure that you have full rights to the solution so that you can still move tables and use a different supplier. Even if you never make the move, knowing that you can is an effective bargaining chip.
And finally …
When you are in a hole, stop digging. The decision to call a halt to the projects was no doubt a difficult one, and is to be applauded. Too often, the temptation is to keep on going and hope things will turn out right. Recognising problems at an early stage means there is more chance of being able to fix them.
I’ve been invited to do a Web 2.0 presention to the Irish Dev / Irish Internet Association (it’s on the 21st Feb in the Morgan Hotel , Dublin, if you’re about in Ireland that day).
So, we have a problem. I consider myself to know a little about Web 2.0, but nobody knows everything about it, even the great Tim O’Reilly and his famous definition of Web 2.0. You might as well try and record every conversation happening in a busy room. I thought I would ask the community.
The Audience is tricky, as it is partly business (to whom Web 2.0 = next dot com boom) and partly technical (to whom Web 2.0 = Ajax) – for the record , I consider both views wrong. We also have only 30 minutes , including a (very quick) demo of how easy it is to migrate to Ajax (based on this Java.net article). A lot of the business concepts will be at the level of this article that I wrote for Ireland’s Business Plus magazine.
So, I have some notes on the Web 2.0 presentation taking shape over on the Knowledgebase. To cater for the technical side, we’ll probably (quickly) cover some of the Ajax Enabled Java Frameworks (summary of these here).
What do you think? How can I inject a cold dose of reality into this Web 2.0 business? Leave your comments below , or Contact me via this form.
Yes, form an orderly queue for autographs – the article in Business Plus magazine is finally available in the February edition (currently in Newsagents). It’s called ‘Everything you know about the Web is wrong’ and tries to introduce some of the concepts behind Ajax to a wider Audience.
Now, if you’re too tight to buy the magazine , or you’re living outside Ireland , this blog entry tells you how to download it. Mind you, you’ll miss out on the lovely photo of me. Want something more technical? Try this article I wrote for Sun’s Java website on for size.
While you’re at it, book your place to see me deliver a presentation on Web 2.0 – it’s part of the Irish Dev / Irish Internet Association Event on the 21st February at the Morgan Hotel in Dublin. All comments (especially giving a cold dose of reality amid all the hype) are welcome.
All shameless self publicity.
Over the last couple of months, been working on a series of Articles for O’Reilly (online) . The articles are on J2EE / Drools (more later) , but it’s been an interesting process – about 4 weeks total effort (if you count it as a day job, in reality it was spread over many evenings and weekends).
The staff at O’Reilly have been very helpful – even if I went about the process backwards (whereas normally you pitch a couple of paragraphs as a summary , then get go-ahead to do the full article). The hardest / most tedious part was formatting the article in simple html , given that it was initally written using Word / OpenOffice.