User:Anaaktgeboren/SearchEngineSync: Difference between revisions

Line 70: Line 70:


== Draft Plan ==
== Draft Plan ==
* currently full of holes
* waiting on feed back
=== Spec ===
=== proposed data model for a plugin record v3 ===
* proposed data model for a plugin record (now out of date as I try to work in the wrinkles exposed by mobile/ux. See below for the v3 wip)
**  name, description, searchForm, iconurl, urls (very fat object on default engines), url values can be derived from openSearchRefObj
* data not being synced
** directory - machine specific
** lastModifiedTime - machine & directory specific. used to invalidate cache
** filepath - path to the xml, which wont exist since we arent syncing the xml and would be specific to a machine (where fx is installed, where profile is installed, etc)
* data model
<div style="background-color: #F0F0F0"><pre>
<div style="background-color: #F0F0F0"><pre>
{
{
   id // string id
   id // string id of the plugin usually looks like [app]google.xml
   name // similiar but different from the description
   guid // used for sync reconciliation
   alias // optional, if user has set keywords
   openSearchRefObj //the whole of the OpenSearch xml object json-ifed. Clients may pick & choose which bits of data they will use/store in their representation. The sync store however, will hold onto this, to prevent differing internal representations from causing data loss on other platforms. It also ensures sync can in the future gracefully support any future features that are covered by the OpenSearch spec but not by the current internal representations.
   order // optional if user has reordered engines
   age //age in unix time of the ref object (so if the ref object changes, we know which one to keep)
   hidden // optional, if user has 'deleted' a default engine, or an extensions had hidden a custom one.
   order // place in the global order (beware, even hidden engines have order)
   description // short description string
   aliases // may be [], array of search keywords associated with this plugin
   searchForm // exists
   isHidden // true if this engine should be globally disabled. Note some clients may treat some engines as 'removed' when they are actually disabled. (like desktop never actually removes the defaults even though the ui says it does)
   iconurl // the icon. found on defaults as well.  
   applicationIds // array of ids that this plugin should be installed on. [] if all platforms. (some plugins should not be installed on mobile, like desktop's google plugin, but others like twitter, are suitable for all platforms. Also leaves room for us to indicate a plugin meant for a subset, like mobile platforms {fennec, firefoxOS} and not desktop)
  urls  //a nice fat object for included ones, less so for custom probably
   locale //the locale of the plugin. Currently all plugins will have the same locale
   url // optional, not found on default
   installLocation // optional. if not present, this plugin is default [app] on desktop
   installLocation // optional. if not present, this plugin is default [app]
   type //optional, used to differentiate origins of plugins on desktop
   type //optional
   queryCharset // defaults on desktop do not have this, may be null
   queryCharset //optional
  isReadOnly //may be null
  readOnly // optional in the event that we sync readonly plugins in the future
  locale // currently all records should have the same value, but it is reasonable for in the future
    // for plugins to have different settings for this
 
}
}
</pre></div>
</pre></div>


* Not Syncing
=== High level Spec ===
** directory - machine specific
** lastModifiedTime - machine & directory specific. used to invalidate cache
** filepath - path to the xml, which wont exist since we arent syncing the xml and would be specific to a machine (where fx is installed, where profile is installed, etc)
 
* The OpenSearch plugins, ordering of search engines, keywords for search engines (both custom & default), and hidden flags (default engines only afaik) will be sync'ed across platforms (though the mobile client(s) will be written later)
* The OpenSearch plugins, ordering of search engines, keywords for search engines (both custom & default), and hidden flags (default engines only afaik) will be sync'ed across platforms (though the mobile client(s) will be written later)
** parts of default engines will be synced (such as ordering & keywords)   
** parts of default engines will be synced (such as ordering & keywords)   
Confirmed users
385

edits