I've been looking into the javascript code lately so we can get it ready to
be processed by the closure compiler.  I have some changes I'd like to put
in place that I believe would be useful:

* Create a globals and/or base feature that holds the global variables,
gadgets (for gadgets) and shindig (for internal shindig namespace).  Most
modules would then add a dependency to this feature.  This would then allow
for us to remove many of the duplicated lines like this:

  var gadgets = gadgets || {};

etc.

* Try to make features 1-1 with the javascript namespace they define.
   core.prefs -> gadgets.prefs
   core.util -> gadgets.util
   core.auth -> shindig.Auth
   core.json -> gadgets.json
   pubsub -> gadgets.pubsub
   core.io -> gadgets.io
   flash -> gadgets.flash
   core.prefs -> gadgets.Prefs?

* move xmlutil from opensocial.xmlutil to shindig.xmlutil  (and any other
pollution of the opensocial namespace)

* Somehow maintain a closure compiler externs file  (could go hand-in-hand
with the taming.js maintenance?)

* To assist with exporting symbols use nomenclature like this:

  gadgets.log['INFO'] = 1;

  instead of gadgets.log.INFO = 1;

  This signifies a namespace that should not be renamed

Thoughts on any of this?  I have some patches I'm testing, more to come...

Reply via email to