• Menu
  • Back
  • Overview
  • Standard
  • For Developers

Example 1: Storage and Retreival

This example shows the ability to create, store and retreive decals from the repository.

Step 1: Creation
Click the button, and we will generate a decal. Try using the current URL (it has extractable microdata and a twitter address), and generating different decals using our web services. This is a simple JSON web service that generates decals from URLs. Inspecting the network traffic data will show you the format of the response the server sent.

Generate Decal

Step 2: Write
Here we will write the decal to the right into the repository. Click the option to Store Decal, and then make sure to copy the returned ID to your clipboard. Decals can be stored as simple JSON objects in No-SQL databases, or on a filesystem. Here we are writing the decal to a No-SQL database, and returning an ID. Here we are writing the decal into a No-SQL database. We do not explicitly record within the decal what the ID of the decal is, it is generated at runtime. Methods of generating the ID, such as MD5 hashing the decal to obtain an ID (useful for de-duplication) are also valid.

Store Decal

Step 3: Retrieval
Copy the decal ID from the previous step, and paste it here, then click the button. Retreival of the decal using an ID is simple, and the result is understandable by all modern languages. Any store that can hold a JSON object can hold a decal. Here we are using REST notation to retreive and store the Decals, and then parsing it into the display object using Javascript.

Retreive Decal