Hi,
On Mon, Sep 23, 2013 at 1:59 PM, Hendy Irawan <[email protected]> wrote: > Hi, > > The way I see it now this will enable a lot of our frontend pages to be > stateless. > > Currently http://www.tuneeca.com powered by Wicket 6.8.0 has mostly > stateful > frontend pages (except for HomePage, which we made the effort to be > stateless to reduce pagestore/session usage). > > Most of the "state" are used for paging, sorting, and filter, which we > happen to use Wicket's AJAX built-in support heavily (thanks Wicket!! :-) ) > but of course this makes the pages has ?id in them. > > I think it'd be possible to encode all the "state" a page wants in, e.g. : > > > http://www.tuneeca.com/release/carribean_dream?lowerPrice=50000&upperPrice=200000&sort=name&page=2 > > or perhaps: > > > http://www.tuneeca.com/release/carribean_dream/lowerPrice/50000/upperPrice/200000/sort/name/page/2 Both of these urls won't work in IE 8/9/10 because these versions of IE do not support HTML5 History API. To support history you will need to use Url fragments, i.e. something like: http://www.tuneeca.com/release/carribean_dream?#lowerPrice/50000/upperPrice/200000/sort/name/page/2 or http://www.tuneeca.com/release/carribean_dream?#lowerPrice=50000&upperPrice=200000&sort=name&page=2 > > With the History API support it'd should be possible to do this, while > retaining four (!!) awesome characteristics : > > 1. AJAX - faster loading due to less bandwidth usage > 2. Bookmarkable - the URLs (+ parameters) are immediately bookmarkable and > consistent. > With the Url fragments this is not quite true. The url is bookmarkable but will require some extra JavaScript onload logic to make an Ajax call to the server after initially loading the page. Twitter used to use this approach but it didn't worked well. There are blog articles about the problems. > 3. Statelessness - faster loading (internally), which results in: > How exactly it will be faster ? > 4. Less session/pagestore usage - faster loading because less I/O, also > saves precious heap & disk space :-) > Those are not so precious these days. Actually developers' salary is bigger than their cost. > > Point 3 & 4 above are only possible with proper stateless links/buttons > etc. > (which I assume will be one of the improved features of Wicket 7?) > There are no such improvements at the moment. But there is http://central.maven.org/maven2/org/wicketstuff/wicketstuff-stateless/ > > Of course I haven't yet made a Proof of concept of this... (sorry!) but > just > thinking about this made me excited. If this works out, Wicket 7's > definitely going to be the most awesome web framework of all (not that it > hasn't, mind you :-)). > > Hendy > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wicket7-History-API-support-for-navigable-AJAX-pages-components-tp4660502p4661443.html > Sent from the Forum for Wicket Core developers mailing list archive at > Nabble.com. >
