Javascriptbootcamp

1,625 views

Published on

Published in: Technology
  • Be the first to comment

Javascriptbootcamp

  1. 1. javascript bootcamp by amy hoy, www.slash7.com
  2. 2. Javascript is a real boy language
  3. 3. avascript 1.3 Javasc J 1.2 ript t 1.4 rip 5 99 asc 1.1 .1 Jav est t rip ECMAScript, edition 1 asc Jav est. 1997
  4. 4. 1.5 t Javascript 1.6 rip sc va Ja far so nly o fox fire ECMAScript, edition 3 est. 1999
  5. 5. Follow Along www.squarefree.com/shell/shell.html
  6. 6. Syntax & Style
  7. 7. whirlwind tour
  8. 8. look ma, no primitives!
  9. 9. data types are fun! * Number * null * String * undefined * Boolean * RegExp
  10. 10. creating numbers
  11. 11. yes, they’re all numbers
  12. 12. creating strings creatin’ em
  13. 13. creating regexps
  14. 14. booleans - dead simple
  15. 15. null and undefined are special
  16. 16. doin’ stuff with basic types
  17. 17. creating arrays
  18. 18. this deserves repeating
  19. 19. creating simple functions
  20. 20. creating simple objects
  21. 21. this deserves repeating
  22. 22. if... or else!
  23. 23. gonna have to make a switch()
  24. 24. while()
  25. 25. do..while() while() while()
  26. 26. for(), our old friend
  27. 27. for..in(), a new trick!
  28. 28. strings
  29. 29. strings act like arrays
  30. 30. concatenation & auto type conversion
  31. 31. breakin’ up is not hard to do
  32. 32. the great escape. and unescape.
  33. 33. RegExps
  34. 34. a bit more on regexps
  35. 35. functions
  36. 36. closures & callbacks
  37. 37. function handles
  38. 38. the arguments object
  39. 39. objects
  40. 40. JavaScript Object Notation (JSON)
  41. 41. using a JSON object
  42. 42. turning strings into code (more JSON!)
  43. 43. don’t forget your commas
  44. 44. creating an object constructor
  45. 45. creating a better object constructor
  46. 46. Javascript has a prototype- based inheritance model
  47. 47. using prototype to extend objects
  48. 48. creating an object hierarchy SweetLiquid Molasses Soda KoolAid
  49. 49. creating the parent object
  50. 50. creating the children
  51. 51. creating the relationship
  52. 52. mucking about with your new objects
  53. 53. further extending objects
  54. 54. extending specific instances
  55. 55. exceptions
  56. 56. try..catch
  57. 57. fancier try..catch
  58. 58. throwing custom exceptions
  59. 59. throwing custom exceptions
  60. 60. throwing custom exception objects
  61. 61. catching custom exceptions
  62. 62. the browser
  63. 63. “Javascript” ECMAScript W3C DOM Document Object Model the split-personality language
  64. 64. Javascript the language is mostly compatible the DOM is the problem area IE is the problem, but not as bad as you’d think
  65. 65. Don’t hate the language, hate the runtime environment
  66. 66. the DOM
  67. 67. document head body div#sidebar div#main div.block div.block div.block p textNode b textNode
  68. 68. window document head body div#sidebar div#main div.block div.block div.block p textNode b textNode
  69. 69. iterating through the DOM tree
  70. 70. DOM element attributes
  71. 71. DOM element attributes
  72. 72. DOM element attributes
  73. 73. DOM element attributes
  74. 74. DOM element attributes & methods
  75. 75. DOM element attributes & methods
  76. 76. DOM element attributes & methods
  77. 77. node.childNodes
  78. 78. node.innerHTML
  79. 79. finding DOM elements by id
  80. 80. finding DOM elements by tagName
  81. 81. creating new DOM nodes
  82. 82. embedding javascript
  83. 83. Prototype
  84. 84. Development & Debugging
  85. 85. FireFox your long-term best bud
  86. 86. FireBug your new soulmate
  87. 87. inspecting DOM elements: source
  88. 88. inspecting DOM elements: style
  89. 89. inspecting DOM elements: live events
  90. 90. console: errors and filtering things to show
  91. 91. console: logging / inspecting AJAX requests
  92. 92. console: logging / inspecting AJAX requests
  93. 93. the step-thru debugger: new in FireBug .4
  94. 94. breakpoints step-through debugging flexible console logging built-in profiling & testing functionality live DOM inspector / editor the ability to send email
  95. 95. Javascript Shell no snazzy logo www.squarefree.com/shell/shell.html
  96. 96. Other Tools & Libraries JSUnit MochiKit jQuery moo.ajax moo.fx TrimPath Behavior & event:Selectors Scriptaculous (fx) moo.fx
  97. 97. Links for You http://www.slash7.com/ look for the list of presentations under the “Goodies” sidebar

×