views:

1688

answers:

7

What Java web framework out there best supports a role of "web UI designer", that is, lets you:

  • Use popular web design tools (xhtml validators, css editors, what have you) on your views/pages
  • View changes without running on a server
  • Rapidly prototype different UI options
  • Supports a (somewhatly) clean separation between "developer" and "designer" (terminology intentionally vague)

We, like many others, have found these capabilities sorely lacking in our large, legacy Struts 1.x apps that use lots of JSP fragments and includes.

We've decided to port our apps to a JSR-168/268 portal environment, but we have not decided on what Java web framework will power the portlets. We're open to any kind (action-based, component-based, etc) and a key criterion is how well it supports the role described above.

I'm intrigued by Tapestry which claims that its views are XHTML compliant pages (that simply have extra Tapestry-specific attributes added onto them to be processed at runtime). This sounds like it would play well with a web ui designer's toolkit. However, I'd like to know if this is what actually happens in the real world, or if compromises are necessary.

Of course, if there's something much better than Tapestry, I'd love to hear about it!

+2  A: 

I've had pretty good luck with JSPs using JSTL and CSS, Spring, and SiteMesh. SiteMesh in particular is terrific, because it allows you to compose pages without includes. It uses the Decorator and Composite patterns to good advantage.

Web designers created pages using Dreamweaver using HTML and CSS. Developers would take those and add in the dynamic bits using JSTL. Headers, footers, and the rest were added in using SiteMesh. The separation of concerns meshed well.

duffymo
I know very little about SiteMesh, but now I'll have to dig deeper. Thanks!
Brian Laframboise
+3  A: 

You might consider ZK with JSPs: http://zkoss.org/ It's all about rapid-prototyping. Many things are design-y and really easy, BUT extending widgets is hard. Also, giant webapps may develop a performance problem if you don't know exactly what you're doing.

Eric Wendelin
A: 

I lately tried and I'm very happy with RichFaces, wich you can look how presents here, connected with facelets. Works good for me ;)

Dogrizz
+7  A: 

Try Wicket. It has all you need.

bwalliser
Ah yes, I see it has a Tapestry-like approach to the HTML (or is Tapestry's approach Wicket-like?). Will definitely investigate. Thanks!
Brian Laframboise
Following up - Wicket looks really, really slick. Very clean separation of concerns. Now I'm off to prototype!
Brian Laframboise
It's Tapestry-like.
bwalliser
Tapestry-like without the awful complexity of Tapestry, I hope.
skaffman
+1  A: 

If your enterprise computing requirements are complex, the fact that Tapestry has a built-in IoC container really helps out. However, this also contributes to Tapestry's high learning curve if you are not familiar with this type of programming. Changing a pure HTML page into a Tapestry page is easy, since Tapestry tags are as non-intrusive as it gets. Check out Jumpstart for examples.

Nick
The link doesn't seem to work :-)Also, the trouble with Tapestry right now is the total non-backwards compatibility. It's like the Struts 1 vs 2 problem. Half the literature I'd find wouldn't apply to whichever version (3 or 4) we chose. Plus, I think we've settled on Wicket :-)
Brian Laframboise
+3  A: 

I think Spring MVC is better choice for you. It will be familiar for you (it is action framework), and it supports all you need.

If you want to try OO/component framework, try Apache Click. Click is Tapestry-like, but much more easy than Tapestry and Wicket.

Andrew Fink
A: 

The Stripes MVC framework could deliver all you’re needs. It’s an easy to use web framework and as it’s action based it’s close to HTTP and the generated HTML, thus giving you full control over you’re HTML.

As view technology it supports Freemarker or JSP with custom Stripes JSP tags (no scriplets!). Both solutions are fully XHTML compliant.

The Stripes framework supports rapid prototyping. After editing the views, there is no need to recompile code, not even a server restart is needed, just reload the page.

Separation of concerns is excellent. Just dumb views that generate what the controller(s) order it to do. Controller code is also simple and straightforward, there is no need for extensive mappings in XML files, all is excellently defaulted and configurable by Java 5 @annotations. (See: Wikipedia example code).

Don’t know much about portlets, but there is an Liferay implementation.

Kdeveloper