JavaScript: the most underestimated, undervalued and misunderstood language

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites

    JavaScript: the most underestimated, undervalued and misunderstood language - Presentation Transcript

    1. JavaScript: the most Underestimated, Undervalued and Misunderstood Language By Binny V A http://www.openjs.com/
    2. You KNOW JavaScript! var sample_array = [42, 1337, &quot;Hello World&quot;]; for(var i=0; i<sample_array.length; i++) { alert(i + &quot;) &quot; + sample_array[i]); } function sayHi(name) { alert(&quot;Hi, &quot;+ name); } sayHi(&quot;Binny&quot;);
    3. DOM – Document Object Model The Document Object Model (DOM) is a platform- and language-independent standard object model for representing HTML or XML and related formats.
    4. DOM
      • document.getElementById(“id-of-element”) OR $()‏
      • document.getElementsByTagName(“a”)‏
      • document.getElementsByName(“name”)‏
      Useful Functions getElementsByClassName(“external-links”)‏ getElementsBySelector(“p.intro a”)‏
    5. Undervalued
      • JavaScript is NOT a toy
      • Ajax!
      • High Profile Applications - like Gmail
      • Has more use than validation
    6. Underestimated
      • Leader in client side scripting
      • Bring Web Apps closer to the Desktop
    7. JavaScript is a Powerful language
      • First Class functions
        • Map, Reduce functions
      $(&quot;element&quot;).addEventListener(&quot;click&quot;, function(){ alert(this.innerHTML + &quot; was clicked&quot;; });
    8. First Class functions
      • Function that returns a function
      function addXTo(x) { return function(number) { return number+x; } } addFiveTo = addXTo(5); addNineTo = addXTo(9); alert(addFiveTo(3));
    9. Polymorphic Functions
      • The functionality of functions can be changed...
      function addEvent(obj,evt,fn) { if (document.addEventListener) { addEvent = function (obj,evt,fn) { obj.addEventListener(evt,fn,false); } } else if (document.attachEvent) { addEvent = function (obj,evt,fn) { obj.attachEvent('on'+evt,fn); } } addEvent(obj,evt,fn); }
    10. Misunderstood
      • JavaScript is NOT Java
      • Its a functional language
    11. Problems With JavaScript
      • Design Errors
      • Bad Implementations
      • Browser wars
    12. Solution to the Problem - Libraries
      • Cross Browser Functionality
      • You write less code
      • Some operations are faster
      • Better documentation than homebrew solutions
      • etc.
    13. JavaScript Libraries
      • jQuery
      • Prototype
      • YUI
      • Dojo
      • ExtJS
      • And many more...
    14. JSL - JavaScript Library
      • My Own JS Library
      • http://www.openjs.com/scripts/jslibrary/

    + Binny V aBinny V a, 2 years ago

    custom

    2522 views, 3 favs, 2 embeds more stats

    An introduction to the power of javascript.

    More Info

    © All Rights Reserved

    Go to text version
    • Total Views 2522
      • 2265 on SlideShare
      • 257 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 60
    Most viewed embeds
    • 256 views on http://www.openjs.com
    • 1 views on http://static.slideshare.net

    more

    All embeds
    • 256 views on http://www.openjs.com
    • 1 views on http://static.slideshare.net

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as innappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel

    Categories