668
edits
| Line 18: | Line 18: | ||
* list of features and, for each one, a URL that handles it | * list of features and, for each one, a URL that handles it | ||
* an icon | * an icon | ||
=== Life Cycle === | |||
When a WebMod is needed for a particular feature, the WebMod Framework (WMF): | |||
* creates an IFRAME and loads the prescribed WebMod URL into it. | |||
* when the WebMod's page is fully loaded and ready, it messages the WMF (using a postMessage-based API) that it is ready. (Could this just be the onLoad() event? Maybe not, let's not presume.) | |||
* WMF and the WebMod then engage in user authentication (more below) | |||
* WMF sends additional messages to the WebMod to fulfill the actual feature. The pattern and structure of these messages depend on the specific feature being implemented. For F1, the specifics of the API are defined below. | |||
Importantly, WMF is just a channel to the available WebMods. The user interface that captures the user's data and intents and passes it to WebMods via WMF is ''specific to the requested feature''. In particular, F1 continues to control the complete UI, as diagrammed above. WMF and the WebMods are headless. | |||
=== Authentication === | === Authentication === | ||
Ideally, F1 would not get involved in authentication other than creating a window for it to happen in. The login window itself could use whatever mechanism it liked for storing the credentials (eg, in localstorage for that domain, a cookie, etc) and the service endpoint (hosted by the same domain as the login url) could read it. F1 need not make any policy decision about how and where anything related to authentication is stored. | Ideally, F1 would not get involved in authentication other than creating a window for it to happen in. The login window itself could use whatever mechanism it liked for storing the credentials (eg, in localstorage for that domain, a cookie, etc) and the service endpoint (hosted by the same domain as the login url) could read it. F1 need not make any policy decision about how and where anything related to authentication is stored. | ||
edits