SlideShare a Scribd company logo
Adaptive + Ember
Taking an ambitious app mobile
Who Am I?
• Former working artist & web dev
bootcamp instructor @featherart
• First awful web page: 1995
• Currently working on an internal app for
Marketing
• Using Ember for ~ 1 year
• At Netflix for nearly 2 years, still only
Feather
What is VanDAM?
• ‘Digital Asset Manager’ = DAM
• Storage facility for all Marketing
assets
• Place where Marketing can chat
about, share & create groupings of
assets
• Replaced several spreadsheets and
a few clunky pieces of software
History
• Two years ago: 1 engineer,
deployed on Heroku
• Rails SPA with lots of embedded
JQuery
• Basically a repo for assets
• App could go down for deploys
Today
• Rails API, ElasticSearch
• Ember CLI app for front end
• Repo for assets, but also chat with
WYSIWYG editor, @mentions, folders, …
• 5 full time engineers, 2 PM’s, 2 designers
• No downtime
• Growing external use
The role of marketing is increasingly
important with more original content
Going Mobile
• More external & non-technical
users
• Celeb tweets
• Talent uses to view set photos
• Public share links
Demo time
Adaptive vs. Responsive
• First mobile site, designed for art
festivals
• Designed like coffee table book -
everyone sees same content but
may navigate differently
• VanDAM - magic Hogwarts book!
Endless personalized content,
buttons, labyrinth of permissions,
favorites, chats, etc.
Responsive
• Same content rendered everywhere, mobile breakpoints in CSS
to style for smaller screens
• display: none or visibility: hidden to remove objects
from DOM, most screens will ignore hidden DOM elements
• May use touch events to add specific CSS for mobile
$(function(){
// True if this is a touch device
if ('ontouchstart' in window) {
$('body').removeClass('no-touch').addClass('touch');
}
});
Adaptive
• Adaptive app will have different,
usually more limited, content for
mobile
• Ember app full of computed properties
(but not observers, we hope!)
• Don’t want those to compute, unless
you are rendering content they are
computing for
Approach
• Separate templates for mobile and desktop (esp. green fielding) to
occlude content on mobile devices
• Optimized CSS: ‘The fewer rules required to check for a given
element, the faster style resolution will be’
• class selectors rather than universal selectors, scoped
stylesheets, judicial use of absolute positioning + fixed widths
• display: flex: ‘The defining aspect of the flex layout is the
ability to alter its items' width and/or height to best fill the available
space on any display device. A flex container expands items to fill
available free space, or shrinks them to prevent overflow.’
• Ember components specifically for mobile widgets
Flexbox then…
the best way
to center a div
within a
circular div
OR
the only way
to write the
magic 8-ball
app of your
dreams
Our Approach
• Taking application mobile in piecemeal fashion - small
changes to prevent downtime and disruption
• Same templates, with if/else and unless
statements to occlude desktop-only content
• Pared down functionality for mobile
• Flexbox, scoped stylesheets, class selectors
• Creation of mobile specific components that replace
desktop equivalents, passing data down
Wait a minute, ‘occlude’?!
occlude:
verb past tense: occluded; past participle: occluded
1. Stop, close up, or obstruct (an opening, orifice, or passage).
“a blood clot has occluded the coronary artery”
origin: late 16th century: from Latin occludere ‘shut up.’
basically, prevent content from rendering.
More specifically…
• Service provided by ember-screen to listen for
screen size and/or device
• Inject screen into component
isMobileSM: breakpoint('(max-width: 600px)'),
isPhablet: breakpoint('(max-width: 750px)'),
…,
isMobile: /iPad|Android/i.test(navigator.userAgent),
var screen: Ember.inject.service(‘screen');
screen.js
• breakpoint variable is given to you by the screen service
• by default only listens to screen size, won’t actually make
distinction between device types
• isMobile & isTablet added, so functionality can be divided
down to phone vs/tablet
Use screen variables in
templates to occlude
like you’ve never occluded before
{{#unless session.isAuthenticated}}
{{!—- ember truth helpers helping here —-}}
{{#if (and screen.isMobile (not screen.isTablet))}}
a.mobile-login {click=‘logInMobile’} Login
{{#else }}
{{!—- desktop & tablet login —-}}
{{/if}}
{{/unless}}
Mobile Components
• Handy for putting mobile styling in a scoped stylesheet & assigning
actions specific to mobile
• Have own templates already, so fewer if/else in already crowded template
• Data already in template, can just pass it down
• Assign a CSS class for positioning within page - much more efficient than
a universal selector
{{#if screen.isMobile}}
{{ metadata-mobile model=model class=“mobile-metadata” click=“open” }}
{{#else}}
{{ metadata model=model }}
{{/if}}
more about flexi
“With flexi, you can separate your markup into separate
layout files for each breakpoint size as needed.”
- gives layout specific templates for routes and components
- no need for mobile components or if/else branching in
templates
- also has layout service you can inject, similar to ember-
screen
- built-in grid system, flexbox layout components so you can
position elements declaratively
Next Project
• Mobile First design
• Separate templates via flexi layouts
• Start with optimized CSS
• USE FLEXI
Questions? Answers?
Tools Used
• ember-screen and ember-hammertime add-ons
• flexbox to give items flexible arrangement on page
• Chrome & Safari dev tools for debugging
• CSS to make Safari think outside the button tag, in
application.css
[data-ember-action], a, button, input, .link {
cursor: pointer;
}
Perhaps Useful Links
• Flexbox documentation on MDN
• Flexbox specification
• Efficient CSS documentation on MDN
• EmberHammertime by Chris Thoburn
• EmberScreen add-on by Mitch Lloyd
• Flexi, by Chris Thoburn
• Smoke and Mirrors, by Chris Thoburn
• EmberGestures, also by Chris Thoburn
• Ember Truth Helpers, by James Murphy
• Magic 8-ball

More Related Content

PDF
Ios7 - The good the bad & the changes
Chrissy Welsh
 
PDF
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
Luc Bors
 
PPTX
Full stack accessibility
Rhiana Heppenstall
 
PPTX
Full stack accessibility
Rhiana Heppenstall
 
PPTX
Chapter4 mo
Pon Tovave
 
PDF
Introducing Responsive Web Design
glvsav37
 
PPTX
Building mobile apps with PhoneGap and Titanium appcelerator
Chris Ward
 
PPTX
Adobe Captivate 7 and All Things Mobile
Lodestone
 
Ios7 - The good the bad & the changes
Chrissy Welsh
 
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
Luc Bors
 
Full stack accessibility
Rhiana Heppenstall
 
Full stack accessibility
Rhiana Heppenstall
 
Chapter4 mo
Pon Tovave
 
Introducing Responsive Web Design
glvsav37
 
Building mobile apps with PhoneGap and Titanium appcelerator
Chris Ward
 
Adobe Captivate 7 and All Things Mobile
Lodestone
 

What's hot (12)

PPTX
React native starter
Nhan Cao
 
PDF
Mobile web vs. native apps: It's not about technology, it's about psychology
iQcontent
 
PDF
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina
WSO2
 
PPTX
Professions, jobs
Svetlana Krasnoselskaya
 
PDF
Resume_ Drew Travis
Drew Travis
 
PDF
«The Grail: React based Isomorph apps framework»​
FDConf
 
PDF
Reach new business heights with Eleks Localization
Katia Kosovan
 
PDF
«I knew there had to be a better way to build mobile app»​
FDConf
 
PPTX
AIA2018 - Janno Stern - Intro To Product Sprint
European Innovation Academy
 
PPTX
Flutter by Shubham
DignitasDigital1
 
PPTX
Xamarin.Forms
Egor Bogatov
 
PPTX
Integrated Property Management
Desh Kapoor
 
React native starter
Nhan Cao
 
Mobile web vs. native apps: It's not about technology, it's about psychology
iQcontent
 
[WSO2Con EU 2017] Manipulating XML, JSON and SQL Data Types with Ballerina
WSO2
 
Professions, jobs
Svetlana Krasnoselskaya
 
Resume_ Drew Travis
Drew Travis
 
«The Grail: React based Isomorph apps framework»​
FDConf
 
Reach new business heights with Eleks Localization
Katia Kosovan
 
«I knew there had to be a better way to build mobile app»​
FDConf
 
AIA2018 - Janno Stern - Intro To Product Sprint
European Innovation Academy
 
Flutter by Shubham
DignitasDigital1
 
Xamarin.Forms
Egor Bogatov
 
Integrated Property Management
Desh Kapoor
 
Ad

Viewers also liked (15)

PPTX
Efeito De Texto Grama De Madeira
Vimar Soares
 
PDF
Dh international final
Ben Meqemeja
 
PPTX
photoshop CS6 - texto metálico
nicholas boing
 
PDF
Body Count - Casualty Figures after 10 Years of the “War on Terror”
Lex Pit
 
PPTX
Unit 2 spanish
Fifthgrademiss
 
PPTX
Ss5 u6-spanish
Fifthgrademiss
 
PDF
Ss5 m1-poster
Fifthgrademiss
 
PPTX
Ss5 u5-spanish
Fifthgrademiss
 
PPTX
Ss5 u4 spanish
Fifthgrademiss
 
PPTX
встреча со специалистами «центра медицинской профилактики»
Валентина Нелина
 
PPTX
познавательно игровая программа « к космическим далям вперед!».
Валентина Нелина
 
DOCX
Ficha feudalismo
Antonio Jimenez
 
DOCX
Ficha tiempo historico
Antonio Jimenez
 
PPT
La cuestion social en chile
Antonio Jimenez
 
Efeito De Texto Grama De Madeira
Vimar Soares
 
Dh international final
Ben Meqemeja
 
photoshop CS6 - texto metálico
nicholas boing
 
Body Count - Casualty Figures after 10 Years of the “War on Terror”
Lex Pit
 
Unit 2 spanish
Fifthgrademiss
 
Ss5 u6-spanish
Fifthgrademiss
 
Ss5 m1-poster
Fifthgrademiss
 
Ss5 u5-spanish
Fifthgrademiss
 
Ss5 u4 spanish
Fifthgrademiss
 
встреча со специалистами «центра медицинской профилактики»
Валентина Нелина
 
познавательно игровая программа « к космическим далям вперед!».
Валентина Нелина
 
Ficha feudalismo
Antonio Jimenez
 
Ficha tiempo historico
Antonio Jimenez
 
La cuestion social en chile
Antonio Jimenez
 
Ad

Similar to Building an Adaptive App in Ember (20)

PDF
Doag wysiwyg
Luc Bors
 
PPTX
Neil Perlin - We're Going Mobile! Great! Are We Ready?
LavaConConference
 
PDF
University of Portsmouth Library: A practical approach to Responsive Design
Terminalfour
 
PPTX
We’re Going Mobile! Great! Wait… What Does That Mean?
STC-Philadelphia Metro Chapter
 
PPTX
Responsive Web Design
Julia Vi
 
PDF
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
Luc Bors
 
PDF
Oracle and Mobile, From Design to Device; The tools that make it happen - Use...
Getting value from IoT, Integration and Data Analytics
 
PDF
Responsive Web Design - Tom Robertshaw
Meet Magento Spain
 
PDF
UX design for every screen
Four Kitchens
 
PPTX
Mobile Best Practices
mintersam
 
PPTX
Mobile application development PowerPoin
NEC
 
PDF
Designing and Theming Drupal for Mobile Devices
David Lanier
 
ODP
Mobilizing your Drupal Site - Vancouver League of Drupallers
baronmunchowsen
 
PDF
Customizing ERModernLook Applications
WO Community
 
PDF
The Developers World
Ronald Northrip
 
PPTX
Beautiful UI in react native By - nativebase.io
Geekyants
 
PPTX
Mobile web in eZ Publish
Igor Vrdoljak
 
PPTX
This is not a talk about sharepoint 2013
Kevin Davis
 
PDF
Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Ma...
Infinum
 
PDF
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 
Doag wysiwyg
Luc Bors
 
Neil Perlin - We're Going Mobile! Great! Are We Ready?
LavaConConference
 
University of Portsmouth Library: A practical approach to Responsive Design
Terminalfour
 
We’re Going Mobile! Great! Wait… What Does That Mean?
STC-Philadelphia Metro Chapter
 
Responsive Web Design
Julia Vi
 
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
Luc Bors
 
Oracle and Mobile, From Design to Device; The tools that make it happen - Use...
Getting value from IoT, Integration and Data Analytics
 
Responsive Web Design - Tom Robertshaw
Meet Magento Spain
 
UX design for every screen
Four Kitchens
 
Mobile Best Practices
mintersam
 
Mobile application development PowerPoin
NEC
 
Designing and Theming Drupal for Mobile Devices
David Lanier
 
Mobilizing your Drupal Site - Vancouver League of Drupallers
baronmunchowsen
 
Customizing ERModernLook Applications
WO Community
 
The Developers World
Ronald Northrip
 
Beautiful UI in react native By - nativebase.io
Geekyants
 
Mobile web in eZ Publish
Igor Vrdoljak
 
This is not a talk about sharepoint 2013
Kevin Davis
 
Infinum android talks #12 - Google IO report: Milkshakes, Marshmallows and Ma...
Infinum
 
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 

Recently uploaded (20)

PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Doc9.....................................
SofiaCollazos
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 

Building an Adaptive App in Ember

  • 1. Adaptive + Ember Taking an ambitious app mobile
  • 2. Who Am I? • Former working artist & web dev bootcamp instructor @featherart • First awful web page: 1995 • Currently working on an internal app for Marketing • Using Ember for ~ 1 year • At Netflix for nearly 2 years, still only Feather
  • 3. What is VanDAM? • ‘Digital Asset Manager’ = DAM • Storage facility for all Marketing assets • Place where Marketing can chat about, share & create groupings of assets • Replaced several spreadsheets and a few clunky pieces of software
  • 4. History • Two years ago: 1 engineer, deployed on Heroku • Rails SPA with lots of embedded JQuery • Basically a repo for assets • App could go down for deploys
  • 5. Today • Rails API, ElasticSearch • Ember CLI app for front end • Repo for assets, but also chat with WYSIWYG editor, @mentions, folders, … • 5 full time engineers, 2 PM’s, 2 designers • No downtime • Growing external use
  • 6. The role of marketing is increasingly important with more original content
  • 7. Going Mobile • More external & non-technical users • Celeb tweets • Talent uses to view set photos • Public share links
  • 9. Adaptive vs. Responsive • First mobile site, designed for art festivals • Designed like coffee table book - everyone sees same content but may navigate differently • VanDAM - magic Hogwarts book! Endless personalized content, buttons, labyrinth of permissions, favorites, chats, etc.
  • 10. Responsive • Same content rendered everywhere, mobile breakpoints in CSS to style for smaller screens • display: none or visibility: hidden to remove objects from DOM, most screens will ignore hidden DOM elements • May use touch events to add specific CSS for mobile $(function(){ // True if this is a touch device if ('ontouchstart' in window) { $('body').removeClass('no-touch').addClass('touch'); } });
  • 11. Adaptive • Adaptive app will have different, usually more limited, content for mobile • Ember app full of computed properties (but not observers, we hope!) • Don’t want those to compute, unless you are rendering content they are computing for
  • 12. Approach • Separate templates for mobile and desktop (esp. green fielding) to occlude content on mobile devices • Optimized CSS: ‘The fewer rules required to check for a given element, the faster style resolution will be’ • class selectors rather than universal selectors, scoped stylesheets, judicial use of absolute positioning + fixed widths • display: flex: ‘The defining aspect of the flex layout is the ability to alter its items' width and/or height to best fill the available space on any display device. A flex container expands items to fill available free space, or shrinks them to prevent overflow.’ • Ember components specifically for mobile widgets
  • 13. Flexbox then… the best way to center a div within a circular div OR the only way to write the magic 8-ball app of your dreams
  • 14. Our Approach • Taking application mobile in piecemeal fashion - small changes to prevent downtime and disruption • Same templates, with if/else and unless statements to occlude desktop-only content • Pared down functionality for mobile • Flexbox, scoped stylesheets, class selectors • Creation of mobile specific components that replace desktop equivalents, passing data down
  • 15. Wait a minute, ‘occlude’?! occlude: verb past tense: occluded; past participle: occluded 1. Stop, close up, or obstruct (an opening, orifice, or passage). “a blood clot has occluded the coronary artery” origin: late 16th century: from Latin occludere ‘shut up.’ basically, prevent content from rendering.
  • 16. More specifically… • Service provided by ember-screen to listen for screen size and/or device • Inject screen into component isMobileSM: breakpoint('(max-width: 600px)'), isPhablet: breakpoint('(max-width: 750px)'), …, isMobile: /iPad|Android/i.test(navigator.userAgent), var screen: Ember.inject.service(‘screen');
  • 17. screen.js • breakpoint variable is given to you by the screen service • by default only listens to screen size, won’t actually make distinction between device types • isMobile & isTablet added, so functionality can be divided down to phone vs/tablet
  • 18. Use screen variables in templates to occlude like you’ve never occluded before {{#unless session.isAuthenticated}} {{!—- ember truth helpers helping here —-}} {{#if (and screen.isMobile (not screen.isTablet))}} a.mobile-login {click=‘logInMobile’} Login {{#else }} {{!—- desktop & tablet login —-}} {{/if}} {{/unless}}
  • 19. Mobile Components • Handy for putting mobile styling in a scoped stylesheet & assigning actions specific to mobile • Have own templates already, so fewer if/else in already crowded template • Data already in template, can just pass it down • Assign a CSS class for positioning within page - much more efficient than a universal selector {{#if screen.isMobile}} {{ metadata-mobile model=model class=“mobile-metadata” click=“open” }} {{#else}} {{ metadata model=model }} {{/if}}
  • 20. more about flexi “With flexi, you can separate your markup into separate layout files for each breakpoint size as needed.” - gives layout specific templates for routes and components - no need for mobile components or if/else branching in templates - also has layout service you can inject, similar to ember- screen - built-in grid system, flexbox layout components so you can position elements declaratively
  • 21. Next Project • Mobile First design • Separate templates via flexi layouts • Start with optimized CSS • USE FLEXI
  • 23. Tools Used • ember-screen and ember-hammertime add-ons • flexbox to give items flexible arrangement on page • Chrome & Safari dev tools for debugging • CSS to make Safari think outside the button tag, in application.css [data-ember-action], a, button, input, .link { cursor: pointer; }
  • 24. Perhaps Useful Links • Flexbox documentation on MDN • Flexbox specification • Efficient CSS documentation on MDN • EmberHammertime by Chris Thoburn • EmberScreen add-on by Mitch Lloyd • Flexi, by Chris Thoburn • Smoke and Mirrors, by Chris Thoburn • EmberGestures, also by Chris Thoburn • Ember Truth Helpers, by James Murphy • Magic 8-ball