Pancake/French Toast/Message API

< Pancake‎ | French Toast
Revision as of 18:27, 31 August 2012 by Gbrander (talk | contribs) (Added proposed solutions)

As a front-end developer, I need a way to tell the native app to open a new layer containing a specific layer state.

 FrenchToast.openApplicationView(url)

As a front-end developer, I need a way to tell the native app to open a URL in the viewer.

 FrenchToast.openPublicView(url)

I don't think we need the name parameter. I don't think we want layers to be able to talk directly to each other. Instead, I believe we can stick to a service-oriented architecture based on URLs. -Gbrander

As a front-end developer, I need the app to tell me when a layer has received focus so that I can check for updates and refresh data if necessary.

What about a DOM event?

 window.addEventListener('layerFocus', fn)

As a front-end developer, I need a way to securely verify that the user is authenticated so that I do not expose confidential information.

 // find out if the current session is valid
 FrenchToast.getSession()
 
 // to start browserid
 FrenchToast.startBrowserId(callback)
 
 // to validate the browserid token
 FrenchToast.validateBrowserIdReceipt(receipt, callback)

Can somebody who worked on the session stuff in the past verify that these could satisfy the user story? - Gbrander

As a front-end developer, I need access to a shared store that persists across sessions. All layers should have access to this store.

Use standard localStorage to serialize/deserialize persisted app data.

 window.localStorage
 JSON.stringify
 JSON.parse

Can we confirm that the same localStorage is available between UIWebViews - Gbrander