SlideShare a Scribd company logo
1 of 63
Download to read offline
Everything is 
Awesome 
Cutting the corners off the web.
“The Web Is Dying; Apps Are Killing It.” 
Really now?
However…
We’re making this complicated.
HTML
Raw HTML is for Chumps 
<div data-module-id="12" data-module-name="resp.module.article.ArticleColumnist" data-module-zone="articleheader" 
class="zonedModule"> 
<hgroup class="columnist-hgroup clearFix"> 
<div class="columnist-header"> 
<h2 class=" region-cat"> 
<a href="http://online.wsj.com/public/search?article-doc-type=%7BKeywords%7D&amp;HEADER_TEXT=keywords">Keywords</a> 
</h2> 
<h1 itemprop="headline">The Web Is Dying; Apps Are Killing It </h1> 
<h2 class="subHed deck">Tech’s Open Range Is Losing Out to Walled Gardens</h2> 
</div> 
<div class="columnist"> 
<div class="a-size"><img src="http://s.wsj.net/img/mims.jpg" height="76px" width="76px"></div> 
<div class="connect byline-dsk"> 
<span class="intro">By</span> 
<div class="social-dd"> 
<span class="c-name" rel="author" itemprop="author">Christopher Mims<span class="bk-box"></span></span> 
<menu class="c-menu"> 
<li class="twitter"> 
<iframe scrolling="no" frameborder="0" name="twitter_iframe" id="twitter_iframe" data-dj-src=" 
http://platform.twitter.com/widgets/follow_button.html?screen_name=mims&amp;show_count=false" style="width: 60px; height: 
21px;" allowtransparency="true"></iframe> 
<a href="http://www.twitter.com/@mims" target="_blank">@mims</a></li> 
<li class="email"><a href="mailto:christopher.mims@wsj.com">christopher.mims@wsj.com</ 
a></li> 
<li class="facebook"> 
<iframe data-dj-src="http://www.facebook.com/plugins/follow.php?href=https%3A%2F 
%2Fwww.facebook.com 
%2Fchristophermims&amp;layout=button_count&amp;show_faces=false&amp;colorscheme=light&amp;font&amp;width=250&amp;height=21" 
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:21px;" allowtransparency="true"></
doctype html 
html(lang="en") 
head 
title= pageTitle 
body 
h1 Jade - node template engine 
#container.col 
if youAreUsingJade 
p You are amazing 
else 
p Get on it! 
p. 
Jade is a terse and simple 
templating language with a 
strong focus on performance 
and powerful features.
DRY Templating 
• Layout Templates with Extending Blocks 
• Includes with Variables 
• Good Loops and Conditionals
What HTML is for 
• Establishing Content Order 
• Providing Accessibility Hooks 
• Anchors, Titles, alt tags, ARIA roles 
• tabindex ordering 
• keyboard focus as a first class concern
Building the Frontend 
You do automate this right?
gruntjs.com 
Javascript Task Runners 
gulpjs.com
gulp.task(‘dev:styles', function() { 
gulp.src(PATHS.project + “/main.less") 
.pipe(less({strictMath: true})) 
.pipe(gulp.dest(PATHS.assetsOut)) 
.pipe(connect.reload()); 
});
gulp.task(‘dev:styles', function() { 
gulp.src(PATHS.project + “/main.less") 
.pipe(less({strictMath: true})) 
.pipe(please({ 
minifier: false, 
import: false, 
mqpacker: false 
})) 
.pipe(gulp.dest(PATHS.assetsOut)) 
.pipe(connect.reload()); 
});
gulp.task(‘dev:styles', function() { 
gulp.src(PATHS.project + “/main.less") 
.pipe(sourcemaps.init()) 
.pipe(less({strictMath: true})) 
.pipe(please({ 
minifier: false, 
import: false, 
mqpacker: false 
})) 
.pipe(sourcemaps.write()) 
.pipe(gulp.dest(PATHS.assetsOut)) 
.pipe(connect.reload()); 
});
CSS
Just do the Comps? 
It’s not that simple.
You are building a 
design system.
Bootstrap/Foundation is 
just deferring the 
problem.
Manage Specificity 
http://csswizardry.com/2014/10/the-specificity-graph/ 
Namespace with Purpose
Preprocessors 
What’s their role now?
It’s not about prefixes. 
• Variables 
• Mixins 
• Extends 
• Creating a DRY visual system.
@paletteBgPrimary: #fff; 
@paletteNearWhite: #fcfcfc; 
@paletteBgSecondary: #edf0f2; 
@paletteBgLight: #edeff0; 
@paletteAccent: #f8971d; 
@paletteDominant: #445560; 
@paletteDarkDominant: #37454f; 
@paletteSubtle: #ffca88; 
@paletteError: #ff0000; 
@paletteErrorBg: #feebeb; 
@paletteBlack: #000; 
@paletteBodyInk: #818386; 
@paletteStrongInk: #393a3c; 
@paletteMidInk: #515151; 
@paletteFaintInk: #ccc; 
@paletteReverseInk: #fff; 
@paletteHairline: #dbe3e8; 
Explore Relationships between 
colours, measurements, layering
@measurementRegionPaddingVertical: rem(57); 
@measurementRegionPaddingVerticalMobile: rem(18); 
@measurementRegionPaddingSides: rem(98); 
@measurementRegionPaddingSidesMobile: rem(32); 
@measurementRegionPaddingMobile: rem(18 32); 
@measurementRegionPaddingThin: rem(18 18); 
@measurementRegionPadding: rem(57 98); 
@layerBase: 0; 
@layerFloat: 0; 
@layerOverlay: 500; 
@layerModal: 1000; 
Common relationships are 
everywhere, even if your 
designer doesn’t show you.
// mixins 
.targeted(@rules) { 
&:hover, &:focus { 
@rules(); 
} 
} 
.activated(@rules) { 
&.is-active, &:active { 
@rules(); 
} 
} 
// extends 
.reset-list-styles { 
list-style: none; 
padding-left: 0; 
} 
.ellipse-overflow { 
text-overflow: ellipsis; 
overflow: hidden; 
} 
Mixins let you make standard patterns 
with arguments. 
Extends let you make reusable 
patterns with only a single block of 
rules.
CSS is Skin Deep 
• Target Classes, avoid tags and attributes where 
possible. 
• Try not to sacrifice control over your markup, 
bad CSS comes from there.
Postprocessing for 
Compatibility 
• Media Query Packing 
• Minification 
• px fallbacks for rems (pixrem) 
• Prefixing (autoprefixer) 
• http://pleeease.io/ (collection of tools)
On Responsiveness
Device Targeting 
Doesn’t Work
Touch is becoming a 
primary concern.
:hover 
:focus 
:active
iOS pretends it can do 
:hover - careful with 
{display: none}
Rethink Breakpoints
Light on the hill 
• Pointer based media queries 
• Responsive Images (picture) 
• but still no element queries
Javascript is 
Awesome(ly bad)
Modern Javascript 
Engines are FAST
DOM is still slow
Mobile requires us to 
write efficient Javascript
Efficient DOM Rendering 
• Batch Operations 
• Use transforms & opacity for the best 
performance of styling, transitions, etc 
• Animation used CSS3 with state changes, and 
Velocity.js where applicable. Stuff IE8 animations 
or provide a fallback.
Timing 
• Callbacks on Events 
• requestAnimationFrame 
• Careful with setTimeout
Pack your code!
var bt = require("./components/brand_ticker.js"); 
var carousel = require("./components/carousel.js"); 
var mm = require("./components/mobile-menu.js"); 
window.jQuery(function($) { 
bt.init(); 
carousel.init(); 
mm.init(); 
});
var init = function() { 
var toggleMenu = function(e) { 
$(document.body).toggleClass("menu-active*"); 
e.preventDefault(); 
} 
$(".mobile-menu__toggle").click(toggleMenu); 
}; 
module.exports.init = init;
Benefits of Packing 
• Proper understanding of dependencies. 
• Less prone to copy pasta. 
• Easy to build.
Browserify 
gulp.task(‘dev:scripts', function() { 
gulp.src(PATHS.project + “/main.js") 
.pipe(browserify()) 
.on('prebundle', function(bundle) { 
bundle.transform(envify({ 
NODE_ENV: "production" 
})); 
})) 
.pipe(uglify()) 
.pipe(gulp.dest(PATHS.assetsOut)) 
.pipe(connect.reload()); 
});
if (process.env.NODE_ENV !== "production") { 
var debug = require("./debug.js"); 
} 
var data = $(“.something”).data(“message”); 
if (process.env.NODE_ENV !== "production") { 
debug.logger(“log this :” + data); 
} 
$(“.some-other-thing”).text(data);
// after envify 
if (“production” !== "production") { 
var debug = require("./debug.js"); 
} 
var data = $(“.something”).data(“message”); 
if (“production” !== "production") { 
debug.logger(“log this :” + data); 
} 
$(“.some-other-thing”).text(data);
// during uglify 
var data = $(“.something”).data(“message”); 
$(“.some-other-thing”).text(data); 
// after uglify 
var a=$(“.something”).data(“message”); 
$(“.some-other-thing”).text(a);
We’re still figuring this out 
• Browserify on big codebases results in 700kb 
files. 
• Maybe okay for Single Page Apps, but for 
general use, you may still need to split your 
codebase. 
• Options? — http://webpack.github.io 
http://duojs.org
Internationalisation 
Stop making excuses.
You may not have the 
resources to localise, but 
anyone can internationalise.
{ 
"app": { 
"name": "i18next" 
}, 
"nav": { 
"home": "Home", 
"page1": "Page One", 
"page2": "Page Two" 
} 
} 
i18n.init(function(t) { 
// translate nav 
$(".nav").i18n(); 
// programatical access 
var appName = t("app.name"); 
});
• Full Phrases, not words. 
• Never pluralise out of the translation. 
• Trust libraries, don’t roll your own. Translations. 
Currency. Number Formats. Date times and Time 
Zones.
Deployment 
You are automating this right?
Staging is now 
mandatory
Data Flow 
• Development 
• Development <— Staging (for fixtures) 
• Staging —> Production 
• Development <— Staging <— Production
Perceptual Diffing 
https://github.com/bslatkin/dpxdt 
Staging Production
What’s coming?
Application Cache 
Single Page Apps, cached, downloaded once.
IndexedDB 
We can store almost anything on the client. 
https://www.npmjs.org/package/makedrive
Freaking asm.js
Everything is 
Awesome 
How are you going to be awesome in 2015?
James Rakich 
less than awesome front end developer but still pretty good 
james@fullandbydesign.com.au 
@MalucoMarinero

More Related Content

What's hot

Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSHannes Hapke
 
Developing for Mobile
Developing for MobileDeveloping for Mobile
Developing for MobileRemy Sharp
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5dynamis
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldRobert Nyman
 
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Nicholas Zakas
 
Introduction to web components
Introduction to web componentsIntroduction to web components
Introduction to web componentsMarc Bächinger
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with WingsRemy Sharp
 
Making your Angular.js Application accessible
Making your Angular.js Application accessibleMaking your Angular.js Application accessible
Making your Angular.js Application accessibleDirk Ginader
 
Javascript done right - Open Web Camp III
Javascript done right - Open Web Camp IIIJavascript done right - Open Web Camp III
Javascript done right - Open Web Camp IIIDirk Ginader
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresAndreas Bovens
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009Ralph Whitbeck
 

What's hot (20)

Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJS
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
Geotalk presentation
Geotalk presentationGeotalk presentation
Geotalk presentation
 
Developing for Mobile
Developing for MobileDeveloping for Mobile
Developing for Mobile
 
High-Quality JavaScript
High-Quality JavaScriptHigh-Quality JavaScript
High-Quality JavaScript
 
WordPress and Ajax
WordPress and AjaxWordPress and Ajax
WordPress and Ajax
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New World
 
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
 
Introduction to web components
Introduction to web componentsIntroduction to web components
Introduction to web components
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with Wings
 
Making your Angular.js Application accessible
Making your Angular.js Application accessibleMaking your Angular.js Application accessible
Making your Angular.js Application accessible
 
Javascript done right - Open Web Camp III
Javascript done right - Open Web Camp IIIJavascript done right - Open Web Camp III
Javascript done right - Open Web Camp III
 
What is HTML 5?
What is HTML 5?What is HTML 5?
What is HTML 5?
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
08 ajax
08 ajax08 ajax
08 ajax
 
Backbone
BackboneBackbone
Backbone
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009
 

Viewers also liked

Căn hộ chuẩn singapore nằm giữa lòng Sài Gòn duy nhất được hổ trợ gói vay 30...
Căn hộ chuẩn singapore nằm giữa  lòng Sài Gòn duy nhất được hổ trợ gói vay 30...Căn hộ chuẩn singapore nằm giữa  lòng Sài Gòn duy nhất được hổ trợ gói vay 30...
Căn hộ chuẩn singapore nằm giữa lòng Sài Gòn duy nhất được hổ trợ gói vay 30...Khoaairblade
 
Presentazione esiti occupazionali istruzione e formazione 2013/14
Presentazione esiti occupazionali istruzione e formazione 2013/14Presentazione esiti occupazionali istruzione e formazione 2013/14
Presentazione esiti occupazionali istruzione e formazione 2013/14Provincia di Mantova
 
Target audience questionnaire results
Target audience questionnaire resultsTarget audience questionnaire results
Target audience questionnaire resultsasmediakirbyholsgrove
 
ACEDS-Driven March 2015 BYOD Webcast
ACEDS-Driven March 2015 BYOD WebcastACEDS-Driven March 2015 BYOD Webcast
ACEDS-Driven March 2015 BYOD WebcastLogikcull.com
 
SmartRecruiters-MakingTheRightHire
SmartRecruiters-MakingTheRightHireSmartRecruiters-MakingTheRightHire
SmartRecruiters-MakingTheRightHireNatalia Baryshnikova
 
Primary research on gta v
Primary research on gta vPrimary research on gta v
Primary research on gta vJake-hyatt123
 
ТРИЗ для коучей. 14 противоречий коучинга.
ТРИЗ для коучей. 14 противоречий коучинга. ТРИЗ для коучей. 14 противоречий коучинга.
ТРИЗ для коучей. 14 противоречий коучинга. Tatiana Novoselova
 
Rppfiqihviianyar 130722111454-phpapp01(1)
Rppfiqihviianyar 130722111454-phpapp01(1)Rppfiqihviianyar 130722111454-phpapp01(1)
Rppfiqihviianyar 130722111454-phpapp01(1)Ahmad Amin Muhiddin
 
Web Hosting Packages in India
Web Hosting Packages in IndiaWeb Hosting Packages in India
Web Hosting Packages in IndiaSwapnil Dighe
 
(3) konvensi tanda baca
(3) konvensi tanda baca(3) konvensi tanda baca
(3) konvensi tanda bacaImelda Wijaya
 
Dracula d ver2
Dracula d ver2Dracula d ver2
Dracula d ver2David Lunn
 
Jaringan tumbuhan
Jaringan tumbuhanJaringan tumbuhan
Jaringan tumbuhanPutri Yulia
 

Viewers also liked (20)

Tarea#2 salas michelle1.docx
Tarea#2 salas michelle1.docxTarea#2 salas michelle1.docx
Tarea#2 salas michelle1.docx
 
Riva bella
Riva bellaRiva bella
Riva bella
 
Căn hộ chuẩn singapore nằm giữa lòng Sài Gòn duy nhất được hổ trợ gói vay 30...
Căn hộ chuẩn singapore nằm giữa  lòng Sài Gòn duy nhất được hổ trợ gói vay 30...Căn hộ chuẩn singapore nằm giữa  lòng Sài Gòn duy nhất được hổ trợ gói vay 30...
Căn hộ chuẩn singapore nằm giữa lòng Sài Gòn duy nhất được hổ trợ gói vay 30...
 
Presentazione esiti occupazionali istruzione e formazione 2013/14
Presentazione esiti occupazionali istruzione e formazione 2013/14Presentazione esiti occupazionali istruzione e formazione 2013/14
Presentazione esiti occupazionali istruzione e formazione 2013/14
 
Enzim
EnzimEnzim
Enzim
 
Target audience questionnaire results
Target audience questionnaire resultsTarget audience questionnaire results
Target audience questionnaire results
 
ACEDS-Driven March 2015 BYOD Webcast
ACEDS-Driven March 2015 BYOD WebcastACEDS-Driven March 2015 BYOD Webcast
ACEDS-Driven March 2015 BYOD Webcast
 
SmartRecruiters-MakingTheRightHire
SmartRecruiters-MakingTheRightHireSmartRecruiters-MakingTheRightHire
SmartRecruiters-MakingTheRightHire
 
Primary research on gta v
Primary research on gta vPrimary research on gta v
Primary research on gta v
 
ТРИЗ для коучей. 14 противоречий коучинга.
ТРИЗ для коучей. 14 противоречий коучинга. ТРИЗ для коучей. 14 противоречий коучинга.
ТРИЗ для коучей. 14 противоречий коучинга.
 
PROJECT
PROJECTPROJECT
PROJECT
 
Rppfiqihviianyar 130722111454-phpapp01(1)
Rppfiqihviianyar 130722111454-phpapp01(1)Rppfiqihviianyar 130722111454-phpapp01(1)
Rppfiqihviianyar 130722111454-phpapp01(1)
 
Landasa pendidikan
Landasa pendidikan Landasa pendidikan
Landasa pendidikan
 
Planes de mejora copia
Planes de mejora   copiaPlanes de mejora   copia
Planes de mejora copia
 
Programma Lista Il Megafono 2015/2016
Programma Lista Il Megafono 2015/2016Programma Lista Il Megafono 2015/2016
Programma Lista Il Megafono 2015/2016
 
Web Hosting Packages in India
Web Hosting Packages in IndiaWeb Hosting Packages in India
Web Hosting Packages in India
 
(3) konvensi tanda baca
(3) konvensi tanda baca(3) konvensi tanda baca
(3) konvensi tanda baca
 
Dracula d ver2
Dracula d ver2Dracula d ver2
Dracula d ver2
 
Risk
RiskRisk
Risk
 
Jaringan tumbuhan
Jaringan tumbuhanJaringan tumbuhan
Jaringan tumbuhan
 

Similar to Everything is Awesome - Cutting the Corners off the Web

[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenerytoddbr
 
JavaScript performance patterns
JavaScript performance patternsJavaScript performance patterns
JavaScript performance patternsStoyan Stefanov
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesJazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesSimon Willison
 
AFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack EncoreAFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack EncoreEngineor
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"Binary Studio
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e bigAndy Peterson
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?glen_a_smith
 
Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbMongoDB APAC
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup PerformanceGreg Whalin
 
Progressive Web Apps. What, why and how
Progressive Web Apps. What, why and howProgressive Web Apps. What, why and how
Progressive Web Apps. What, why and howRiza Fahmi
 
"Progressive Web Apps" by Riza Fahmi (Hacktiv8)
"Progressive Web Apps" by Riza Fahmi	(Hacktiv8)"Progressive Web Apps" by Riza Fahmi	(Hacktiv8)
"Progressive Web Apps" by Riza Fahmi (Hacktiv8)Tech in Asia ID
 
jQuery (MeshU)
jQuery (MeshU)jQuery (MeshU)
jQuery (MeshU)jeresig
 

Similar to Everything is Awesome - Cutting the Corners off the Web (20)

[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
JavaScript performance patterns
JavaScript performance patternsJavaScript performance patterns
JavaScript performance patterns
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript librariesJazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
Jazz up your JavaScript: Unobtrusive scripting with JavaScript libraries
 
AFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack EncoreAFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack Encore
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?
 
Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
Buildingsocialanalyticstoolwithmongodb
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup Performance
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup Performance
 
Progressive Web Apps. What, why and how
Progressive Web Apps. What, why and howProgressive Web Apps. What, why and how
Progressive Web Apps. What, why and how
 
"Progressive Web Apps" by Riza Fahmi (Hacktiv8)
"Progressive Web Apps" by Riza Fahmi	(Hacktiv8)"Progressive Web Apps" by Riza Fahmi	(Hacktiv8)
"Progressive Web Apps" by Riza Fahmi (Hacktiv8)
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
jQuery (MeshU)
jQuery (MeshU)jQuery (MeshU)
jQuery (MeshU)
 

Recently uploaded

Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 

Recently uploaded (11)

Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 

Everything is Awesome - Cutting the Corners off the Web

  • 1. Everything is Awesome Cutting the corners off the web.
  • 2. “The Web Is Dying; Apps Are Killing It.” Really now?
  • 3.
  • 5. We’re making this complicated.
  • 7. Raw HTML is for Chumps <div data-module-id="12" data-module-name="resp.module.article.ArticleColumnist" data-module-zone="articleheader" class="zonedModule"> <hgroup class="columnist-hgroup clearFix"> <div class="columnist-header"> <h2 class=" region-cat"> <a href="http://online.wsj.com/public/search?article-doc-type=%7BKeywords%7D&amp;HEADER_TEXT=keywords">Keywords</a> </h2> <h1 itemprop="headline">The Web Is Dying; Apps Are Killing It </h1> <h2 class="subHed deck">Tech’s Open Range Is Losing Out to Walled Gardens</h2> </div> <div class="columnist"> <div class="a-size"><img src="http://s.wsj.net/img/mims.jpg" height="76px" width="76px"></div> <div class="connect byline-dsk"> <span class="intro">By</span> <div class="social-dd"> <span class="c-name" rel="author" itemprop="author">Christopher Mims<span class="bk-box"></span></span> <menu class="c-menu"> <li class="twitter"> <iframe scrolling="no" frameborder="0" name="twitter_iframe" id="twitter_iframe" data-dj-src=" http://platform.twitter.com/widgets/follow_button.html?screen_name=mims&amp;show_count=false" style="width: 60px; height: 21px;" allowtransparency="true"></iframe> <a href="http://www.twitter.com/@mims" target="_blank">@mims</a></li> <li class="email"><a href="mailto:christopher.mims@wsj.com">christopher.mims@wsj.com</ a></li> <li class="facebook"> <iframe data-dj-src="http://www.facebook.com/plugins/follow.php?href=https%3A%2F %2Fwww.facebook.com %2Fchristophermims&amp;layout=button_count&amp;show_faces=false&amp;colorscheme=light&amp;font&amp;width=250&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:21px;" allowtransparency="true"></
  • 8. doctype html html(lang="en") head title= pageTitle body h1 Jade - node template engine #container.col if youAreUsingJade p You are amazing else p Get on it! p. Jade is a terse and simple templating language with a strong focus on performance and powerful features.
  • 9. DRY Templating • Layout Templates with Extending Blocks • Includes with Variables • Good Loops and Conditionals
  • 10. What HTML is for • Establishing Content Order • Providing Accessibility Hooks • Anchors, Titles, alt tags, ARIA roles • tabindex ordering • keyboard focus as a first class concern
  • 11. Building the Frontend You do automate this right?
  • 12. gruntjs.com Javascript Task Runners gulpjs.com
  • 13. gulp.task(‘dev:styles', function() { gulp.src(PATHS.project + “/main.less") .pipe(less({strictMath: true})) .pipe(gulp.dest(PATHS.assetsOut)) .pipe(connect.reload()); });
  • 14. gulp.task(‘dev:styles', function() { gulp.src(PATHS.project + “/main.less") .pipe(less({strictMath: true})) .pipe(please({ minifier: false, import: false, mqpacker: false })) .pipe(gulp.dest(PATHS.assetsOut)) .pipe(connect.reload()); });
  • 15. gulp.task(‘dev:styles', function() { gulp.src(PATHS.project + “/main.less") .pipe(sourcemaps.init()) .pipe(less({strictMath: true})) .pipe(please({ minifier: false, import: false, mqpacker: false })) .pipe(sourcemaps.write()) .pipe(gulp.dest(PATHS.assetsOut)) .pipe(connect.reload()); });
  • 16. CSS
  • 17. Just do the Comps? It’s not that simple.
  • 18. You are building a design system.
  • 19. Bootstrap/Foundation is just deferring the problem.
  • 22. It’s not about prefixes. • Variables • Mixins • Extends • Creating a DRY visual system.
  • 23. @paletteBgPrimary: #fff; @paletteNearWhite: #fcfcfc; @paletteBgSecondary: #edf0f2; @paletteBgLight: #edeff0; @paletteAccent: #f8971d; @paletteDominant: #445560; @paletteDarkDominant: #37454f; @paletteSubtle: #ffca88; @paletteError: #ff0000; @paletteErrorBg: #feebeb; @paletteBlack: #000; @paletteBodyInk: #818386; @paletteStrongInk: #393a3c; @paletteMidInk: #515151; @paletteFaintInk: #ccc; @paletteReverseInk: #fff; @paletteHairline: #dbe3e8; Explore Relationships between colours, measurements, layering
  • 24. @measurementRegionPaddingVertical: rem(57); @measurementRegionPaddingVerticalMobile: rem(18); @measurementRegionPaddingSides: rem(98); @measurementRegionPaddingSidesMobile: rem(32); @measurementRegionPaddingMobile: rem(18 32); @measurementRegionPaddingThin: rem(18 18); @measurementRegionPadding: rem(57 98); @layerBase: 0; @layerFloat: 0; @layerOverlay: 500; @layerModal: 1000; Common relationships are everywhere, even if your designer doesn’t show you.
  • 25. // mixins .targeted(@rules) { &:hover, &:focus { @rules(); } } .activated(@rules) { &.is-active, &:active { @rules(); } } // extends .reset-list-styles { list-style: none; padding-left: 0; } .ellipse-overflow { text-overflow: ellipsis; overflow: hidden; } Mixins let you make standard patterns with arguments. Extends let you make reusable patterns with only a single block of rules.
  • 26. CSS is Skin Deep • Target Classes, avoid tags and attributes where possible. • Try not to sacrifice control over your markup, bad CSS comes from there.
  • 27. Postprocessing for Compatibility • Media Query Packing • Minification • px fallbacks for rems (pixrem) • Prefixing (autoprefixer) • http://pleeease.io/ (collection of tools)
  • 30. Touch is becoming a primary concern.
  • 32. iOS pretends it can do :hover - careful with {display: none}
  • 34. Light on the hill • Pointer based media queries • Responsive Images (picture) • but still no element queries
  • 37. DOM is still slow
  • 38. Mobile requires us to write efficient Javascript
  • 39. Efficient DOM Rendering • Batch Operations • Use transforms & opacity for the best performance of styling, transitions, etc • Animation used CSS3 with state changes, and Velocity.js where applicable. Stuff IE8 animations or provide a fallback.
  • 40. Timing • Callbacks on Events • requestAnimationFrame • Careful with setTimeout
  • 42. var bt = require("./components/brand_ticker.js"); var carousel = require("./components/carousel.js"); var mm = require("./components/mobile-menu.js"); window.jQuery(function($) { bt.init(); carousel.init(); mm.init(); });
  • 43. var init = function() { var toggleMenu = function(e) { $(document.body).toggleClass("menu-active*"); e.preventDefault(); } $(".mobile-menu__toggle").click(toggleMenu); }; module.exports.init = init;
  • 44. Benefits of Packing • Proper understanding of dependencies. • Less prone to copy pasta. • Easy to build.
  • 45. Browserify gulp.task(‘dev:scripts', function() { gulp.src(PATHS.project + “/main.js") .pipe(browserify()) .on('prebundle', function(bundle) { bundle.transform(envify({ NODE_ENV: "production" })); })) .pipe(uglify()) .pipe(gulp.dest(PATHS.assetsOut)) .pipe(connect.reload()); });
  • 46. if (process.env.NODE_ENV !== "production") { var debug = require("./debug.js"); } var data = $(“.something”).data(“message”); if (process.env.NODE_ENV !== "production") { debug.logger(“log this :” + data); } $(“.some-other-thing”).text(data);
  • 47. // after envify if (“production” !== "production") { var debug = require("./debug.js"); } var data = $(“.something”).data(“message”); if (“production” !== "production") { debug.logger(“log this :” + data); } $(“.some-other-thing”).text(data);
  • 48. // during uglify var data = $(“.something”).data(“message”); $(“.some-other-thing”).text(data); // after uglify var a=$(“.something”).data(“message”); $(“.some-other-thing”).text(a);
  • 49. We’re still figuring this out • Browserify on big codebases results in 700kb files. • Maybe okay for Single Page Apps, but for general use, you may still need to split your codebase. • Options? — http://webpack.github.io http://duojs.org
  • 51. You may not have the resources to localise, but anyone can internationalise.
  • 52. { "app": { "name": "i18next" }, "nav": { "home": "Home", "page1": "Page One", "page2": "Page Two" } } i18n.init(function(t) { // translate nav $(".nav").i18n(); // programatical access var appName = t("app.name"); });
  • 53. • Full Phrases, not words. • Never pluralise out of the translation. • Trust libraries, don’t roll your own. Translations. Currency. Number Formats. Date times and Time Zones.
  • 54. Deployment You are automating this right?
  • 55. Staging is now mandatory
  • 56. Data Flow • Development • Development <— Staging (for fixtures) • Staging —> Production • Development <— Staging <— Production
  • 59. Application Cache Single Page Apps, cached, downloaded once.
  • 60. IndexedDB We can store almost anything on the client. https://www.npmjs.org/package/makedrive
  • 62. Everything is Awesome How are you going to be awesome in 2015?
  • 63. James Rakich less than awesome front end developer but still pretty good james@fullandbydesign.com.au @MalucoMarinero