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:
- those such as JSF and Tapestry, which essentially boil down programming HTML and servlets, and
- 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?
Suc开发者_如何学Goh 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?
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.
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.
精彩评论