SlideShare a Scribd company logo
FRONTEND
IN 2015
CLEAR THE DECKS
VIEW ON GITHUB
USER EXPERIENCE
CLIENT EXPERIENCE
DEVELOPER EXPERIENCE
Always bet on JS!
- Brendan Eich
JAVASCRIPT USAGE
2011 2013 2015
None 61.8% 39.6% 35.0%
jQuery 28.3% 54.5% 61.5%
Modernizr 7.2%
Bootstrap 5.9%
W3Techs
TechTalk #85 : Latest Frontend Technologies
TechTalk #85 : Latest Frontend Technologies
TechTalk #85 : Latest Frontend Technologies
INLINE JAVASCRIPT
AJAX (ASYNC)
SINGLE PAGE APPLICATIONS
UNIVERSAL JAVASCRIPT
PICK YOUR POISON
FRAMEWORKS LIBRARIES
TechTalk #85 : Latest Frontend Technologies
FRAMEWORKS
SWISS KNIVES
ANGULARJS
EMBER.JS
BACKBONE.JS
KNOCKOUT.JS
POLYMER
METEOR
TechTalk #85 : Latest Frontend Technologies
<section id="main" ng‐show="todos.length" ng‐cloak> 
  <input id="toggle‐all" type="checkbox" ng‐model="allChecked" 
    ng‐click="markAll(allChecked)"> 
  <label for="toggle‐all">Mark all as complete</label> 
  <ul id="todo‐list"> 
    <li ng‐repeat="todo in todos | filter:statusFilter track by $index" 
      ng‐class="{completed: todo.completed, editing: todo == editedTodo}"> 
      <div class="view"> 
        <input class="toggle" type="checkbox" ng‐model="todo.completed"> 
        <label ng‐dblclick="editTodo(todo)">{{todo.title}}</label> 
        <button class="destroy" ng‐click="removeTodo(todo)"></button> 
      </div> 
      <form ng‐submit="doneEditing(todo)"> 
        <input class="edit" ng‐trim="false" ng‐model="todo.title" 
          ng‐blur="doneEditing(todo)" 
          todo‐escape="revertEditing(todo)" 
          todo‐focus="todo == editedTodo"> 
      </form> 
    </li> 
  </ul> 
</section>
TechTalk #85 : Latest Frontend Technologies
{{#if length}} 
  <footer id="footer"> 
    <span id="todo‐count"><strong>{{remaining.length}}</strong> 
      {{pluralize 'item' remaining.length}} left</span> 
    <ul id="filters"> 
      <li> 
        {{#link‐to "todos.index" activeClass="selected"}}All{{/link‐to}} 
      </li> 
      <li> 
        {{#link‐to "todos.active" activeClass="selected"}}Active{{/link‐to}} 
      </li> 
      <li> 
        {{#link‐to "todos.completed" activeClass="selected"}}Completed{{/link‐to}} 
      </li> 
    </ul> 
    {{#if completed.length}} 
      <button id="clear‐completed" {{action "clearCompleted"}}>Clear completed</button> 
    {{/if}} 
  </footer> 
{{/if}}
TechTalk #85 : Latest Frontend Technologies
<section id="main"> 
  <input id="toggle‐all" type="checkbox"> 
  <label for="toggle‐all">Mark all as complete</label> 
  <ul id="todo‐list"></ul> 
</section> 
// bindings at JavaScript side! 
TechTalk #85 : Latest Frontend Technologies
<section id="main" data‐bind="visible: todos().length"> 
  <input id="toggle‐all" data‐bind="checked: allCompleted" type="checkbox"> 
  <label for="toggle‐all">Mark all as complete</label> 
  <ul id="todo‐list" data‐bind="foreach: filteredTodos"> 
    <li data‐bind="css: { completed: completed, editing: editing }"> 
      <div class="view"> 
        <input class="toggle" data‐bind="checked: completed" type="checkbox"> 
        <label data‐bind="text: title, event: { dblclick: $root.editItem }"></label> 
        <button class="destroy" data‐bind="click: $root.remove"></button> 
      </div> 
      <input class="edit" data‐bind="value: title, valueUpdate: 'afterkeydown', 
        enterKey: $root.saveEditing, escapeKey: $root.cancelEditing, 
        selectAndFocus: editing, event: { blur: $root.stopEditing }"> 
    </li> 
  </ul> 
</section> 
TechTalk #85 : Latest Frontend Technologies
<section id="main" hidden?="{{model.items.length == 0}}"> 
  <input id="toggle‐all" type="checkbox" 
    on‐change="{{toggleAllCompletedAction}}" 
    checked="{{model.allCompleted}}"> 
  <label for="toggle‐all">Mark all as complete</label> 
  <ul id="todo‐list" 
      on‐td‐item‐changed="{{itemChangedAction}}" 
      on‐td‐destroy‐item="{{destroyItemAction}}"> 
    <template repeat="{{model.filtered}}"> 
      <li is="td‐item" item="{{}}"></li> 
    </template> 
  </ul> 
</section>
TechTalk #85 : Latest Frontend Technologies
<section id="main"> 
  <input id="toggle‐all" type="checkbox" 
    {{#unless todos_not_completed}}checked="checked"{{/unless}}>
  <label for="toggle‐all">Mark all as complete</label> 
  <ul id="todo‐list"> 
    {{#each todos}} 
      {{> todo}} 
    {{/each}} 
  </ul> 
</section>
COMPARISON
Framework Description
AngularJS Google backed, full featured, 2.0 in sight
Ember.js Niche, popular with rubists, reached 2.0 recently
Backbone.js Used to be popular, still in use, focus on model
Knockout.js MVVM, niche, focus on data binding
Polymer Web Components
Meteor Both front-end and back-end
LIBRARIESFOR SPECIFIC PROBLEMS
VIEW LIBRARIES
REACT.JS
VUE.JS
RACTIVE.JS
CYCLE.JS
+ 1 000 MORE
TechTalk #85 : Latest Frontend Technologies
OVERVIEW OF REACT
Virtual DOM
Component oriented!
state, props, lifecycle
React Native
react-blessed
CAT COUNTER
I've seen 0 cats
Saw a Cat
import React from "react"; 
import Heading from "../src/heading"; 
export default class CatCounter extends React.Component { 
  constructor(props) { 
    super(props); 
    this.state = { count: 0 }; 
    this.sawCat = this.sawCat.bind(this); 
  } 
  render() { 
    const styles = { 
      padding: 20, 
      background: "black", 
      border: "none", 
      color: "white", 
      fontWeight: "bold", 
      fontSize: "2em" 
    }; 
    return ( 
      <div> 
        <Heading size={5} textColor="black">I've seen {this.state.count} cats</Heading> 
        <button style={styles} type="button" onClick={this.sawCat}>Saw a Cat</button> 
      </div> 
    ); 
  } 
  sawCat() { 
    this.setState({ count: this.state.count + 1 }); 
  } 
} 
// app.jsx 
<section className="main"> 
  <input 
    className="toggle‐all" 
    type="checkbox" 
    onChange={this.toggleAll} 
    checked={activeTodoCount === 0} 
  /> 
  <ul className="todo‐list"> 
    {todoItems} 
  </ul> 
</section>
TechTalk #85 : Latest Frontend Technologies
<section class="main" v‐show="todos.length" v‐cloak> 
  <input class="toggle‐all" type="checkbox" v‐model="allDone"> 
  <ul class="todo‐list"> 
    <li class="todo" v‐repeat="todo: filteredTodos" 
      v‐class="completed: todo.completed, editing: todo == editedTodo"> 
      <div class="view"> 
        <input class="toggle" type="checkbox" v‐model="todo.completed"> 
        <label v‐on="dblclick: editTodo(todo)">{{todo.title}}</label> 
        <button class="destroy" v‐on="click: removeTodo(todo)"></button> 
      </div> 
      <input class="edit" type="text" v‐model="todo.title" 
        v‐todo‐focus="todo == editedTodo" 
        v‐on="blur: doneEdit(todo), keyup: doneEdit(todo) | key 'enter', 
          keyup: cancelEdit(todo) | key 'esc'"> 
    </li> 
  </ul> 
</section>
TechTalk #85 : Latest Frontend Technologies
<section id="main"> 
  <!‐‐ Here, we compare the total number of tasks (`items.length`) with 
  the number of completed tasks (`completedTasks().length`). This calculation 
  happens reactively, so we never need to manually trigger an update. 
  When the `change` event fires on the input, the `toggleAll` event fires 
  on the Ractive instance. ‐‐> 
  <input id="toggle‐all" type="checkbox" on‐change="toggleAll" 
    checked='{{ items.length === completedTasks().length }}'> 
  <label for="toggle‐all">Mark all as complete</label> 
  <ul id="todo‐list"> 
    {{#items:i}} 
      <!‐‐ The {{>item}} partial is defined in the script tag below ‐‐> 
      {{>item}} 
    {{/items}} 
  </ul> 
</section>
TechTalk #85 : Latest Frontend Technologies
function vrenderMainSection(todosData) { 
  let allCompleted = todosData.list.reduce((x, y) => x && y.completed, true); 
  return h('section#main', { 
    style: {'display': todosData.list.length ? '' : 'none'} 
  }, [ 
    h('input#toggle‐all', { 
      type: 'checkbox', 
      checked: allCompleted 
    }), 
    h('ul#todo‐list', todosData.list 
      .filter(todosData.filterFn) 
      .map(todoData => 
        h('todo‐item.todo‐item', { 
          key: todoData.id, 
          todoid: todoData.id, 
          content: todoData.title, 
          completed: todoData.completed 
        }) 
      ) 
    ) 
  ]) 
}
COMPARISON
Library Description
React.js Backed by Facebook, strong ecosystem
Vue.js Niche alternative
Ractive.js Reactive templates by The Guardian
Cycle.js Reactive newcomer
ROUTERS
ROUTERS
react-router - React
reactive-router - React
flow-router - Meteor
router5
Job Trends
Indeed
Job Trends II
Indeed
ARCHITECTURE
THE ART OF WASTING
SPACE
STATIC SITES
DYNAMIC SITES
REST
RELAY/FALCOR
THE GRID
Design is the beauty of
turning constraints into
advantages
- Aza Raskin
npmFOR KEEPING THINGS
TOGETHER
Module Counts
modulecounts.com
182k+ packages and growing fast
Dependency management
Package authoring
Both frontend/backend
package.json
{ 
  "name": "react‐component‐boilerplate", 
  "description": "Boilerplate for React.js components", 
  "author": "Juho Vepsalainen", 
  "version": "0.6.0", 
  "scripts": { 
    "start": "node lib/dev_server.js", 
    "test": "jest && npm run lint", 
    "gh‐pages": "webpack ‐‐colors", 
    "deploy‐gh‐pages": "node ./lib/deploy_gh_pages.js", 
    "dist‐all": "npm run dist && npm run dist‐min", 
    "dist": "webpack ‐‐colors", 
    ... 
  }, 
  "main": "dist‐modules/index.js", 
  "dependencies": {...}, 
  "devDependencies": {...}, 
  ... 
} 
BUILD TOOLS
HARD TO LIVE WITHOUT
1ST GEN.
Make
2ND GEN.
Grunt
Gulp
Broccoli
3RD GEN.
Browserify
Webpack
JSPM
MAKE
PATH  := node_modules/.bin:$(PATH) 
SHELL := /bin/bash 
build/templates.js: templates/*.handlebars 
    mkdir ‐p $(dir $@) 
    handlebars templates/*.handlebars > $@
Building JavaScript projects with Make
TechTalk #85 : Latest Frontend Technologies
module.exports = function(grunt) { 
  grunt.initConfig({ 
    jshint: { 
      files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], 
      options: { 
        globals: { 
          jQuery: true 
        } 
      } 
    }, 
    watch: { 
      files: ['<%= jshint.files %>'], 
      tasks: ['jshint'] 
    } 
  }); 
  grunt.loadNpmTasks('grunt‐contrib‐jshint'); 
  grunt.loadNpmTasks('grunt‐contrib‐watch'); 
  grunt.registerTask('default', ['jshint']); 
};
Grunt documentation
TechTalk #85 : Latest Frontend Technologies
var gulp = require('gulp'); 
var del = require('del'); 
var paths = { 
    scripts: ['client/js/**/*.coffee', '!client/external/**/*.coffee'] 
}; 
// Not all tasks need to use streams 
// A gulpfile is just another node program and you can use all packages available on npm 
gulp.task('clean', function(cb) { 
  // You can use multiple globbing patterns as you would with `gulp.src` 
  del(['build'], cb); 
}); 
... 
// Rerun the task when a file changes 
gulp.task('watch', function() { 
  gulp.watch(paths.scripts, ['scripts']); 
}); 
// The default task (called when you run `gulp` from cli) 
gulp.task('default', ['watch', 'scripts']); 
Gulp README
TechTalk #85 : Latest Frontend Technologies
... 
// create tree for files in the app folder 
var app = 'app' 
app = pickFiles(app, { 
  srcDir: '/', 
  destDir: 'appkit' // move under appkit namespace 
}) 
app = preprocess(app) 
// create tree for files in the styles folder 
var styles = 'styles' 
styles = pickFiles(styles, { 
  srcDir: '/', 
  destDir: 'appkit' // move under appkit namespace 
}) 
styles = preprocess(styles) 
... 
broccoli-sample-app
TechTalk #85 : Latest Frontend Technologies
browserify index.js ‐o bundle.js 
TechTalk #85 : Latest Frontend Technologies
var webpack = require('webpack'); 
module.exports = { 
  entry: './entry.js', 
  output: { 
    path: __dirname, 
    filename: 'bundle.js' 
  }, 
  module: { 
    loaders: [ 
      { 
        test: /.css$/, 
        loaders: ['style', 'css'] 
      } 
    ] 
  }, 
  plugins: [ 
    new webpack.optimize.UglifyJsPlugin() 
  ] 
};
TechTalk #85 : Latest Frontend Technologies
  <!doctype html> 
  <script src="jspm_packages/system.js"></script> 
  <script src="config.js"></script> 
  <script> 
    System.import('lib/main'); 
  </script>
JSPM - Getting Started Glen Maddern's video tutorial
HTTP2
PRODUCTIVITY
FOR FUN AND PROFIT
CLASSIC
ERA
Ctrl-R
AUTOMATIC
ERA
LiveReload
Browsersync
LIVE
EDITING
React Hot Loader
LiveReactload
CSS PROCESSORS
BECAUSE VANILLA ISN'T
ENOUGH
BEM, OOCSS,
SMACSS
SOLVING CSS WITHIN CSS
SASS, LESS, STYLUS
BETTER LANGUAGES
POSTCSS, CSSNEXT
EXTENSIONS
Deconfusing Pre- and Post-processing
INLINE CSS (REACT)
BACK TO THE FUTURE?
CSS MODULES
ELIMINATES GLOBALS,
MODULARITY++
ES2015, ES2016, ...
VERSION PER YEAR
BABEL
THE FUTURE NOW
JavaScript compiler
JSX support out of box
Easy to set up
See also Google Traceur
altJSALTERNATIVES TO
VANILLA
CoffeeScript
TypeScript
Flow - Gradual typing
And many others
LINTINGTO KEEP BUGS AT BAY
ESLINT
PLUGGABLE LINTING FOR
JAVASCRIPT
CSSLINT
RULES FOR IMPROVING
YOUR CSS
TESTINGTO MAKE THINGS WORK
FOR SURE
SELENIUM
PROTRACTOR
JASMINE
MOCHA
...
WEB COMPONENTS
THE FUTURE?
Fragmentation (Bootstrap for AngularJS, Ember, React, ...)
What if there was only one canonical version of libraries?
Improved reuse, sharing across projects, less waste
CONCLUSION
TO RECAP
Prepare to clear the decks often
A lot to learn but focus pays off
Towards a component based future?
QUESTIONS?
MADE WITH LOVE IN FINLAND BY
JUHO VEPSÄLÄINEN
READ MY BOOK
SURVIVEJS - WEBPACK AND REACT

More Related Content

PDF
Beacon bluetooth low energy
PDF
Intro to Chef
PDF
TechTalk #86 : ECMAScript 6 by Afief S
PPTX
Frontend technologies
PPTX
Modern Frontend Technology
PPTX
Front-end technologies for Wonderful User Experience through Websites
PDF
User eXperience & Front End Development
PDF
Front End Tooling and Performance - Codeaholics HK 2015
Beacon bluetooth low energy
Intro to Chef
TechTalk #86 : ECMAScript 6 by Afief S
Frontend technologies
Modern Frontend Technology
Front-end technologies for Wonderful User Experience through Websites
User eXperience & Front End Development
Front End Tooling and Performance - Codeaholics HK 2015

Viewers also liked (20)

PPTX
Front end Tips Tricks & Tools
PDF
Frontend SPOF
PDF
Frontend automation and stability
PDF
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
PDF
Sinau Bareng Frontend Web Development @ DiLo Malang
PDF
Architecting your Frontend
PDF
Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
PDF
ć»șç«‹ć‰ç«ŻćŒ€ć‘ć›ąé˜Ÿ (Front-end Development Environment)
PDF
Wrangling Large Scale Frontend Web Applications
PDF
A modern front end development workflow for Magnolia at Atlassian
PDF
How to Build Front-End Web Apps that Scale - FutureJS
PPTX
W3 conf hill-html5-security-realities
PDF
Frontend at Scale - The Tumblr Story
PDF
Front End Development Workflow Tools
PDF
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
PDF
engage 2015 - Domino App Development - Where should I go now?
PDF
Front End Development - Beyond Javascript (Robin Cannon)
PDF
Modern front end development
PPT
Scaling Front-End Performance - Velocity 2016
PPTX
DIGIT Noe 2016 - Overview of front end development today
Front end Tips Tricks & Tools
Frontend SPOF
Frontend automation and stability
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Sinau Bareng Frontend Web Development @ DiLo Malang
Architecting your Frontend
Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
ć»șç«‹ć‰ç«ŻćŒ€ć‘ć›ąé˜Ÿ (Front-end Development Environment)
Wrangling Large Scale Frontend Web Applications
A modern front end development workflow for Magnolia at Atlassian
How to Build Front-End Web Apps that Scale - FutureJS
W3 conf hill-html5-security-realities
Frontend at Scale - The Tumblr Story
Front End Development Workflow Tools
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
engage 2015 - Domino App Development - Where should I go now?
Front End Development - Beyond Javascript (Robin Cannon)
Modern front end development
Scaling Front-End Performance - Velocity 2016
DIGIT Noe 2016 - Overview of front end development today
Ad

Similar to TechTalk #85 : Latest Frontend Technologies (11)

KEY
Sprout core and performance
PDF
mobl - model-driven engineering lecture
PPTX
Modern JavaScript Talk
PPTX
Java scriptforjavadev part2a
PPTX
AngularJS One Day Workshop
PDF
mobl presentation @ IHomer
PDF
AngularJS for Web and Mobile
PDF
AngularJS Beginner Day One
PPTX
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
KEY
Gwt and Xtend
PPTX
JavaScript for ASP.NET programmers (webcast) upload
Sprout core and performance
mobl - model-driven engineering lecture
Modern JavaScript Talk
Java scriptforjavadev part2a
AngularJS One Day Workshop
mobl presentation @ IHomer
AngularJS for Web and Mobile
AngularJS Beginner Day One
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Gwt and Xtend
JavaScript for ASP.NET programmers (webcast) upload
Ad

More from bincangteknologi (7)

PDF
Qiscus enterprice for Hotels
PPTX
TechTalk #70 : REAL PROGRAMMER USE REGEX
PDF
TechTalk #69 : How to setup and run laravel apps inside vagrant
PDF
TechTalk #67 : Introduction to Ruby and Sinatra
PDF
Ddd part 2 modelling qiscus
PPTX
Domain-Driven Design: The "What" and the "Why"
PDF
Arduino + Android
Qiscus enterprice for Hotels
TechTalk #70 : REAL PROGRAMMER USE REGEX
TechTalk #69 : How to setup and run laravel apps inside vagrant
TechTalk #67 : Introduction to Ruby and Sinatra
Ddd part 2 modelling qiscus
Domain-Driven Design: The "What" and the "Why"
Arduino + Android

Recently uploaded (20)

PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Digital Strategies for Manufacturing Companies
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
medical staffing services at VALiNTRY
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
history of c programming in notes for students .pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
AI in Product Development-omnex systems
Wondershare Filmora 15 Crack With Activation Key [2025
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Design an Analysis of Algorithms I-SECS-1021-03
Navsoft: AI-Powered Business Solutions & Custom Software Development
Digital Strategies for Manufacturing Companies
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
medical staffing services at VALiNTRY
Understanding Forklifts - TECH EHS Solution
Operating system designcfffgfgggggggvggggggggg
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Odoo Companies in India – Driving Business Transformation.pdf
Softaken Excel to vCard Converter Software.pdf
history of c programming in notes for students .pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
How to Choose the Right IT Partner for Your Business in Malaysia
AI in Product Development-omnex systems

TechTalk #85 : Latest Frontend Technologies