zimki | all bloggers | admin login | recent entries for James Duncan
 
Publishing JavaScript

James Duncan on Mon Aug 21 2006 22:21:49 GMT+0100 (GMT)

Tom mentioned that you can publish various scripts that you create with Zimki. What he didn't mention was how. It really is simple, and once you know how its done, the knowledge can be applied to any other Zimki object that you have previously saved.

Go to the realm where your soon-to-be-public javascript exists and enter the class browser. In the system classes list you'll see a class called zimki_javascript – click on it. System classes are basically the classes that Zimki needs to operate – you don't have much choice, they need to be there. In this case the class we are interested in actually contains all the javascript code that you've written for your realm. Select the particular javascript instance that you want to make public by clicking on its ID. That ID is unique inside the system – no other object, realm, or API key is the same as it. To make the javascript object available to the world simply select readable by all and click submit.

Once thats done, given an API key for your realm (or an api key alias) anyone can request your javascript instance by using the two argument form of zimki.library.require.

With Zimki's XML API instances can be created, retrieved, searched and deleted. Essentially publishing a javascript instance means that your code can be read and compiled into someone elses realm.

leave a comment

name
email
comment