Say for example I would write a forum which would look like this in the browser:
- original post
- Re: original post
- Re^2: original post
- Re^2: original post
+ Re: original post
_______________________________________________________________________________
Text of the selected post.
The tree view would be one resource, the text of the selected post would be one and the surrounding page would be one. If another post is selected the hole page should be updated to always display correct URIs in the browser. But if the hole page is updated the client state of the tree gets lost. The tree resource is reloaded and the information what nodes are expanded, how far I scrolled and the like is lost.
What is the REST way to solve this?
- Use URIs like http://some.where/post/123#someTreeInfo and perform only partial updates of the page? The tree info part could become quite large.
- Construct a complete resource and hide the fact that there are underlying resource like the tree? But that wouldn't save the tree state.
- Transfer the current view state to server and get it back with the response?
- Use cookies?
- Wait for HTML 5?
Other ideas? Recommendations?