Method of defining javascript objects
AssigneeStrongLoop, Inc
InventorsZhaohui Feng, Ritchie Tyler Martori, Miroslav Bajtos
Life of this patent
Estimating the term…
Abstract
Some embodiments of the invention provide a novel server for processing application programming interface (API) requests. In some embodiments, the API server is written in JavaScript. For example, in some embodiments, the API-accessible objects of this server are each defined in terms of a JavaScript file and a JSON (JavaScript Object Notation) file. At runtime, a runtime processor instantiates each JavaScript object from its associated JavaScript and JSON files. Once instantiated, the JavaScript object can be used to process API requests that refer to the JavaScript object. Some embodiments use novel JSON file structures that allow these embodiments to define rich JavaScript models.
Claims22
A method of defining an object to process application programming interface (API) requests, the method comprising:
- defining a JavaScript (JS) file to define a set of behavioral descriptions of the object;
- defining a JS object notation (JSON) file to define a set of property descriptions of the object;
- creating an association between the JS and JSON files;
- and
- storing the JS and JSON file on a machine readable medium,
- wherein the association allows an object instantiator to instantiate the object from the behavioral description in the JS file and the property description in the JSON file.
A non-transitory machine readable medium storing a program which, when executed by at least one processing unit of a device defines an object to process application programming interface (API) requests, the program comprising sets of instructions for:
- defining a JavaScript (JS) file to define a set of behavioral descriptions of the object;
- defining a JS object notation (JSON) file to define a set of property descriptions of the object;
- creating an association between the JS and JSON files;
- and
- storing the JS and JSON file on a machine readable medium,
- wherein the association allows an object instantiator to instantiate the object from the behavioral description in the JS file and the property description in the JSON file.
Dependencies are inferred from the claim text.