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:
