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
Modernes Frontend Development
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Thorsten Rinne
October 30, 2013
Programming
250
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Modernes Frontend Development
Thorsten Rinne
October 30, 2013
More Decks by Thorsten Rinne
See All by Thorsten Rinne
Angular Best Practices @ Hackerkiste
thorsten
3
190
Angular Best Practices
thorsten
2
220
Modernisierung von Legacy Applikationen auf HTML5
thorsten
1
160
Entwicklung moderner Web-Apps mit HTML5 und JavaScript
thorsten
1
160
Modern Frontend Development
thorsten
3
750
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
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
150
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
200
霧の中の代数的エフェクト
funnyycat
1
420
えっ!!コードを読まずに開発を!?
hananouchi
0
230
What's New in Android 2026
veronikapj
0
140
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
500
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.6k
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
120
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
190
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
130
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
180
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
900
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
660
Faster Mobile Websites
deanohume
310
32k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
620
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
640
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
370
Making the Leap to Tech Lead
cromwellryan
135
10k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
Marketing to machines
jonoalderson
1
5.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Designing for Timeless Needs
cassininazir
1
400
Transcript
MODERNES FRONTEND DEVELOPMENT International PHP Conference 2013
THORSTEN RINNE ‣ Diplom-Informatiker (FH) ‣ Team Lead Engineering ‣
Yatego GmbH ‣ phpMyFAQ ‣ @ThorstenRinne
Eine Art Agenda ... Editor / IDE Browser Browser Dev
Tools Die Kommandozeile Development Tools Demo
Editor / IDE
Manager anwesend?
Lasst den Entwickler entscheiden!
None
Sublime Text TextMate UltraEdit vi Emacs ...
Geht sogar im Browser...
Browser
None
Welche Versionen? Chrome latest (derzeit Version 30) Chromium latest (derzeit
Version 32) Firefox latest (derzeit Version 25) Firefox Nightly latest (derzeit Version 28) Safari latest (derzeit Version 6.1 bzw 7) Opera kann man sich sparen, da wie Chrome
Fehlt da nicht jemand?
None
Welche IE Versionen? 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-Messung
Performance-Messung Übersicht des Speicherverbrauchs Hilft bei Suche nach Performanceproblemen Layout
oder Skripte Ziel: 60 Frames pro Sekunde :-)
Memory und DOM Leaks
Memory und DOM Leaks JavaScript CPU Profiling Heap Snapshot für
JavaScript Objekte DOM Knoten Suche nach potentiellen Memory und DOM Leaks
Mobile Testing
Mobile Testing User Agent Verschiedene Endgeräte Android iOS Windows Phone
Simulation von Touch Events Ändern der Geolocation und des Accelerometers
Das Terminal
KEINE ANGST
Die Kommandozeile macht Spaß! ❤ ~/
Lass sie gut aussehen! Installiert „dotfiles“
None
http://dotfiles.github.io
Installiert das Schweizer Taschermesser des Webentwicklers!
None
Linting beim Speichern beim Commit bei Build
Automatisierung
Warum?
Entwickler sind faul.
Linting Abhängigkeiten auflösen Zusammenfügen und Kompilieren Testing Debug Code entfernen
$ npm install grunt-cli -g The JavaScript Task Runner
The JavaScript Task Runner aufgabenbasiertes Kommandozeilen- Tool ähnlich make /
rake / ant / phing Konfiguration in JavaScript Große Community Hunderte Plugins Linting, Concat, Watcher, Testing out of the box
$ cd /path/to/project $ npm install grunt --save-dev Grunt installieren
{ "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 oder JSLint .jshintrc $ npm install grunt-contrib-jshint --save-dev
LiveReload Plugin Chrome Firefox Safari Triggert Seitenreload via grunt watch
Browser Extensions auf http://livereload.com/
Package Manager für das Web Installieren und Entfernen von Paketen
Keine Abhängigkeiten keine sudo Rechte nötig Schnell installiert: $ npm install bower -g
Pakete installieren $ bower install $ bower install <package> $
bower install <package>#<version> $ bower install <name>=<package>#<version>
Paket-Quellen Registrierte Bower-Pakete wie z.B. jQuery Git-Repositories Lokale Ordner URLs
mit .zip/.tar.gz Dateien Werden normal nach bower_components installiert
Pakete suchen $ bower search <package>
Pakete verwenden <script src="/bower_components/jquery/jquery.min.js"> </script>
Pakete löschen $ bower remove <package>
Konfiguration .bowerrc { "directory": "./components" }
Konfiguration 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" } }
Packen und Kompilieren grunt-contrib-copy grunt-contrib-concat grunt-contrib-uglify grunt-contrib-cssmin grunt-contrib-imagemin
None
Testing Unittests mit Jasmine PhantomJS Chrome Firefox Chrome Canary Firefox
Nightly UI Testing mit 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 für Jasmine QUnit Mocha Buster.js Für
alle Browser und PhantomJS
Test‘em instalieren $ npm install testem -g $ testem
None
BOOM!
None
Testing mit DalekJS Neues UI Testing Framework Sehr neu, aktuell
Version 0.0.6 Schneller als Selenium Tests schreibt man in JavaScript Unterstützt alle Browser und PhantomJS
Testing mit 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 mit DalekJS
Schön. Und nun?
Geht das nicht noch einfacher?
Yeoman!
Yeoman Scaffolding neuer Apps Schreibt Grunt Konfiguration Yeoman = Grunt
+ Bower + Awesomeness Installation $ npm install -g yo
Yeoman $ npm install -g generator-webapp $ cd /path/to/webroot $
mkdir ipc-app $ cd ipc-app $ yo webapp
Yeoman $ grunt server $ grunt test $ grunt build
Generator WebApp Watcher für HTML, CSS und JS mit LiveReload
Builtin Webserver auf Port 9000 JSHint Mocha-Tests Bootstrap 3
DEMO
Verfügbare Generatoren AngularJS WordPress EmberJS Firefox OS Apps ExpressJS Laravel
Knockout Jekyll Phonegap Meteor Symfony2
Beispiel Yatego 2.0
Frontend vs. Backend Frontend 3 Developer Bootstrap 3 basierend Testen
via Jasmine Grunt / LiveReload Deployment Assetserver Backend 6 Developer Symfony 2.3 Testen via PHPUnit app/console + ant Deployment Capifony
Vorteile Jeder hatte seinen Workflow Test-Driven-Development für Frontend und Backend
LiveReload schützt die F5-Taste Viele JavaScript-Fehler vor dem Release gefunden
Fragen? Kommentare?
Vielen Dank für Eure Aufmerksamkeit! Joind.in: https://joind.in/9562 Twitter: @ThorstenRinne App.net:
https://alpha.app.net/thorsten Slides: http://speakerdeck.com/u/thorsten Thorsten Rinne Yatego GmbH
[email protected]