IP Library Granted Patent US 7,480,894
Granted Patent B2
US 7,480,894 · App. 10/784,026 · Granted Jan 20, 2009

Method and system for retaining formal data model descriptions between server-side and browser-side javascript objects

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,480,894
App. No.
10/784,026
Granted
Jan 20, 2009
Kind
B2
Abstract

A server method for converting objects of a first type into objects of a second type, the method comprising: a) identifying one or more object classes of the first type; b) determining instance data based on the classes of the first type; c) introspecting each class of the first type; d) creating an artifact representing a software model; and e) generating one or more converters, each converter being based on the artifact and is configured for receiving the instance data and generating JavaScript code for recreating the instance from the classes as objects of the second type, for display on a browser.

Claims (30)

1. A server method for converting Java-based objects into JavaScript-based objects, the method comprising:

a) identifying one or more Java-based object classes;

b) determining instance data based on the Java-based object classes;

c) introspecting each Java-based object class;

d) automatically creating an artifact representing a software model describing the instance data;

e) generating at least one converter for each Java-based object, the at least one converter being based on the artifact and configured for receiving the instance data and generating JavaScript code for converting each Java-based object to a JavaScript object and for projecting the JavaScript objects on a browser web page;

wherein the generating step comprises:

maintaining rules that enforce typing and other modeling constraints not found in JavaScript; and

defining a smallest number of properties of each of the JavaScript objects that together represent its uniqueness to produce a string that is portable across any environment and represents each JavaScript object's uniqueness, such that if there are two physical copies of what is logically the same JavaScript object, the method automatically aliases them out such that in the browser, there is only one copy of each duplicated JavaScript object;

f) generating a simple wrapper for invoking the at least one converter.

2. The method of claim 1 wherein the object classes comprise JavaBeans and wherein the converters are invoked at runtime to generate JavaScript code required to recreate instance data from the JavaBeans into JavaScript objects in the browser.

3. The method of claim 2 wherein determining, for each property in a class, comprises determining whether the property is an attribute.

4. The method of claim 3 wherein invoking comprises outputting a JavaScript code for the value of the attribute.

5. The method of claim 3 further comprising wherein creating the artifact comprises creating a buffer to hold an exported object value or values if the property is an array.

6. The method of claim 5 further comprising creating an array to hold object IDs for the referenced objects for each object in the array.

7. The method of claim 6 further comprising computing a signature of the object if the object is in a map.

8. The method of claim 7 further comprising: calling an object; generating an export ID; outputting the JavaScript code to declare the object called as the converter for the object; and adding the ID to the array.

9. The method of claim 8 further comprising outputting a JavaScript array to hold the exported IDs.

10. The method of claim 8 farther comprising computing the signature of the object; checking the map for the signature; and if the object is already in the map; retrieving its export ID.

11. The method of claim 8 further comprising: calling the converter for the object; and outputting the buffer for the exported object values.

12. A computer readable medium comprising program instructions for:

a) identifying one or more Java object classes from a web server;

b) determining instance data based on the Java object classes;

c) introspecting each Java object class;

d) automatically creating an artifact representing a software model describing the instance data;

e) generating at least one converter for each Java object, the at least one converter being based on the artifact and configured for receiving the instance data and generating JavaScript code for converting each Java-based object to a JavaScript object and for projecting the JavaScript objects on a browser web page;

wherein the generating step comprises:

maintaining rules that enforce typing and other modeling constraints not found in JavaScript; and

defining a smallest number of properties of each of the JavaScript objects that together represent its uniqueness to produce a string that is portable across any environment and represents each JavaScript object's uniqueness, such that if there are two physical copies of what is logically the same JavaScript object, the method automatically aliases them out such that in the browser, there is only one copy of each duplicated JavaScript object;

f) generating a simple wrapper for invoking the at least one converter.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 28, 2021
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: MAPLEBEAR INC.
Reel/Frame 055155/0943 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 21, 2004
From: HASSON, LAURENT D.; GEORGE, JOBI; PONZO, JOHN J.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 015364/0057 →