Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Which Ajax enabled framework should you use as an Enterprise Java developer?

Paul Browne asks (and answers) "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.
However , in this strange new Ajax and Web 2.0 world, things are beginning to change. Javascript gone from 'has been kiddie scripting language' to 'coolest thing on the planet'. User expectations about what Enterprise Web applications can are going through the roof as Web 2.0 enters the mainstream. What Java framework are you going to use to deliver these expectations?

Paul goes on to show you how he researched the Ajax-enabled Java frameworks that are currently available and gives a set of criteria he used. His conclusions?

  • Use AjaxAnywhere if you need to add Ajax functionality to an existing Struts application.
  • For new applications with Ajax, use AppFuse. While he recommends the Struts version, I recommend using the other flavors first (Spring MVC, WebWork, Tapestry or MyFaces). ;-)
  • For the future (which I believe is what he means by medium-term), use a JSF implementation. AppFuse currently uses MyFaces, and it's likely we'll keep improving that (possibly with a Shale front-controller or some nifty things the Spring team has been adding).

Posted in Java at Mar 02 2006, 12:16:14 PM MST 17 Comments
Comments:

I don't see how JSF plays well with AJAX at all. When we evaluated technologies for our new project, we initially assumed we would go with the standard of the future, JSF. But, after we learned more, we went with WebWork because JSF's "everything's a POST" approach and the need to reconstruct the component tree all the time seemed like it would just get in the way of AJAX.

Posted by Dennis Doubleday on March 02, 2006 at 08:00 PM MST #

Thanks for the link to the blog post. To answer Dennis comment: JSF fits with Ajax better than Struts as it allows a more visual component/event based approach (similar to Swing or Visual Basic), rather than the 'post everything in one go' that we've been used to on the web. JSF needs to be simplified at bit, in the same way EJB 3 simplified the mid tier standard. Note however that Webwork (which Denis Recommends) is joining forces with Apache Struts, which is moving to a JSF implementation! Paul

Posted by Paul Browne on March 02, 2006 at 09:02 PM MST #

Whoa! WebWork is becoming Struts Activation Framework 2.0, but SAF 2.0 will be more like WebWork than Struts 1.x. It has nothing to do with JSF, as far as I know. Enlighten me if I'm wrong.

Posted by Dennis Doubleday on March 02, 2006 at 09:20 PM MST #

I've been using AjaxAnywhere with an existing project and I'm really happy with it.

Posted by Sanjiv Jivan on March 02, 2006 at 11:27 PM MST #

Framework proliferation seem like it's accelerating (SAF, Shale, Seam, and others recently added to the mix) and more with more frameworks, containers, and libraries starting to work with each other now (all Matt's fault!), there has been a combinatorial explosion of choices. Not only that, the number of blogs and blog commenters (uh, I think I'm in that category) has exploded as well, each person having a different view of which combination(s) are best. Chaos and confusion reign supreme.


Will AppFuse heap more choices on the pile by supporting Seam? The article in JDJ about it sure makes it look good. I haven't jumped on the Hibernate bandwagon yet since I wanted to wait and see what EJB3 looks like, and it looks pretty good. Is there enough evidence yet to recommend for/against it vs. Hibernate for new projects?


It is dark here. You are likely to be eaten by a Grue.

Posted by gerryg on March 03, 2006 at 02:04 AM MST #

Seam and Trails (and RoR for that matter) are very similar to AppFuse in their goals. IMO, it makes no sense for AppFuse to "support" either framework. I do see some synergies with Trails b/c it generates the views/pages at runtime, but Seam is quite a bit different since it doesn't use Spring. If nothing else, I'd like to think that AppFuse inspired these frameworks. However, I'm willing to bet the authors of these frameworks thought of this stuff long before I did.

Posted by Matt Raible on March 03, 2006 at 04:40 AM MST #

Seam is probably slighly more geared toward EJB3 than hibernate pojo's.

Posted by andrew on March 03, 2006 at 07:50 AM MST #

I've been a full-time EJB developer since 1999 and Java since 1996. I've tried Struts, JSF, Tapestry., et. al. IMO, if you are a Java developer and you want a great Ajax framework, do yourself a favor and use Ruby on Rails. Give up on Java for Web Apps. Continue to use Java for the service layer via Hessian (there is a Ruby client) if you must keep a Java App server around (which is why this post still applies to Java developers). I'm currently in the process of converting a Struts/EJB mess into a ROR/EJB mess. :> I'm Keeping the legacy stuff in EJB for a while in order to do an evolutionary migration but at least I get to use the elegant Rails Ajax and walk away from Struts. In my limited experience, ROR makes Ajax easier to use than the non-Ajax solution in some cases. Try it.

Posted by Larry Sherrill on March 04, 2006 at 02:42 AM MST #

Check out Coldtags suite also for the Struts projects: http://www.servletsite.com/jsp.htm#ajax

Posted by Dan on March 07, 2006 at 10:33 AM MST #

Larry, How are you communicating to middle tier from RoR? You mention Hessian and as I understand it's web services protocol. So, does that mean that you are using all of your middle tier as web service. Seems very inefficient to me. Please correct me if I am wrong.

Posted by Atif Khan on March 07, 2006 at 10:58 PM MST #

Atif, Hessian is a binary web protocol. You are correct: it is not as fast as having the web tier inside JBoss. However, for my current application it is more than sufficient. I suspect it would be sufficient for a large number of applications (however, each app needs to be evaluated). The benefit is programmer efficiency, which to me, is the major expense/risk of a project. I am way more efficient with ROR than with Struts, et. al. (Correction to my last post: I said full-time EJB developer, I meant full-time Enterprise Java developer fortunately :>).

Posted by Larry Sherrill on March 08, 2006 at 02:03 PM MST #

Atif, one more thought. Using Hessian on my current project is a way to quickly tap into an existing EJB legacy layer and rip out Struts, just replacing the UI with a databaseless ROR. My goal is to evolve away from the EJB layer over time altogether, mitigating the web service inefficiency. If it were a new project, there would be no EJB layer, just ROR. We have quite a bit of server side Java that we don't want to rewrite in a big bang fashion. Refactoring the app with baby steps is safer for us.

Posted by Larry Sherrill on March 08, 2006 at 02:15 PM MST #

Visit http://www.freejavaguide.com This site has got some amazing free tutorials in various topics like Java, JSP, Servlets, EJB's, SQL, PLSQL etc

Posted by Hemanth on March 09, 2006 at 05:09 PM MST #

Why are the demos password protected? Are they that bad? Why should I "register" in order to see them? I'm currently evaluating AJAX-based frameworks for a considerably-sized project, and AppFuse has just been dropped. f.

Posted by franks on August 21, 2006 at 01:01 PM MDT #

If you're referring to the AppFuse demos, you should start from http://demo.appfuse.org/demos.html - the administrators username/password (mraible/tomcat) is shown there. As far as AppFuse and Ajax - even though it has DWR and Script.aculo.us included, they aren't used much for the core features.

Posted by Matt Raible on August 21, 2006 at 03:18 PM MDT #

None of the links on the site http://appfuse.org/display/APF/Demos+and+Videos are working... e.g: when I click on Struts2+Spring+Hibernate demo i.e this link http://demo.appfuse.org/appfuse-struts I get the message "The Tomcat server is not answering"

Posted by robin on July 17, 2007 at 03:34 PM MDT #

Robin - sorry about that. I've restarted Tomcat and the demos should be accessible now.

Posted by Matt Raible on July 17, 2007 at 03:47 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed