AJAX, preserving state, and nitobi.TabStrip 
December 15th, 2006
I’ve been working on the new nitobi.TabStrip, and one of the things that’s been bothering me about ajax tools and applications is the lack of state preservation. This is particularly aggravating if the back button isn’t taken care of. The new nitobi components, and TabStrip in particular are going to start supporting better preservation of state. Preserving state and session management is a tricky problem for server writers in the past, and with the introduction of AJAX where state is changed so much on the client, the problem is even trickier.
The first problem we are confronting with, is how to save the state of an ajax item, and this is where we start. Serializing TabStrip was my first task, and it opened up some interesting doors. First of all, we decided to serialize to XML, which is convenient since it is similar to HTML. Here for example, is how we deserialize from an html declaration and create the TabStrip.
var decl = new nitobi.base.Declaration();
el.jsObject = nitobi.base.Factory.getInstance().createByNode(decl.loadHtml(el));
Here is the xml that can be loaded:
|
Del.icio.us
This entry was posted on Friday, December 15th, 2006 at 4:36 pm and is filed under ajax, components, development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

December 20th, 2006 at 11:41 am
[…] Joel and I have been working on setting up a framework for cutting down on the development time for these components by sharing as much of the work as possible. He has a nice post up now about the early stages of nitobi.Tab, and how the XML serialization and deserialization will be working. […]