canmove, Confirmed users
640
edits
(Editing concepts.) |
|||
Line 64: | Line 64: | ||
=== Sessions === | === Sessions === | ||
Sessions are essentially scopes. They are meant to give context to events; this allows events to be more | Sessions are essentially scopes. They are meant to give context to events; this allows events to be simpler and more reusable. Sessions are usually bound to some component of the UI, some user action with a duration, or some transient state. | ||
For example, a session might be begun when a user begins interacting with the UI component, and stopped when the interaction ends. | For example, a session might be begun when a user begins interacting with the UI component, and stopped when the interaction ends. Or a session might encapsulate period of no network connectivity, the first five seconds after the browser launched, the time spent with an active download, or a guest mode session. | ||
Sessions implicitly record the duration of the interaction. | |||
A simple use-case for sessions is the bookmarks panel in about:home. We start a session when the user swipes into the panel, and stop it when they swipe away. This bookmarks session does two things: firstly, it gives scope to any generic event that may occur within the panel (e.g., loading a URL). Secondly, it allows us to figure out how much time users are spending in the bookmarks panel. | A simple use-case for sessions is the bookmarks panel in about:home. We start a session when the user swipes into the panel, and stop it when they swipe away. This bookmarks session does two things: firstly, it gives scope to any generic event that may occur within the panel (e.g., loading a URL). Secondly, it allows us to figure out how much time users are spending in the bookmarks panel. |