Slide 1

Slide 1 text

Ember User Activity Ember User Activity Jordan Hawker

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Usage

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

JordanHawker AxleHellfire elwayman02 www.JordanHawker.com Slides: jhawk.co/eua-lightning-slides