powered by Authenteo
 

Learn more

Persevere

Persevere is an open source set of tools for persistence and distributed computing using simple intuitive JSON interchange using HTTP REST and JSON-RPC. The Persevere project includes a Persevere Server and Persevere JavaScript Client, but these interact through standard REST and JSON-RPC, and so both the client and server can be used with other client and server technologies.  

Persevere can be .

The Persevere Server is a Java based server that provides persistent data storage of JSON data, as well as query capability through JSONPath, and distributed computing capabilities through JSON-RPC. Persevere follows the JSPON convention for exposing persistent data storage as RESTful JSON web services, and with full capabilities for modification of persisted data, execution of remote/distributed JavaScript methods, and data centric object level security.

Persevere JavaScript Client is a persistent object mapping framework for JavaScript in the browser, which allows programmers to access, traverse, and manipulate persisted objects graphs easily with standard JavaScript syntax and Persistent JavaScript (PJS) API . Persevere implements the PJS API and maps JavaScript objects to persistent storage objects remotely through JSON based REST services following the JSPON (JavaScript Persistent Object Notation) data interchange specification. Persevere accesses persisted object graphs provided through JSPON data sources which can represent various underlying sources such as database tables, XML files, web services, and object repositories, and such persisted graphs can even span domains. Persevere allows application code to be persisted and exist within these object graphs, to facilitate improved object oriented design and organization. Persevere documentation can be found here . Here is an example of access and manipulation of an object:

            var purchaseOrder = pjs.load(poId); // load an object by id
var customerName = purchaseOrder.customer.name; // retrieve the customerâ?"s name
purchaseOrder.quantity = 5; // change the quantity

          

Persevere loads the object from the server, and retrieves the customer name. If the customer object and the name string have not been loaded from the server, then it can automatically retrieve this information from the server using JSPON. Persevere handles all the Ajax interaction with the server transparently so that you donâ?"t need to worry about the remote requests. In the last line in the example, the persistent field for quantity is changed. Persevere can automatically send the data change back to the server as well for the appropriate field to be updated. In this example, the data could be representing database tables, such as a purchase order table that is related to a customer table. You can visit the Persistent JavaScript site for the full PJS API documentation.