[Dancer-users] URI design question
Brian E. Lozier
brian at massassi.com
Wed May 25 05:24:11 CEST 2011
Yes, you use fragments on the end of the url, like:
http://myapp.com/#books
You can change it all you want and it doesn't do a reload of the page.
Check sites like digg.com, click their "next page" button and you
will see it in action.
On Tue, May 24, 2011 at 7:50 PM, Mr. Puneet Kishor <punk.kish at gmail.com> wrote:
> Not really a Dancer-question per se, but you all are really, really smart, hence...
>
> So, I've taken this whole REST thing to heart. My approach is that the web application itself is a client now, just like a command-line program might be a client, to the data store. So, when the web page loads, even the very first time, it is like an empty form. On load, an ajax query is fired to GET the records that are then filled in. Consider a simple books catalog (make believe app).
>
> 1. User goes to [http://myapp.com]
>
> 2. A web page loads. It has all the "chrome" (the logos, buttons, etc.), but no books. On load, a call is made to [http://myapp.com/books] which sends back a JSON object with all the books, and the web page comes alive. Except, the address bar in the browser still says [http://myapp.com]. Ok. no matter.
>
> 3. The books are tagged. So, the user clicks on one of the tags, say "Thrillers," and an ajax query is fired to [http://myapp.com/books/tag/thrillers]. Once again, the correct data are received and the web page is filled in with the results. Except, the address bar in the browser still says [http://myapp.com].
>
> You get the idea. Since all interaction is via ajax, the browser never refreshes completely. So, the user has no visual indication as to where (s)he is on the web site. Which also leads to a problem -- there is no way to send a link to anyone.
>
> In other words, is it possible to change the address in the browser without refreshing the browser? Any other thoughts on such an application design?
>
> Puneet.
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
More information about the Dancer-users
mailing list