Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ember User Activity

Ember User Activity

An Ember Addon's eponymous lightning talk.

http://jhawk.co/ember-user-activity

Download this talk as a PDF to view the clickable links!

Jordan Hawker

May 21, 2016
Tweet

More Decks by Jordan Hawker

Other Decks in Technology

Transcript

  1. The Problem • Tracking user interactions globally throughout your application

    ◦ This is relatively easy on a per-component basis, and could be passed to a service ◦ However, waiting for browser events to bubble up through Ember is slow (ish) • Deciding whether or not a user is idle ◦ Lots of different ways a user can interact with your application ◦ Many third-party jQuery (or vanilla JS) libraries, none well-integrated with Ember
  2. A Solution Ember-User-Activity: http://jhawk.co/ember-user-activity • Capture events before bubbling occurs

    • Provide a service as an event bus for subscribers • Use these events to determine if a user is idle Demo: http://jhawk.co/ember-user-activity-demo
  3. What You Should Know • Original implementation was greedy and

    naive • v0.2.0 introduces several performance improvements ◦ requestAnimationFrame for capturing scroll activity ◦ Event throttling • Many opportunities to improve! ◦ Mobile-specific events ◦ Browser resizing ◦ activeElement ◦ RAF sleep mode + buffer ◦ More component mixins