Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
200
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
Modern Frontend Development
thorsten
2
760
Moderne Web-Apps mit HTML5 und JavaScript
thorsten
0
210
Bootstrap Your Project!
thorsten
2
660
Real Time Web Applications mit HTML5 und JavaScript - Part 2
thorsten
0
400
Real Time Web Applications mit HTML5 und JavaScript - Part 1
thorsten
0
310
Other Decks in Programming
See All in Programming
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
140
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
Foundry Localでエージェント開発
seosoft
0
160
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
190
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
130
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
180
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
110
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
2
260
自分的「カンファレンスの楽しみ方」
syumai
0
200
ALB ログから Trace を気合で繋げる技術
fohte
7
880
App Intentsのビルドプロセスを支える技術
kntkymt
0
110
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
430
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.2k
Into the Great Unknown - MozCon
thekraken
41
2.7k
My Coaching Mixtape
mlcsv
0
310
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
Abbi's Birthday
coloredviolet
3
9.9k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
270
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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]