Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Modern Frontend Development
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Thorsten Rinne
February 13, 2014
Programming
750
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Modern Frontend Development
Thorsten Rinne
February 13, 2014
More Decks by Thorsten Rinne
See All by Thorsten Rinne
Angular Best Practices @ Hackerkiste
thorsten
3
190
Angular Best Practices
thorsten
2
230
Modernisierung von Legacy Applikationen auf HTML5
thorsten
1
160
Entwicklung moderner Web-Apps mit HTML5 und JavaScript
thorsten
1
160
Modernes Frontend Development
thorsten
2
250
Moderne Web-Apps mit HTML5 und JavaScript
thorsten
0
200
Bootstrap Your Project!
thorsten
2
660
Real Time Web Applications mit HTML5 und JavaScript - Part 2
thorsten
0
390
Real Time Web Applications mit HTML5 und JavaScript - Part 1
thorsten
0
310
Other Decks in Programming
See All in Programming
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
560
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
440
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
200
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
0
550
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
410
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.6k
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
190
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
620
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.7k
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
240
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
650
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
220
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
GitHub's CSS Performance
jonrohan
1033
470k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Documentation Writing (for coders)
carmenintech
77
5.4k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
310
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
390
Believing is Seeing
oripsolob
1
170
How STYLIGHT went responsive
nonsquared
100
6.2k
Speed Design
sergeychernyshev
33
1.9k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Transcript
MODERN FRONTEND DEVELOPMENT NFQ Office Kaunas
THORSTEN RINNE ‣ studied CS ‣ Team Lead Engineering ‣
Yatego GmbH ‣ phpMyFAQ ! ‣ @ThorstenRinne
Today’s agenda Editor / IDE Browser Browser Dev Tools $
The command line Development Tools Demo
Editor / IDE
Let the developers decide!
None
Sublime Text TextMate UltraEdit vi Emacs ...
You can edit in the browser!
Browser
None
Which Versions? Chrome latest (currently version 32) Chromium latest (currently
version 34) Firefox latest (currently version 27) Firefox Nightly latest (currently version 30) Safari latest (currently version 6.1 / 7) Forget Opera, as it’s just a Chrome
Is someone missing?
None
Which IE versions? Internet Explorer 7 (?) Internet Explorer 8
Internet Explorer 9 Internet Explorer 10 Internet Explorer 11
Browser Developer Tools
chrome://flags Experimental Developer Tools experiments
Live Editing + Autosave
Performance measuring
Performance measuring Overview of memory usage Helps searching for performance
problems Layout or scripts Our goal should be 60 frames per second :-)
Memory and DOM Leaks
Memory and DOM Leaks JavaScript CPU Profiling Heap Snapshot for
JavaScript objects DOM nodes Search for potential memory and/or DOM leaks
Mobile Testing
Mobile Testing User Agent Different devices Android iOS Windows Phone
Simulation of touch events Changing geolocation and accelerometers
The Terminal
NO FEAR
The command line makes you smile ❤ ~/
Let the CLI look awesome! Please install „dotfiles“
None
http://dotfiles.github.io
Please install the Swiss army knife of every web developer.
None
Socket.IO: cross browser sockets Express: like Sinatra or Silex Grunt:
a JavaScript task runner Bower: a package manager for the web Yeoman: CLI interface for scaffolding JSHint / JSLint
Linting on save on commit during build
Automatisation
Why?
Developers are lazy!
Linting Resolve depedencies Concat and compiling Testing Remove debug code
$ npm install grunt-cli -g The JavaScript Task Runner
The JavaScript Task Runner task based CLI tool like make
/ rake / ant / phing Configuration in JavaScript Huge community hundreds of plugins Linting, Concat, Watcher, Testing out of the box
$ cd /path/to/project ! $ npm install grunt --save-dev How
to install Grunt
{ "name": "yatego.com", "version": "2.0.0", "dependencies": {}, "devDependencies": { "grunt":
"~0.4.1", "grunt-contrib-jshint": "~0.4.1", "grunt-contrib-uglify": "~0.2.2" }, "engines": { "node": ">=0.10.0" }, "author": "Yatego GmbH", } package.json
module.exports = function(grunt) { ! grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: {
options: { banner: '/*! <%= grunt.template.today("yyyy-mm-dd") %> */\n' }, build: { src: 'src/<%= pkg.name %>.js', dest: 'build/<%= pkg.name %>.min.js' } } }); ! grunt.loadNpmTasks('grunt-contrib-uglify'); ! grunt.registerTask('default', ['uglify']); ! }; Gruntfile.js
// Run Jasmine and DalekJS tests grunt.registerTask( 'testrun', ['jshint', 'jasmine',
'dalek'] ); ! // Build production grunt.registerTask( 'production', ['copy', 'less', 'cssmin', 'jshint', 'uglify'] ); Grunt Tasks
The JavaScript Task Runner http://gruntjs.com http://gruntjs.com/plugins
Linting JSHint or JSLint .jshintrc $ npm install grunt-contrib-jshint --save-dev
LiveReload Plugins for Chrome Firefox Safari Triggers page reload via
grunt watch Browser extensions on http://livereload.com/
Package Manager for the web Install and remove packages No
external dependencies No sudo permissions Blazing fast installation: $ npm install bower -g
How to install packages ! ! ! $ bower install
$ bower install <package> $ bower install <package>#<version> $ bower install <name>=<package>#<version>
Package resources Registered Bower packages like jQuery Git repositories Local
folders URLs with .zip/.tar.gz files Will be installed to bower_components by default
Search packages $ bower search <package>
Simple package usage <script src="/bower_components/jquery/jquery.min.js"> </script>
Deleting packages $ bower remove <package>
Configuration .bowerrc { "directory": "./components" }
Configuration bower.json { "name": "yatego.com", "version": "2.0.0", "dependencies": { "jquery":
"1.10.2", "bootstrap": "3.0.0", "modernizr": "2.6.2" }, "devDependencies": { "jasmine": "~1.3.1", }, "resolutions": { "jquery": "1.10.2" } }
Useful Grunt tasks grunt-contrib-copy grunt-contrib-concat grunt-contrib-uglify grunt-contrib-cssmin grunt-contrib-imagemin
None
Testing Unittests with Jasmine PhantomJS Chrome Firefox Chrome Canary Firefox
Nightly UI Testing with DalekJS PhantomJS Chrome Firefox Internet Explorer!
Jasmine describe("Cart", function() { ! beforeEach(function() { $.yategoCart().removeAll(); }); !
it("Checks if add item works", function() { $.yategoCart().addItem("test-pos-1", "test-offer-1", 3); expect($.yategoCart().hasItem("test-offer-1")).toEqual(true); }); ! it("Checks if change quantity works", function() { $.yategoCart().addItem("test-pos-2", "test-offer-2", 3); $.yategoCart().addItemQty("test-offer-2", 2); expect($.yategoCart().getItemQty("test-offer-2")).toEqual(5); }); });
Jasmine via PhantomJS $ grunt jasmine Running "jasmine:pivotal" (jasmine) task
Testing jasmine specs via phantom ............................ 28 specs in 0.229s. >> 0 failures ! Done, without errors.
Test‘em Testrunner Test Framework for Jasmine QUnit Mocha Buster.js For
all browsers and PhantomJS
How to install Test‘em $ npm install testem -g
$ testem
None
BOOM!
None
Testing with DalekJS New UI Testing Framework Early stage, currently
version 0.0.8 Faster than Selenium Tests written in JavaScript Supports all browsers and PhantomJS
Testing with DalekJS module.exports = { 'Page title is correct':
function (test) { test.open('http://www.yatego.dev') .assert.title().is('Yatego Shopping', 'It has title') .done(); }, 'Search page is correct': function (test) { test.open('http://www.yatego.dev/search?q=Test') .assert.title().is('Test - yatego.com', 'It has title') .done(); } };
Testing with DalekJS
Awesome. And now?
Why couldn’t it be more easy?
Yeoman!
Yeoman Scaffolding of new apps Writes Grunt configuration Yeoman =
Grunt + Bower + Awesomeness Blazing fast installation $ npm install -g yo
Yeoman $ npm install -g generator-webapp $ cd /path/to/webroot
$ mkdir nfqApp $ cd nfqApp $ yo nfqApp
Yeoman $ grunt server ! $ grunt test ! $
grunt build
Generator WebApp Watcher for HTML, CSS and JS with LiveReload
Builtin Webserver at Port 9000 JSHint Mocha tests Bootstrap 3
DEMO
Available generators AngularJS WordPress EmberJS Firefox OS Apps ExpressJS Laravel
Knockout Jekyll Phonegap Meteor Symfony2
Example Yatego 2.0 www.yatego.com
Frontend vs. Backend Frontend 3 Developer Bootstrap 3 based Testen
via Jasmine Grunt / LiveReload Deployment Assetserver Backend 6 Developer Symfony 2.3 Testen via PHPUnit app/console + ant Deployment Capifony
Advantages everyone could use his own workflow Test-Driven-Development for frontend
and backend LiveReload saves hitting the F5 key all the time Many JavaScript errors were found before the release
Questions? Comments?
Thanks for your attention! :-) Twitter: @ThorstenRinne Slides: http://speakerdeck.com/u/thorsten Thorsten
Rinne Yatego GmbH
[email protected]