JavaScript Tools Wolfram Kriesing CTO, uxebu @wolframkriesing Mittwoch, 18. April 12
JavaScript Tools
Wolfram KriesingCTO, uxebu
@wolframkriesing
Mittwoch, 18. April 12
http://140byt.es
Warming up: shorten please!
Mittwoch, 18. April 12
Try it out? Any tool?
The Console!
Browser
node.jsMittwoch, 18. April 12
uxebu
100%
BikeshedFlash
Technology
Product
Company- since 2008- 10 People (in DE, NL, US, UK)
Mittwoch, 18. April 12
Agenda
• TDD, CI, Build
• IDE and features
• Inspector (Firebug, Webkit Inspector)
• Tools of the future (bikeshed editor)
Mittwoch, 18. April 12
TDD, CI, Build
Mittwoch, 18. April 12
Jasmine
• JavaScript quasi standard
• For nodejs+browser (server+client)
• Built-in Spies
http://pivotal.github.com/jasmine/
Mittwoch, 18. April 12
Jasmine - Matchers
Mittwoch, 18. April 12
Jasmine - Matchers, watch out!
Mittwoch, 18. April 12
Matchers - toContain, not
Mittwoch, 18. April 12
Custom Matchers - toBeInstanceOf
Mittwoch, 18. April 12
Custom Matchers - toBeInstanceOf
Mittwoch, 18. April 12
Custom Matchers
Mittwoch, 18. April 12
Custom Matchers
Mittwoch, 18. April 12
Spies
• Decoupled Testing
• Fast Tests (Removes waits, Removes timings)
• Better Architecture
• Async Testing
Mittwoch, 18. April 12
Spies
Mittwoch, 18. April 12
Spies
Mittwoch, 18. April 12
TDD is just the start...
Mittwoch, 18. April 12
Our Process
Repo
Dev CI
Flowdock
All Devs
Mittwoch, 18. April 12
CI - Continuous Integration
• All projects
• Automated Test runs (multiple browsers/devices)
• Build
• Code coverage
• On Linux!
Mittwoch, 18. April 12
CI - Continuous Integration
http://siliconforks.com/jscoverage/
Mittwoch, 18. April 12
CI - Continuous Integration
Mittwoch, 18. April 12
Minify
Ping Response Time
On mobile!!!
Mittwoch, 18. April 12
Mittwoch, 18. April 12
Mittwoch, 18. April 12
Mittwoch, 18. April 12
http://code.google.com/intl/de-DE/closure/compiler/
https://github.com/mishoo/UglifyJS/
http://developer.yahoo.com/yui/compressor/
http://shrinksafe.dojotoolkit.org/
http://www.crockford.com/javascript/jsmin.html
...
Minifiers
Mittwoch, 18. April 12
Compare
http://compressorrater.thruhere.net/
Mittwoch, 18. April 12
Google Closure
Mittwoch, 18. April 12
Google Closure
http://closure-compiler.appspot.com/home
Mittwoch, 18. April 12
Think different
Mittwoch, 18. April 12
IDE essentials (using WebStorm)
Mittwoch, 18. April 12
Embedded Jasmine Test Runner
Test
ResultTest Platforms
Mittwoch, 18. April 12
Live Please :)
Mittwoch, 18. April 12
Hints - Unused Code
Mittwoch, 18. April 12
Hints - Trailing Commas
OK
Global
Mittwoch, 18. April 12
Hints - Others
Mittwoch, 18. April 12
Code Style
Mittwoch, 18. April 12
Rename
• File (updates git, and „requires“)
• Variables
• Functions
• Across Files
Mittwoch, 18. April 12
Refactor
• Extract into Method
• Extract Variable
• Inline
• Rewrite (if) Statements
Mittwoch, 18. April 12
Inspector
Mittwoch, 18. April 12
We want to know how it works on the inside!
Mittwoch, 18. April 12
Latest and Greatest
Mittwoch, 18. April 12
Console, please!
Mittwoch, 18. April 12
One Shortcut for All (Browsers)
Mittwoch, 18. April 12
monitorEvents(document.body)
Mittwoch, 18. April 12
Console
• console.profile(), console.profileEnd()
• console.dir()
• console.time(), console.timeEnd()
• console.trace()
Mittwoch, 18. April 12
*.toString()
• function source
• function parameters
• even console.log.toString()
Mittwoch, 18. April 12
console.log.toString()
Mittwoch, 18. April 12
Fix in Place
Mittwoch, 18. April 12
Mittwoch, 18. April 12
Demo Time, Webkit Inspector Remote
Mittwoch, 18. April 12
Tools from the Future (and now)
Mittwoch, 18. April 12
Bikeshed Tooling
• Instant Preview
Preview SourceMittwoch, 18. April 12
Bikeshed Tooling
Cursor
Highlight
API docs
Mittwoch, 18. April 12
Bikeshed Tooling
• Instant Preview
• Auto completion
• Embedded API docs
• Intelligent Value Modifier
Mittwoch, 18. April 12
Bikeshed Tooling
Method Color
AttributeNumber
starpolygoncirclerectellipse...
redgreenblueyellow...
12345...
lineColorlineWidthfillColorfiltersxy...
Mittwoch, 18. April 12
Bikeshed Tooling
• Instant Preview
• Auto completion
• Embedded API docs
• Intelligent Value Modifier
• All browser based
Mittwoch, 18. April 12
Editor Demo Time :)
Mittwoch, 18. April 12
Thank you
@bikeshedjs
Wolfram Kriesing, CTOuxebu@wolframkriesing
Mittwoch, 18. April 12