Hello,
I am new to Shindig and doing some development exploring how to add a new
feature to Shindig to support "gadgets for teaching and learning". I am not
proposing to add this feature - I want to simply build it as a prototype for
now as an exercise to learn about Shindig.
My feature will need some server-side code to do things like allow learning
gadgets to store learning activity data, submit student assignments, etc etc.
The basic idea is to make it so that learning management system like Moodle,
Sakai, Blackboard, etc can have a "slaved Shindig" so they can host learning
gadgets that store data in the LMS system.
I have gotten to the point where I have built a new feature (the client JS,
server JS, and feature.xml) and have it working.
I have also built a server side handler and have it properly registered in the
server. When I look at debug out from system.listMethods, I see my little
service right in there along with the others:
method=system.listMethods
{result=[samplecontainer.update, activities.supportedFields, activities.update,
activities.delete, activities.get, ims.getInfo, ...
I have trolled through the code of the various features, looking for a simple
code sequence to call a server-side service from a feature and get a response.
I expect there is some simply and elegant utility bit I have not yet found.
Here is one of my many feeble attempts in my feature code:
var args = [
null, // go to parent
"ims.getInfo", // service name
null, // no callback
gadgets.util.getUrlParameters().ifpctok ||
gadgets.util.getUrlParameters().rpctoken || 0 // Legacy IFPC "security".
].concat(Array.prototype.slice.call(message));
gadgets.rpc.call.apply(gadgets.rpc, args);
This gives me "Unknown RPC service: ims.getInfo". I am sure that I am just
missing some obvious pattern.
I appreciate any help - once I figure this out, I will gladly write up what it
took to do this and put it on my blog for others to find and contribute as text
for the part of the documentation that says "How to Add a New Feature: TODO" :)
In the longer term, I also would be interested in thinking about ways to make a
new feature a nice, self-contained JAR with nice registration points with the
ability to add a feature by adding a Jar to a binary Shindig distro and perhaps
one line to the web.xml to point Guice at the new feature to get it loaded and
registered - but that is a ways off. I need to walk before I fly.
Thanks in advance.
Charles Severance
University of Michigan
IMS Global Learning Consortium
www.dr-chuck.com