KEMBAR78
Advanced webOS, Stanford | KEY
Advanced webOS
        Justin Tulloss
   Sr. Software Engineer
       April 24, 2010
Overview

• Multi-Stage basics
• Dashboards
• Popups
• Relaunching
• The Future
• Q&A
Why is this so complicated?
The web isn’t designed for multi-window apps


• Big departure from normal browser behavior
• webOS offers a lot of different interactions
• Performance issues led to complications
• Expected globals (document, window, etc.)
• Late recognition of the problem by Palm. Sorry.
Multi-
Stage
Things to consider

• Do you need another stage? Every time?
• What is the most appropriate stage type?

• How often do you rely on globals?
  • Prototype, jquery, document?
• What state is shared between children?
Basic APIs
From a scene assistant
Stage Types

• Card
• Dashboard
• Popup
Dashboard
s and
Example: MainAssistant
Example: DashboardStageAssistant
Example: Message View
Example: MessageAssistant
Popups
Some new twists

• Refactor child stage assistant to be generic
• Not all stylesheets are loaded
  • Some styles are changed to assume a notification
• Popups can have their height specified
• Closing child windows is easy
Example: New ChildStageAssistant
Example: Pushing dashboard scene
moved
Example: Creating a popup
Example: Popup scene
Example: Popup assistant
Example: Very simple popup
Relaunchin
g
Relaunching basics

• Certain actions cause your app to be “relaunched”
• The appManager service passes in arguments
• Your AppAssistant can change default launch
  behavior
• You should never have to worry about whether or
  not your app was already open
AppAssistant

• Shared across all child stages
• Handles relaunching
• Convenient place to stick shared state
  • Try not to share state.
Example: App Assistant
Example: Setting Default Stage
Example: Launch Parameters in
banner
The Future
Upcoming API improvements

• Default dashboards no longer require markup
  boilerplate
  • Just provide an icon, some text, and a count
  • Handles going from single item to multiple
• SingletonStages
  • No more stageProxy shenanigans.
  • Failure cases are handled more elegantly
Q &A
Advanced webOS, Stanford

Advanced webOS, Stanford

Editor's Notes

  • #4 Leaving a lot of time for Q&A.
  • #18 Works for both dashboards and popups