SlideShare una empresa de Scribd logo
1 de 54
Descargar para leer sin conexión
Creating a Responsive Website From
Scratch
Creating a Responsive
Website From Scratch
• Corky Brown – Application Architect; ~9 years at
MeetMe.com; back- and front-end development
• Javier Barreto – Web developer; 8 years; mostly
back-end, more recently front-end
• Bill Sykes – Web developer; new to MeetMe, 10
years experience back- and front-end
Creating a Responsive
Website From Scratch
Something’s missing…
• User has a smartphone
• First time visiting meetme.com
• Does not want the native app
• Cannot install the native app
Why?
• Users get…
• Modern, native-ish experience
• Feature parity with native apps
• MeetMe gets…
• Better engagement
• Better monetization
• Feature parity with native apps
• Single server-side API
• Work off-loaded to the clients
Everybody wins!
What’s the catch?
“Responsive website”
Phoenix
“From scratch”
6 months later…
Why make it from scratch?
• Current website is years upon years of legacy
code.
• Easier to work with new libraries and tools
• Great chance to reimagine our entire development
process
• Development will be faster
Phoenix
Goals
• One website to manage – mobile, desktop, in between
• Many servers -> one (redundant) server + CDN
• Use Mobile API
• Leverage open source community
• Support smartphone browser+OS+device
combinations that use MeetMe
• Organize into releases Phoenix
Organize Into Releases
• Better tracking of bugs & features historically
• Keeps team focused
• Brings us in-line with the native mobile apps
• Use semantic versioning (semver.org)
Phoenix
Focuses
Focuses
• Support as many users as quickly as possible
• Fast development
• Well-scoped code
• Documentation
• Standards
• Testing
• Automated builds
Support as many users as
quickly as possible
• Focus on top browser & OS (Chrome on Android)
first, ignore others.
• Gamble: one browser will give us a great
foundation for the next and it should get easier as
we go along (more on this later).
Fast Development
• Get end-to-end as soon as possible, optimize
going forward
• Dev -> Staging -> Production
• As we optimize this workflow and add tests, we can
push faster
Well-Scoped Code
• Let good code thrive
• Minimize scope of compromises
• Feature and bug detection, not browser detection
Documentation
• jsdoc
• auto-generate
• require in code review
Standards
• Style
• Best practices
• Pick an existing standard
• jslint/jshint
• Google’s docs for style and annotation
Testing
• Unit tests (jasmine + karma)
• Behavior tests (cucumber + ruby or js)
• Builds auto-generated for QA at URL (with QR
code from http://goqr.me/)
Automated Builds
• Continuous Integration
• Jenkins CI (jenkins-ci.org)
• Grunt.js (gruntjs.com)
Non-Focuses
Non-Focuses
• Clients that we don’t support
• Performance (to a degree)
• SEO
Performance
• (to a degree)
• Trust that QA will report performance issues (and
they did)
• Devices we are targeting can handle what we’re
doing (nothing too intensive)
• Browsers and OSes dedicate a lot to JS and CSS
processing
SEO
• Common problem for “single page dynamic
websites”.
• Our current mobile site is crawled & “Mobile-
friendly”, according to Google. We redirect
supported clients from there to touch.meetme.com.
• We can skip and revisit later
Principles & Practices
Principles & Practices
• Well-scoped code
• Leverage third-party and open source libraries and
tools (Bill)
• Tools for responsive and mobile web development
(Javier)
Well-Scoped Code
requirejs or equivalent (browserify)
// js/lib/models/member/MemberPrivacyModel.js



define([‘lodash', 'Backbone'], function(_, Backbone) {
'use strict’;
return function() {

//

};
});
Well-Scoped Code
Say What You Do

(Not Why You Do It)

(And Not How You Do It)
// js/lib/helpers/RequestHelper.js



var errorsToHandle = {
'MemberException' : {
'code_1' : displayLoginModal
},

//

};
Well-Scoped Code
Say What You Do

(Not Why You Do It)

(And Not How You Do It)
// js/lib/helpers/RequestHelper.js



var errorsToHandle = {
'MemberException' : {
'code_1' : requestUserAuthentication
},

//

};
Well-Scoped Code
Do it the “right” way first (HTML5 and community accepted)

Keep “fixes” in one function or variable and gracefully fall back
http://caniuse.com/#feat=flexbox
Well-Scoped Code
Do it the “right” way first (HTML5 and community accepted)

Keep “fixes” in one function or variable and gracefully fall back
// less/mixins/flex.less



.flex-display {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
}
Well-Scoped Code
Do it the “right” way first (HTML5 and community accepted)

Keep “fixes” in one function or variable and gracefully fall back
Detect bugs and features, not browsers and devices (modernizr.com)
When the browser or device manufacturer fixes the bug, your code
should still work
Third-Party, Open Source
• Bootstrap (getbootstrap.com) – responsive UI
• Backbone (backbonejs.org) – models, collections, views, router
• Lodash (lodash.com) – utility library
• Grunt (gruntjs.com) – task runner
• LESS (lesscss.org) – dynamic CSS
• Handlebars (handlebarsjs.com) – templating
• requirejs (requirejs.org) – module & scope management
Leverage third-party and
open source libraries and
tools (Bill)
Tools for responsive and
mobile web development
(Javier)
Lessons
Lessons
• Browsers: quirkier than we imagined
• Some bugs cannot be detected (or not easily).
Treat as though you did detect it!
• Can’t reliably detect device
The Future
• Revisit
• SEO
• Render on server first (Rendr, et al.)
• File size & number of requests
• Performance
• Improvements
• React
Questions?

Más contenido relacionado

La actualidad más candente

The Thick Front-End
The Thick Front-EndThe Thick Front-End
The Thick Front-End
Jeff Dickey
 
jQuery 1.4-1.6 Best new features
jQuery 1.4-1.6 Best new featuresjQuery 1.4-1.6 Best new features
jQuery 1.4-1.6 Best new features
Ryan Blunden
 

La actualidad más candente (20)

SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
Geb for testing your grails application
Geb for testing your grails applicationGeb for testing your grails application
Geb for testing your grails application
 
The Thick Front-End
The Thick Front-EndThe Thick Front-End
The Thick Front-End
 
Blazor - .NET in the Browser!
Blazor - .NET in the Browser!Blazor - .NET in the Browser!
Blazor - .NET in the Browser!
 
Metaprogramming Go
Metaprogramming GoMetaprogramming Go
Metaprogramming Go
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2
 
jQuery 1.4-1.6 Best new features
jQuery 1.4-1.6 Best new featuresjQuery 1.4-1.6 Best new features
jQuery 1.4-1.6 Best new features
 
PyCon PL 2014 executable api
PyCon PL 2014   executable apiPyCon PL 2014   executable api
PyCon PL 2014 executable api
 
Getting started with mobile application development
Getting started with mobile application developmentGetting started with mobile application development
Getting started with mobile application development
 
Measuring Front-End Performance - What, When and How?
Measuring Front-End Performance - What, When and How?Measuring Front-End Performance - What, When and How?
Measuring Front-End Performance - What, When and How?
 
Optimizing Your Site for Holiday Traffic
Optimizing Your Site for Holiday TrafficOptimizing Your Site for Holiday Traffic
Optimizing Your Site for Holiday Traffic
 
Lighthouse custom audits - London Web Performance 2019
Lighthouse custom audits -  London Web Performance 2019Lighthouse custom audits -  London Web Performance 2019
Lighthouse custom audits - London Web Performance 2019
 
Back to the ng2 Future
Back to the ng2 FutureBack to the ng2 Future
Back to the ng2 Future
 
Advanced AngularJS Tips and Tricks
Advanced AngularJS Tips and TricksAdvanced AngularJS Tips and Tricks
Advanced AngularJS Tips and Tricks
 
Frontend as a first class citizen
Frontend as a first class citizenFrontend as a first class citizen
Frontend as a first class citizen
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
The WordPress REST API as a Springboard for Website Greatness
The WordPress REST API as a Springboard for Website GreatnessThe WordPress REST API as a Springboard for Website Greatness
The WordPress REST API as a Springboard for Website Greatness
 
3 Gifts My Users Gave Me - Alexandra Draghici - WordCamp Europe 2017
3 Gifts My Users Gave Me - Alexandra Draghici - WordCamp Europe 20173 Gifts My Users Gave Me - Alexandra Draghici - WordCamp Europe 2017
3 Gifts My Users Gave Me - Alexandra Draghici - WordCamp Europe 2017
 
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie DilsThe Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
 
Angular from a Different Angle
Angular from a Different AngleAngular from a Different Angle
Angular from a Different Angle
 

Destacado

usability evaluation: educational website yahoo kids and infoplase.com homewo...
usability evaluation: educational website yahoo kids and infoplase.com homewo...usability evaluation: educational website yahoo kids and infoplase.com homewo...
usability evaluation: educational website yahoo kids and infoplase.com homewo...
Angelica Angelo Ocon
 

Destacado (10)

Developing An Online Marketing Plan (Phase 1)
Developing An Online Marketing Plan (Phase 1)Developing An Online Marketing Plan (Phase 1)
Developing An Online Marketing Plan (Phase 1)
 
Kids are free 2014 15 website
Kids are free 2014 15 websiteKids are free 2014 15 website
Kids are free 2014 15 website
 
Website Structure kids CS
Website Structure kids CSWebsite Structure kids CS
Website Structure kids CS
 
RESPONSIVE WEB DESIGN
RESPONSIVE WEB DESIGNRESPONSIVE WEB DESIGN
RESPONSIVE WEB DESIGN
 
How to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteHow to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive Website
 
usability evaluation: educational website yahoo kids and infoplase.com homewo...
usability evaluation: educational website yahoo kids and infoplase.com homewo...usability evaluation: educational website yahoo kids and infoplase.com homewo...
usability evaluation: educational website yahoo kids and infoplase.com homewo...
 
Evaluating Websites For Learners
Evaluating Websites For LearnersEvaluating Websites For Learners
Evaluating Websites For Learners
 
Web Development on Web Project Report
Web Development on Web Project ReportWeb Development on Web Project Report
Web Development on Web Project Report
 
Web Design Project Report
Web Design Project ReportWeb Design Project Report
Web Design Project Report
 
Sample Website Proposal Presentation
Sample Website Proposal PresentationSample Website Proposal Presentation
Sample Website Proposal Presentation
 

Similar a Creating a Responsive Website From Scratch

Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
Ganesh Kondal
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
dmethvin
 

Similar a Creating a Responsive Website From Scratch (20)

Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)
 
Stapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San FranciscoStapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San Francisco
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building Products
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Performance and Scalability Art of Isomorphic React Applications
Performance and Scalability Art of Isomorphic React ApplicationsPerformance and Scalability Art of Isomorphic React Applications
Performance and Scalability Art of Isomorphic React Applications
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth element
 
Seminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web ProgrammerSeminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web Programmer
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the Enterprise
 
How to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseHow to generate customized java 8 code from your database
How to generate customized java 8 code from your database
 
Silicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your databaseSilicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your database
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Creating a Responsive Website From Scratch

  • 1. Creating a Responsive Website From Scratch
  • 2. Creating a Responsive Website From Scratch • Corky Brown – Application Architect; ~9 years at MeetMe.com; back- and front-end development • Javier Barreto – Web developer; 8 years; mostly back-end, more recently front-end • Bill Sykes – Web developer; new to MeetMe, 10 years experience back- and front-end
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Something’s missing… • User has a smartphone • First time visiting meetme.com • Does not want the native app • Cannot install the native app
  • 12.
  • 13. Why? • Users get… • Modern, native-ish experience • Feature parity with native apps • MeetMe gets… • Better engagement • Better monetization • Feature parity with native apps • Single server-side API • Work off-loaded to the clients
  • 16.
  • 17.
  • 19.
  • 21.
  • 23.
  • 24. Why make it from scratch? • Current website is years upon years of legacy code. • Easier to work with new libraries and tools • Great chance to reimagine our entire development process • Development will be faster Phoenix
  • 25. Goals • One website to manage – mobile, desktop, in between • Many servers -> one (redundant) server + CDN • Use Mobile API • Leverage open source community • Support smartphone browser+OS+device combinations that use MeetMe • Organize into releases Phoenix
  • 26. Organize Into Releases • Better tracking of bugs & features historically • Keeps team focused • Brings us in-line with the native mobile apps • Use semantic versioning (semver.org) Phoenix
  • 28. Focuses • Support as many users as quickly as possible • Fast development • Well-scoped code • Documentation • Standards • Testing • Automated builds
  • 29. Support as many users as quickly as possible • Focus on top browser & OS (Chrome on Android) first, ignore others. • Gamble: one browser will give us a great foundation for the next and it should get easier as we go along (more on this later).
  • 30. Fast Development • Get end-to-end as soon as possible, optimize going forward • Dev -> Staging -> Production • As we optimize this workflow and add tests, we can push faster
  • 31. Well-Scoped Code • Let good code thrive • Minimize scope of compromises • Feature and bug detection, not browser detection
  • 33. Standards • Style • Best practices • Pick an existing standard • jslint/jshint • Google’s docs for style and annotation
  • 34. Testing • Unit tests (jasmine + karma) • Behavior tests (cucumber + ruby or js) • Builds auto-generated for QA at URL (with QR code from http://goqr.me/)
  • 35. Automated Builds • Continuous Integration • Jenkins CI (jenkins-ci.org) • Grunt.js (gruntjs.com)
  • 37. Non-Focuses • Clients that we don’t support • Performance (to a degree) • SEO
  • 38. Performance • (to a degree) • Trust that QA will report performance issues (and they did) • Devices we are targeting can handle what we’re doing (nothing too intensive) • Browsers and OSes dedicate a lot to JS and CSS processing
  • 39. SEO • Common problem for “single page dynamic websites”. • Our current mobile site is crawled & “Mobile- friendly”, according to Google. We redirect supported clients from there to touch.meetme.com. • We can skip and revisit later
  • 41. Principles & Practices • Well-scoped code • Leverage third-party and open source libraries and tools (Bill) • Tools for responsive and mobile web development (Javier)
  • 42. Well-Scoped Code requirejs or equivalent (browserify) // js/lib/models/member/MemberPrivacyModel.js
 
 define([‘lodash', 'Backbone'], function(_, Backbone) { 'use strict’; return function() {
 //
 }; });
  • 43. Well-Scoped Code Say What You Do
 (Not Why You Do It)
 (And Not How You Do It) // js/lib/helpers/RequestHelper.js
 
 var errorsToHandle = { 'MemberException' : { 'code_1' : displayLoginModal },
 //
 };
  • 44. Well-Scoped Code Say What You Do
 (Not Why You Do It)
 (And Not How You Do It) // js/lib/helpers/RequestHelper.js
 
 var errorsToHandle = { 'MemberException' : { 'code_1' : requestUserAuthentication },
 //
 };
  • 45. Well-Scoped Code Do it the “right” way first (HTML5 and community accepted)
 Keep “fixes” in one function or variable and gracefully fall back http://caniuse.com/#feat=flexbox
  • 46. Well-Scoped Code Do it the “right” way first (HTML5 and community accepted)
 Keep “fixes” in one function or variable and gracefully fall back // less/mixins/flex.less
 
 .flex-display { display: -webkit-flex; display: -moz-flex; display: -ms-flex; display: -o-flex; display: flex; }
  • 47. Well-Scoped Code Do it the “right” way first (HTML5 and community accepted)
 Keep “fixes” in one function or variable and gracefully fall back Detect bugs and features, not browsers and devices (modernizr.com) When the browser or device manufacturer fixes the bug, your code should still work
  • 48. Third-Party, Open Source • Bootstrap (getbootstrap.com) – responsive UI • Backbone (backbonejs.org) – models, collections, views, router • Lodash (lodash.com) – utility library • Grunt (gruntjs.com) – task runner • LESS (lesscss.org) – dynamic CSS • Handlebars (handlebarsjs.com) – templating • requirejs (requirejs.org) – module & scope management
  • 49. Leverage third-party and open source libraries and tools (Bill)
  • 50. Tools for responsive and mobile web development (Javier)
  • 52. Lessons • Browsers: quirkier than we imagined • Some bugs cannot be detected (or not easily). Treat as though you did detect it! • Can’t reliably detect device
  • 53. The Future • Revisit • SEO • Render on server first (Rendr, et al.) • File size & number of requests • Performance • Improvements • React