Generate PHP Simple Method Description (SMD) files for JSON-RPC in Dojo

Published September 18th, 2006

For the last few weeks I’ve been familiarising myself with Dojo, a powerful Javascript toolkit which we’re going to be using for the next iteration of our user interface. I’ve spent a fair amount of time hanging around on the project’s IRC channel #dojo, where people go to discuss Dojo and (hopefully) get their questions answered.

The other day someone asked if anyone knew of an automated way to generate Simple Method Description (SMD) files from PHP5 classes for use with Dojo’s implementation of JSON-RPC, as detailed on this page. The answer appeared to be ‘no’ but it seemed to me like a pretty simple task. Now I know little about RPC and nothing whatsoever about JSON-RPC but using the example on the previously-linked page as a guide, I had something up and running pretty quickly. You can find the resulting (PHP5) file here.

Disclaimer: as noted above, I know little about RPC. I haven’t tested the output at all but I’m told it works. I don’t know if the output complies with any standards, I just used the example from the Dojo manual.

Get a Trackback link

No Comments Yet

Be the first to comment!

Leave a comment

Comment Policy: First time comments are moderated. Please be patient.