views:

114

answers:

5

Are there any up to date articles comparing JSF 2 and Tap 5? Everything I seem to find is comparing JSF 1.2 and Tap4.

Does anyone have any experience with T5 or JSF2 and time to evangelize one or the other?

I'm looking for a framework for rapid development in Java, on top of Hibernate and mySql.

Other framework sales pitches accepted, but JSF2 and T5 are currently our top picks.

A: 

I love this question about Tapestry. Maybe it will influence your decision.

Jim Tough
Yes, that question pertaining nearly 100% to Tapestry 4. Thanks. How about Tapestry 5?
Instantsoup
+2  A: 

Use JSF 2, particularly if you make use of Java EE 6 features. If you want to have fancy UI, try Primefaces.

As per your requirement, the important part to consider is that you're using MySQL, and that's it. Therefore, take if from different angle. You're using JPA2 (and your persistence provider happens to be Hibernate in this case). With this approach, down the track you can quickly very easily 'swap' your persistence provider or database you're using.

Looks like Java EE 6 solves it.

DWuysan
+2  A: 

Taking up your offer and pitching another Framework :

If you want really rapid development then you should look at the Play Framework.

I've used JSF/Richfaces/Seam/Hibernate etc and I'd say that using Play more than doubles your productivity. There are no deploy cycles. So no developer downtime. It's got JPA/Hibernate baked in and lots of plugins that extend it's functionality in other directions.

I also like the fact that it makes your pages so lightweight. My biggest issue with JSF was always the weight of the pages (unecessary IDs, lots of tables, client state etc)

Take some time and view the webcast.

Damo
Play has won the DevDerpy, surpassed asp.net, ruby, php teams. Play is the best Java web framework I've ever seen, it's a complete stack and also has 1st class scala support. Plugin and module system, test system, auto compilation, rest, caching, logging, webservice support, jpa, mongo module, guice and spring module, groovy template system, super error reporting, simplest framework you cannot believe, crud/admin / secure modules, database versioning,... it's near perfect.
sirmak
I'm going to accept this one, as Play is very cool.
Instantsoup
+3  A: 

I've worked mostly with Tapestry 5 over the last few years; I won't evangelize though. Choosing a good web framework is certainly a good idea, but usually not your prime problem.

A list of good and bad things from the top of my head:

  • Tapestry 5 has a rather steep initial learning curve. There's magic and metaprogramming happening everywhere. You could argue it's overdoing convention over configuration.

  • Simple stuff is very simple to do, harder stuff requires you to understand in detail how Tapestry 5 works and can be hard if you don't (yet).

  • I love the live class reloading. You change something in a T5 component or template and you see it right away. Really useful when your app does a lot of stuff and takes 30s+ to start in Jetty.

  • Tapestry does not support dynamic page structures. This is usually not a problem, but if you're developing some kind of portal solution where people can individually arrange components, don't use Tapestry. Tapestry is for static structures, which it handles really well.

  • Tapestry has beautiful URLs. package/page/${param1}/${param2} ...

  • Tapestry uses the proper HTTP verbs to do stuff. A link is a GET, a form submission is a POST, the post-redirect-get pattern is the norm.

  • Tapestry's community is not very large. Apart from Howard Lewis Ship, there are a few other committers, but nothing like the support Wicket has. Thus, Tapestry evolves rather slowly.

  • Tapestry's approach to templating (instrumenting HTML with types and IDs) is one of the better ones I've seen, but it doesn't go as far as Wicket in keeping code out of the HTML. On the other hand, the class files are less verbose. Still, I think the Wicket way is preferable.

  • Tapestry is somewhat under-documented.

I like Tapestry very much, I think you can be very productive with it, and I would always happily participate in projects where it is used.

I would, however, advise to also check out Wicket. It seems to have gained more traction than Tapestry and solves some problems less magically, but with a common sense approach.

(I've only briefly used JSF 1, which I found was completely off in just about everything it did: wrapping every request in a POST (thus breaking basic web functionality), using JSPs, but requiring to use special tags for everything, even plain HTML... I read a lot has improved in the JSF camp, but I can't tell, I've never looked at it again.)

Henning
Oh, anonymous downvotes on all answers that don't say "use JSF and STFU" or "take a look at this T5 flamebait." Sigh.
Henning
+1 as that didn't deserve a downvote. Weird.
Damo
+1  A: 

I've been pretty pleased with Tapestry. It is a different approach than what most people are use to. It uses a lot of the same paradigm as WebObjects (what the iTunes store is built on).

Tapestry does a very good job of minimizing the amount of code you have to write to accomplish a task. This is great once you know what you are doing, but it can be frustrating at first while you are learning the naming conventions because some stuff seems to magically work and other things won't because you named wrong.

One of my favorite things about Tapestry is how little XML is required. For example, if you create a Hibernate entity, you place it in the com.example.entities package and give it the @Entity annotation. There is no other configuration necessary--no XML, no adding the the class name to a file somewhere, etc.

I'd highly recommend taking a look at actual code to see what you think. Here are a couple suggestions:

wookicentral.com/ github.com/spreadthesource/wooki

tapestry.zones.apache.org:8180/tapestry5-hotel-booking/ github.com/ccordenier/tapestry5-hotel-booking

Also take a look at the jumpstart site. It contains a number of examples along with the code showing you exactly how to use most of the various components. It also contains a starting point app that gives you some user management features if you want to base an application on it.

jumpstart.doublenegative.com.au/jumpstart/

Also check out the revamped Tapestry documentation. It isn't posted on the main site yet, but it is already a very big step forward:

people.apache.org/~uli/tapestry-site/

Mark