Advanced JavaScript techniques

1,402 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,402
On SlideShare
0
From Embeds
0
Number of Embeds
314
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Advanced JavaScript techniques

  1. 1. ADVANCED (MAYBE?) JAVASCRIPT TECHNIQUESRajasekharan Vengalilbit.ly/avranju | @avranjuDeveloper EvangelistMicrosoft Corporation
  2. 2. MyDEMO! super- duper eval console
  3. 3. FUNCTIONSFunctions are first classcitizens •Callbacks •call, apply •Context
  4. 4. OO IN JAVASCRIPT - CLASSESDesigning classes •Member data & methods •Access control •A note on “new”
  5. 5. CLOSURESClosures •What are they? •Some use cases •Private members •Backing data for accessors
  6. 6. VARIABLE HOISTING & SCOPESStatic typers beware! •Only functions form variable scope •Variables get “hoisted” •Declare everything at the top •Use immediate functions to limit scope of locals in global code
  7. 7. JAVASCRIPT OBJECT NOTATION (JSON)JSON •What is JSON? •Browser support for JSON •JSON-P
  8. 8. DEBUGGINGSome pointers •IE developer tools •“debugger” keyword •“console.log” is your friend
  9. 9. ResourcesSome LinksRead “JavaScript Patterns” by Stoyan StefanovEval ConsoleShameless Plugbit.ly/avranjurajave@microsoft.com @avranju

×