From Ajax Patterns
Tags: Object Persistence
In A Blink
Object persistence has become an important part of many development projects because of the improved structure of coding that it provides. With object persistence, objects can be manipulated with normal programming techiques, and their state can be stored in persistent storage (on the server or client). In future sessions, the persisted objects can be restored to their previous state.
Standard object manipulation is a very natural programming technique. Persisting objects in other languages has already proven very powerful in improving code structure, for example in Java (JDO implemented through Hibernate, JPOX, etc), and simplifying the job of storing state information.
When to persist the object data?
Objects can be explicitly loaded and saved. Or you can use a class of persistable objects that manage get and set calls, and the data can be persisted when these calls are made.
Where to persist the data
Object data can be stored on the server through remote calls, or it can stored locally using a local storage technique.
Ajaxdo is a framework to save and load objects to a server connected to an SQL database.
- Dojo.Storage/Dojo Offline Toolkit provides the ability to store data local in persistent storage on a browser.