-
Notifications
You must be signed in to change notification settings - Fork 2
Technical overview
this is a 2d draft, check if the 1st draft bellow should be merged into it?
missing classes: runtime package
-
Page - a set of layers which are visible at a given time
- getLayersArray() : Array
-
Layer - a set of groups which are always visible at the same time
- getGroups
- openGroup(rootGroup)
- closeGroup(rootGroup)
-
Publication
- start (targetPath = null, configData = null, groupData = null) - entry point of Silex application, called by the boot loader, which can have obtained GroupData or ConfigData by FlashVars, or hardcoded or read from a file
- setPath(uidsArray) - change the opened layers,
- getPath
-
Sequencer
- startSequence(callback,args) and endSequence(callback,args)
- doInNextFrame(callback,args) and doInNFrames(callback,args) and onEnterFrame(callback,args)
-
Config
- loadFromFile and saveToFile ?? in the publication ??
- getConfigData
- setConfigData
- duplicateConfigData
- toUntypedObject / toXML ?
- fromUntypedObject / fromXML ?
-
Context
- static globalContext
- addContextData, removeContextData
- isInContext(contextData = null)
-
Plugin
- static getInstalledPlugins
- static getActivatedPlugins
- load - load a given plugin
- init - the plugin can override methods of the core classes
- save - save the config in the config of the server or publication
-
Group
- static getGroup(componentOrGroup) : Group - retrieve the parent group of a component or group
- static rootGroup : Group
- static loadGroupData (group, callback)
- open, close
- toXML, fromXML
- getState - returns a GroupStateValue enum (opened, closed, loading)
- componentsArray
- groupsArray
- groupData
- domObject
- isTransversal
- hasSeparateFile
- isSeparateFileLoaded
-
Component - has a given class to instanciate, and data to push into the class
- static getMetaData(componentOrClass)
- static getComponent(class) : Component
- toXML and fromXML ??
- getComponentData
- setComponentData
- class : Class
- isVisual - if true, the component will be added to the display list automatically (can be done manually by the component), and be editable with the selection class
-
ConfigData
- publicationId
- scaleMode
- see org.silex.core.File (proxyForImages, proxyForData)
- ...
-
GroupData
- uid
- componentDataArray ( = null if group data is not available / not loaded yet )
- groupDataArray ( = null if group data is not available / not loaded yet )
-
ComponentData - contains the data coming from the group XML data, or from the descriptor (at creation stage)
- descriptorUID
- jsURL
- as3URL
- phpURL
- properties : Dynamic
- metaData : Dynamic
- UIDValue <=> String ??
-
PluginData - store the data related to a plugin
- ??
this is the first draft
- currentPage:Page
- sequencer:Sequencer
- name:String
- load(silexServerUrl:String, xmlFileName:String)
- groups:Array // first level groups, also called layers
- uid:UID
- addGroup(group:Group)
- componentProxies:Array
- groups:Array
- uid:UID
- domElement:DOMElement
- deeplink:String // may be null if it is not a "exclusive", see Yannick paper
- xmlFileName:String // may be null, see Yannick paper
- addGroup(group:Group)
- addComponentContainer(componentContainer:ComponentContainer)
- component:Component
- uid:UID // dynamically built at runtime, not stored in the group XML
- name:String
- className:String
- skinUrl:String
- metadata:Metadata // not "pushed": the Component instance may access it with a call to SilexAPI.getInstance().getComponentContainerOf(this).metadata
- properties:Dynamic // "pushed": the Component instance is supposed to have these attributes in "this"
- static load(domElement:DOMElement, className:String, name:String, skinUrl:String):ComponentContainer
- create the componentContainer:ComponentContainer
- if skinUrl is set
- create the component on the domElement (domElement.addComponent(component))
- load the skinUrl in the component (File.load(url,callback,args))
- else instanciate the class on the domElement (domElement.instantiateClass(className))
- static unload(component:Component)
- ??getConfigValue(key:String, deafault:Dynamic):Dynamic
- isInContext(context:String):Bool
- addContext(context:String)
- removeContext(context:String)
- addItem(item:Sequence)
- removeItem(item:Sequence)
- start()
- pause()
- clear()
- next()
- startCallback:Dynamic->Dynamic
- endCallback:Dynamic->Dynamic
- getCurrentPublication():Publication
- getCurrentPage():Page
- getPageOf(group:Group):Page
- getCurrentGroups():Array
- getCurrentGroupOf(componentContainer:ComponentContainer):Group
Methods used to retrieve a component container in a given page.
- getComponentContainerByName(name:String):ComponentContainer
- ?getComponentContainersByName(name:String):Array // in case there are several components with this name?
- getComponentContainerByUID(uid:UID):ComponentContainer
- getComponentContainerOf(component:Component):ComponentContainer
Shortcuts to getComponentContainer*() functions. It is equivalent to getComponentContainer*().container
- getComponentByName(name:String):Component
- ?getComponentsByName(name:String):Array // in case there are several components with this name?
- getComponentByUID(uid:UID):Component
This package is an abstraction layer, which aims at hiding DOM differencies accross platforms. It may be a separate project and go into haXe lib.
Could be php/neko, browser, projector/widget
yet to define
MC in as2, Class in as3, Object in js, Class in php, DIV with specific css class in HTML
Dynamic class with no mandatory method, nor mandatory attributes
- can be any class or dom element
- the properties of a Component are determined by its descriptor
- it can be loaded in a library or individually during browsing of the publication
MC in as2, MC or Sprite in as3, HTMLElement in js, DOMElement in php, DIV with specific css class in HTML
- instantiateClass(className:String) instanciate the class, call the instance with instanceName, attach it to the DOMElement object, i.e. to the dom
- addComponent(component:Component) attach the component to the dom and call the instance with instanceName
js/as, js/js, js/php, as/php
Handles file maipulation in php, js, as. Uses CommunicationChannel to communicate with the other platforms. And parses the data to object if required.
- load, preload, queue
- read/write,
- data, libraries, plugins, components
- json, xml, amf, haXe remoting, php file
Has these properties in js and as
- loadingQueue:Array
- isLoading:Bool
And these static methods
- load(url:String, format:Format, callback:Dynamic(data)->Dynamic(args)->void, args:Dynamic)
Format is an enum:
- unparsable / binary
- parsable
Stores all the platform related configuration, such as:
- does the File load/save json, xml, amf, haXe remoting, php file
useless:
- runtimeSide: SERVER_SIDE or CLIENT_SIDE
- runtimeName: php/neko, js, as2, as3, ...
- runtimeType: VM, browser, projector, widget
This is about open architecture, see [http://roy.gbiv.com/talks/200807_OpenArch_OSCON.pdf](Open Architecture Roy T. Fielding) and the discussion in the Discussions wiki page - the section about events.
To replace the following, we will introduce 2 concepts: the Substitution / Dynamic Override (at Runtime) and the Sequence
These are really important features wich are put into plugins, because they are not needed all the time, and they can easilly be done with plugins.
- Interpreter
- Deeplink
- AnimationLaout
- CoreComponents
- Tools
- Authentication
- Seo
- Client side and server side cache
libraries to use
- hxformat
- hxtml
libraries to build plugins with
- haxevideo
- hscript
- Screenweaver