forked from maqetta/maqetta
-
Notifications
You must be signed in to change notification settings - Fork 0
Foundation data structures
billreed63 edited this page Oct 31, 2011
·
18 revisions
This page describes the foundation data structures for the Maqetta cloud application that supports multiple users.
- There are multiple sites, where a site is a server that hosts Maqetta
- Within a given site, there are multiple users, groups and organizations.
- We already support multiple users (although lots of enhancements needed here)
- An organization typically would be a company, such as IBM or American Airlines, with the idea that ultimately Maqetta sites would offer secure multi-tenancy and provide server-side bridges to organizational-specific LDAP and maybe sendmail services. Each organization has one or more organization admins.
- (Down the road) an organization admin can create groups, with one or more group admins. The main purposes of group.
- Shared configuration settings (e.g., which widgets and themes should be used by a particular collection of users)
- Access privileges (e.g., only people within group A can view each other's workspaces)
- A workspace server is a web server that can manage Maqetta workspaces.
- Workspace servers are identified by a simple URL, which points to a server that implements the appropriate Orion file client protocols
- A workspace server can be the same server that hosts the Maqetta application or can be a remote server
- There is a built-in simple workspace manager that does simple saves into a Unix file system on the same web server that hosts the Maqetta application (i.e., what we have today)
- We are likely to offer other built-in workspace managers that support source control systems such as Git and RTC. (We will partner with the Orion project on these built-in workspace managers)
- The list of workspace servers can be modified by site admins, organization admins, group admins, or individual users.
- Workspace servers are identified by a simple URL, which points to a server that implements the appropriate Orion file client protocols
- Maqetta will support a workspace server configuration file (probably a simple JSON file)
- Lists the workspace servers (by simple URL) that should be made available to users
- Users can have multiple workspaces
- Each new user gets a single default workspace for each workspace server attached to his account
- Down the road, users will probably want us to support the ability for a given user to have multiple workspaces on a particular workspace server, but this is low priority for short-term given that we already support multiple projects. Nevertheless, we should architect our code to allow for this possibility down the road
- Each workspace can have multiple projects (already supported today!)
- A library server is a web server that implements Maqetta's library server protocols and delivers a library package (including associated metadata) that can be "installed" into a user project. (Installation is either copy or a magic symbolic link.)
- A library might contain the following things:
- Runtime JavaScript (and associated CSS, HTML snippets and images)
- The runtime JavaScript often will include widgets and themes
- Widget and theme metadata (see sections on widgets and themes below)
- Maqetta helper JavaScript
- Runtime JavaScript (and associated CSS, HTML snippets and images)
- Maqetta will support a library server configuration file (probably a simple JSON file)
- Lists the libraries that should be made available to user projects
- For each library, the library server config file lists:
- URL of library server
- Library name and version (e.g., dojo 1.7)
- Whether this library should be installed by default in new user projects
- Also includes an library-level Maqetta helper logic as needed by that library
- Can defined by site admin, organization admin, group admin or user
- Maqetta will support a library metadata file (probably a simple JSON file)
- Library name and version
- Lists any library dependencies
- e.g., jQueryUI dependent on jQuery, custom widget A dependent on Dojo
- Maqetta helper functions at the library level
- When a Maqetta user does a "Save As Widget" operation, maqetta creates a single-widget library.
- We will provide documentation that tells users how to manually consolidate custom widgets into a single library (versus one library for each widget)
- A particular library can contain one or more widget collections
- Dijit and dojox.mobile would be different widget collections
- Each custom widget or custom widget library would represent separate widget collections
- To find the widget collections within a library package, we look for widget collection metadata files that match a particular pattern (what we now call widgets.json)
- Each widget collection metadata file indicates what devices it supports ("all", "desktop", "mobile", or specific platforms such as "iPhone")
- Within each "widget collection", we should look for:
- Theme files (what we currently name *.theme)
- For each theme within a widget collection, there is a theme metadata file (*.theme today) that includes the following information:
- Which JS library and version
- Which widget collection
- Which device ("all", "desktop", "mobile", or specific platforms such as "iPhone")
{ "className": "android", "name": "android", "lib": "dojo", "widgetCollection": "dojox.mobile", "version": "1.7", "specVersion": "0.8", "files": [ "android.css" ], "meta": [ "android.json" ], "themeEditorHtmls": [ "dojo-theme-editor.html" ], "helper": "davinci.libraries.dojo.dojox.mobile.ThemeHelper", "type": "dojox.mobile", /* backward compatibility */ "devices": ["android","other"] }
- A widget collection might also include theme set files which defines a complete set of themes for different classes of devices. For example, a theme set might use theme A for iOs and theme B for Android.
{ "version": "1.7", "specVersion": "0.8", "helper": "davinci.libraries.dojo.dojox.mobile.ThemeHelper", "themeSets": [ { "name": "desktop_default", "theme": [ { "theme": "sketch", "device": "Desktop" }, { "theme": "none", "device": "Android" }, { "theme": "none", "device": "BlackBerry" }, { "theme": "none", "device": "iPad" }, { "theme": "none", "device": "iPhone" }, { "theme": "none", "device": "other" } ] }, { "name": "mobile_default", "desktopTheme": "claro", "themes": [ { "theme": "claro", "device": "Desktop" }, { "theme": "android", "device": "Android" }, { "theme": "blackberry", "device": "BlackBerry" }, { "theme": "ipad", "device": "iPad" }, { "theme": "iphone", "device": "iPhone" }, { "theme": "iphone", "device": "other" } ] } ] }
- Themes, theme metadata files and theme set files can be stored within a widget collection (on a read-only basis) or at any level in the user hierarchy: site level, organization level, group level or individual user.