2

I have recently been investigating java server-side web frameworks to serve as a rendering platform for a new B2C web site project. Based on my research I would broadly divide the available solutions into two camps:

  1. those such as JSF and Tapestry, which essentially boil down programming HTML and servlets, and
  2. those such as Wicket, Vaadin and Echo, which dispense with the HTML templating and offer a programming model akin to SWT thick clients, based on a hierarchy of windows, view components, and events, outputting the client-side HTML based on this hierarchy.

The second group - which is one branch of RIA frameworks - offer a lot of desirable features in terms of server-side control, developer productivity (e.g. simplicity, not needing to deal with servlet reentrancy issues etc.), view widgets, out-of-the-box cross-browser compatibility and cool visual effects.

What's not so desirable for a B2C is that the RIA frameworks deliver Single Page Interfaces. At the end of the day, they don't naturally allow browser history and bookmarking (it can be done, but it's messy and limited, e.g. to URL fragments only) and, perhaps most significantly, they are indifferent to SEO, which is a bit of a showstopper for a consumer-focused website.

This would be down to delegating the servlet and HTML control to the framework. The question is, is there a way to have both, or is that just too utopian? A server-side RIA-type framework with all the benefits that that brings IMHO, but with flexible and friendly URLS for bookmarking along with SEO awareness?

Such a solution might not be a single framework, of course, but be layered. As an aside, the framework itsnat seems to offer much of the above, but due to the way that it's implemented I would have a lot of concerns about server overhead (CPU and memory) - although I do think that it is kind of inevitable that RIA frameworks will be more server-heavy than the servlet/templating programming approaches.

Anybody know about alternative ways forward?

Geoff
  • 23
  • 2
  • 1
    I having a hard time trying to understand the separation between those two groups. Are your trying to break them in *component-oriented* and *non-component oriented* frameworks? I think your question (somehow) is which framework is both RESTFul and component-based. – Augusto May 01 '11 at 10:22
  • 1
    My experience is mostly with Wicket, which I can assure you does not deliver a single page interface and is capable of generating very REST-like URLs. Are you sure you've correctly characterised the other frameworks? The problem you're describing seems to apply much more to GWT, which is a client-side framework. – Adrian Cox May 01 '11 at 10:26
  • In the most general terms, yes. Is there a framework (or framework mix) which offers the characteristics of both the component-based and RESTful models. – Geoff May 01 '11 at 10:30
  • 1
    I agree with you Adrian, JSF, Tapestry and Wicket provide for sure what Geoff wants. I can't say anything about Vaadin & Echo because I haven't used them. – Augusto May 01 '11 at 10:30
  • But, more specifically, it should be SEO-friendly while ideally offering the many widgets and eye candy and that e.g. Vaadin and Echo provide. To be fair, I did investigate Wicket less deeply than Vaadin and Echo is it did not seem to provide as much RIA eye candy. Perhaps Wicket's advantage in this issue is, nevertheless, that it can take HTML as input. – Geoff May 01 '11 at 10:45

2 Answers2

1

JSF and Tapestry can manage restful like URLs out of the box. Wicket can be extendeded to support them.

For wicket check this.

Tapestry supports an URLRewriter. This is useful in case you want to change your URLs and keep backwards compatibility with the old urls.

Augusto
  • 28,839
  • 5
  • 58
  • 88
  • 1
    Thanks, good info, but perhaps not quite the answer I was looking for. RESTfulness was not the only criterion. JSF and Tapestry are not "component-based" (by my understanding) in the way that Vaadin and Echo are, and they are, according to my classification, a variant on servlet programming, which RIA gets away from. Wicket, on the other hand, is component-based, but looking at the API, is somewhat weaker than the other two, therefore I'm not sure how "RIA" it is. – Geoff May 01 '11 at 11:05
  • 1
    Geoff, I don't know what to say, as both JSF (1&2) and Tapestry 5 definitely are component based. Could you expand what is your understanding of *component based*? – Augusto May 01 '11 at 13:09
  • 1
    Indeed, Augusto. It's all about the definition. So component-based has a bit of "it depends" about it! In my understanding, there are two basic kinds of frameworks: request-based and component-based - e.g. as discussed here in RIFE: http://en.wikipedia.org/wiki/RIFE#Web_engine. In the definition I am using, request-based means servlets, requests, controllers and actions, or simple wrappers around them. This describes JSF and Tapestry, and is the first group. Component-based for me means abstract widgets and event-based handing á la SWT. In its most avanced from, we get RIA, the second group. – Geoff May 01 '11 at 14:08
  • Wicket for me looks like falling into both camps (like RIFE) which, then, is an admitted inaccuracy in my original question. So Wicket is a partial answer. In the admittedly somewhat hopeful and speculative question, I envisaged component-based RIA, with lots of cool widgets and graphical effects, for example what Echo achieves (http://demo.nextapp.com/), but with better URL control, giving not just friendly bookmarks but also a space that googlebots can easily navigate. Looking at the source of the Echo demo shows that the bots would not get far. But: Wicket with Echo-like richness maybe? – Geoff May 01 '11 at 14:22
  • It seems to me that there are essentially three high-level approaches to the general problem of being both RIA and amenable to SEO: (1) A single comprehensive framework, maybe something like RIFE, but I don't know RIFE at all well, and I don't know how much RIA capability it offers; (2) a combo framework, e.g. Wicket (making SEO possible) but with rich widgets somehow added on, but I'm sure there could be other pairings (or triplets), or (3) having one website outputting two parallel content spaces, one full-on RIA and one slimline and bot- and SEO-friendly? – Geoff May 01 '11 at 14:41
  • Would this be a fair summary, on whether was a way, any way, to have Swing-style RIA and SEO with server-side Java? For me, JSF and Tapestry allow SEO but (i) are aligned with the servlet/request style of programming and (ii) are not natively RIA but could of course be made so with an amount of extra work plus tag libraries/plugins/whatever. Wicket seems to offer more because it is not only SEO-capable (takes HTML as input) but also has a Swing-like component model, although currently it lacks the richness of e.g. Echo. Issue: X-Browserness of Wicket components (which Echo's are). – Geoff May 01 '11 at 15:21
0

Take a look to this complex ItsNat based example, Single Page Interface can be SEO friendly and memory consumption can very low, read "disconnect child nodes from client" to know how you can save memory in server.

jmarranz
  • 6,459
  • 2
  • 21
  • 10