Framework to facilitate taking snapshots of web application on demand
Various systems and methods are provided for capturing and storing state information and other data being used by a web application. For example, one method involves capturing the data and state information from a web application either on demand, on schedule, or on the occurrence of an event; storing the captured information in a persistent memory; subsequent to a closing of the web application, receiving an indication that the web application has been re-opened; presenting one or more options to a user, whereby the user can select a previous version to which the web application should be restored; and using the captured information to restore the web application data and user interface to a state indicated by the selected version.
1. A method, comprising:
capturing user data and corresponding user interface state information from a current page of a web application after the current page was loaded on a client computer, wherein
the capturing is performed by a process executing on the client computer, wherein
the capturing is performed by the process in response to detecting either a change being made to the user data or in response to detecting a change with respect to a state of the user interface,
the capturing is performed after the current page was loaded and prior to submitting the user data or the corresponding user interface state information to a server, and
the capturing results in captured user data and captured corresponding user interface state information;
storing the captured user data and the captured corresponding user interface state information in a persistent memory on the client computer;
receiving a command to restore the web application to a previous state;
subsequent to receiving the command to restore the web application to the previous state, displaying a list of one or more available snapshot versions;
subsequent to displaying the list to a user, receiving a selection of a snapshot version;
determining a selected version of captured user data and corresponding user state information to use in restoring the web application to the previous state, wherein
the selected version of the captured user data and corresponding user state information is determined based, at least in part, on the selection of the snapshot version; and
subsequent to determining the selected version of the captured user data and the captured corresponding user state information to use in restoring the web application to the previous state, restoring the web application to the previous state by using the selected version of the captured user data and the captured corresponding user interface state information to restore the user data and the user interface state information in the current page of the web application.
2. The method of claim 1 , wherein
the corresponding user interface state information comprises preprocessing state information and observer object information.
3. The method of claim 2 , wherein
the capturing is performed in response to an occurrence of a pre-determined event.
4. The method of claim 2 , wherein
prior to the storing, the captured user data, the preprocessing state information, and the observer object information are transmitted to the server as a snapshot, wherein the server is configured to store the snapshot.
5. The method of claim 2 , further comprising
determining a selected version of the preprocessing state information and the observer object information to use in the restoring, wherein
the selected version of the preprocessing state information and the observer object information is determined based, at least in part, on the selection of the snapshot version.
6. The method of claim 1 , further comprising:
prior to the capturing, determining one or more user preferences that govern the capturing.
7. The method of claim 2 , further comprising:
prior to the capturing, registering one or more observer objects with the server.
8. The method of claim 2 , wherein the restoring further comprises:
first using the captured user data to restore the user data in the web application,
next using the preprocessing state information to restore one or more preprocessing methods, and
finally using the observer object information to restore one or more observer object properties.
9. The method of claim 1 , further comprising:
subsequent to the restoring, resolving one or more data consistency errors.
10. A system comprising:
a microprocessor; and
a non-transient computer-readable storage medium, comprising computer instructions executable by the microprocessor, wherein the computer instructions are configured to perform a method comprising the steps of:
capturing user data and corresponding user interface state information from a current page of a web application after the current page was loaded on a client computer, wherein
the capturing is performed by a process executing on the client computer, wherein
the capturing is performed by the process in response to detecting either a change being made to the user data or in response to detecting a change with respect to a state of the user interface,
the capturing is performed after the current page was loaded and prior to submitting the user data or the corresponding user interface state information to a server, and
the capturing results in captured user data and captured corresponding user interface state information;
storing the captured user data and the captured corresponding user interface state information in a persistent memory on the client computer;
receiving a command to restore the web application to a previous state;
subsequent to receiving the command to restore the web application to the previous state, displaying a list of one or more available snapshot versions;
subsequent to displaying the list to a user, receiving a selection of a snapshot version;
determining a selected version of captured user data and corresponding user state information to use in restoring the web application to the previous state, wherein
the selected version of the captured user data and corresponding user state information is determined based, at least in part, on the selection of the snapshot version; and
subsequent to determining the selected version of the captured user data and the captured corresponding user state information to use in restoring the web application to the previous state, restoring the web application to the previous state by using the selected version of the captured user data and the captured corresponding user interface state information to restore the user data and the user interface state information in the current page of the web application.
11. The system of claim 10 , wherein
the corresponding user interface state information comprises preprocessing state information and observer object information.
12. The system of claim 11 , wherein
the capturing is performed in response to an occurrence of a pre-determined event.
13. The system of claim 11 , wherein the method further comprises:
determining a selected version of the preprocessing state information and the observer object information to use in the restoring, wherein
the selected version of the preprocessing state information and the observer object information is determined based, at least in part, on the selection of the snapshot version.
14. The system of claim 11 , wherein the method further comprises:
prior to the capturing, registering one or more observer objects with the server.
15. The method of claim 11 , wherein the restoring further comprises:
first using the captured user data to restore the user data in the web application,
next using the preprocessing state information to restore one or more preprocessing methods, and
finally using the observer object information to restore one or more observer object properties.
16. The method of claim 10 , wherein the method further comprises:
subsequent to the restoring, resolving one or more data consistency errors.
17. A computer program product, comprising a plurality of instructions stored on a non-transient computer-readable storage medium, wherein the instructions are configured to execute a method comprising the steps of:
capturing user data and corresponding user interface state information from a current page of a web application after the current page was loaded on a client computer, wherein
the capturing is performed by a process executing on the client computer, wherein
the capturing is performed by the process in response to detecting either a change being made to the user data or in response to detecting a change with respect to a state of the user interface,
the capturing is performed after the current page was loaded and prior to submitting the user data or the corresponding user interface state information to a server, and
the capturing results in captured user data and captured corresponding user interface state information;
storing the captured user data and the captured corresponding user interface state information in a persistent memory on the client computer;
receiving a command to restore the web application to a previous state;
subsequent to receiving the command to restore the web application to the previous state, displaying a list of one or more available snapshot versions;
subsequent to displaying the list to a user, receiving a selection of a snapshot version;
determining a selected version of captured user data and corresponding user state information to use in restoring the web application to a previous state, wherein
the selected version of the captured user data and corresponding user state information is determined based, at least in part, on the selection of the snapshot version; and
subsequent to determining the selected version of the captured user data and the captured corresponding user state information to use in restoring the web application to a previous state, restoring the web application to the previous state by using the selected version of the captured user data and the captured corresponding user interface state information to restore the user data and the user interface state information in the current page of the web application.
18. The computer program product of claim 17 , wherein
the corresponding user interface state information comprises preprocessing state information and observer object information.
19. The computer program product of claim 18 , wherein
the capturing is performed in response to an occurrence of a pre-determined event.
20. The method of claim 19 , wherein the restoring further comprises:
first using the captured user data to restore the user data in the web application,
next using the preprocessing state information to restore one or more preprocessing methods, and
finally using the observer object information to restore one or more observer object properties.