Contenu connexe Similaire à JavaScript Tools (PHPConference 2011, Berlin) (7) Plus de wolframkriesing (20) JavaScript Tools (PHPConference 2011, Berlin)1. JavaScript
Tools
Wolfram Kriesing
Co-Founder
@wolframkriesing
Dienstag, 31. Mai 2011
16. Compare
http://compressorrater.thruhere.net/
Dienstag, 31. Mai 2011
20. 140Bytes
By Jed Schmidt
http://140byt.es/
https://github.com/jed/140bytes/wiki/Byte-saving-techniques
Dienstag, 31. Mai 2011
33. Testing
• unit testing
• synch
• asynch
• automation
• selenium like
• webdriver
Dienstag, 31. Mai 2011
35. Jasmine
http://pivotal.github.com/jasmine/
Dienstag, 31. Mai 2011
41. • console
• debugger
• resource panel
• ...
Dienstag, 31. Mai 2011
42. Firebug/Inspector
• has keyboard shortcuts! but not ctrl+r
ctrl+a, ctrl+e, up, down, tab, shift+tab,
• console.log("See this %s", var, obj, array)
• monitorEvents($("id"))
• profile(1), profileEnd(1)
http://getfirebug.com/console.html
http://getfirebug.com/commandline.html
http://getfirebug.com/keyboard.html
Dienstag, 31. Mai 2011
44. *.toString()
• function source
• function parameters
• even console.log.toString()
Dienstag, 31. Mai 2011
47. Stacktrace
http://eriwen.com/javascript/js-stack-trace/
Dienstag, 31. Mai 2011
52. Profiler
DEMO
sortdemo
Dienstag, 31. Mai 2011
54. JSLint
• finds IE traps (trailing comma)
• gives JS insight (parseInt, ===, ...)
• understand type coercion
• finds missing var statements
• undefined vars, typos (myVar vs. myvar)
http://jslint.com
http://wolfram.kriesing.de/blog/index.php/2007/understanding-jslint-output
http://www.danhulton.com/blog/2008/01/16/integrate-js-lint-into-komodo-edit/
Dienstag, 31. Mai 2011
59. Try it first (1)
d.query("h2")
.style({color:"red"})
.anim({left:300}, 500)
Are you sure this works?
NO
d.query("h2")
.style({position:"absolute", color:"red"})
.anim({left:300}, 500)
save one reload!
Dienstag, 31. Mai 2011
60. alert, console.log
• alert hell? use confirm!
• numbered console.log
Dienstag, 31. Mai 2011
62. zeon.js
DEMO
Dienstag, 31. Mai 2011
63. Thank you
Wolfram Kriesing
uxebu.com
Dienstag, 31. Mai 2011