Skip to content
billreed63 edited this page Sep 7, 2012 · 8 revisions

Widget Libraries

Home > Widget-Libraries

In order to be usable by Maqetta, a widget library will need to provide:

  • library code - The actual JS widget library code.
  • widget metadata - Data describing the library itself and the widgets it provides.
  • "helper" code - JS code which can be run by Maqetta to better support widgets.
  • theme metadata - Used by theme editor, allowing user to create a derivative theme.

Widget libraries will generally have a layout such as this:

WebContent
|--- {libraryname}
|    +--- LIBRARY'S RUNTIME FILES (JS, CSS, images, etc)
|--- maqetta
|    +--- themes
|         +--- THEMES and THEME METADATA
+--- metadata
     |--- {libraryname}
     |    |--- {widgetname}_oam.json      // one for each widget
     |    |--- {widgetname}Helper.js      // selected widgets may have general helpers
     |    |--- {widgetname}Input.js       // selected widgets may have "smart input" helpers
     |    +--- {widgetname}CreateTool.js  // selected widgets may have CreateTool helpers
     |--- nls
     |    +--- {libraryname}.js           // localized strings go into this area
     |--- resources
     |    +--- images
     |         +--- {widgetname}.png      // icon for widget palette
     |--- callbacks.js                    // document-level helper functions
     |--- packages.json                   // bootstrap file for all library metadata [1]
     +--- widgets.json                    // widget-specific metadata info [1]

[1] Sometimes (as in the example that follows), the contents of widgets.json are combined in packages.json.

Example: Dojo Widget Library

For example, the davinci.dojo_1_8 library looks something like this:

WebContent
|--- dojo
|    |--- dijit
|    |--- dojo
|    +--- dojox
|--- maqetta
|    +--- themes
|         |--- android
|         |--- claro
|         +--- etc.
+--- metadata
     |--- dijit
     |    |--- Calendar_oam.json  // one for each widget
     |    +--- etc.
     |--- dojo
     |--- dojox
     |--- nls
     |    +--- dojo_1_5.js        // localized strings go into this area
     |--- resources
     |    +--- images
     |         |--- calendar.png  // icon for widget palette
     |         +--- etc.
     |--- callbacks.js            // document-level helper functions
     +--- packages.json           // bootstrap file for all library metadata, contains widgets.json inline

"package.json" file

XXX TODO

More Info

Consult the following sections for additional information:

  1. Widget Metadata
  2. Helpers
  3. Theme Metadata
  4. Dependencies Between Widget Libraries
Clone this wiki locally