Slideshare.net (beta)

 
Post: 
Myspace Hi5 Friendster Xanga LiveJournal Facebook Blogger Tagged Typepad Freewebs BlackPlanet gigya icons



All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 3 (more)

JavaScript: the most underestimated, undervalued and misunderstood language

From binnyva, 5 months ago

An introduction to the power of javascript.

1114 views  |  0 comments  |  3 favorites  |  32 downloads  |  1 embed (Stats)
 

Groups/Events

Not added to any group/event

 
 

Privacy InfoNew!

This slideshow is Public

 
Embed in your blog
Embed (wordpress.com)
custom

Slideshow Statistics
Total Views: 1114
on Slideshare: 998
from embeds: 116* * Views from embeds since 21 Aug, 07

Slideshow transcript

Slide 1: JavaScript: the most Underestimated, Undervalued and Misunderstood Language By Binny V A http://www.openjs.com/

Slide 2: You KNOW JavaScript! var sample_array = [42, 1337, "Hello World"]; for(var i=0; i<sample_array.length; i++) { alert(i + ") " + sample_array[i]); } function sayHi(name) { alert("Hi, "+ name); } sayHi("Binny");

Slide 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.

Slide 4: DOM  document.getElementById(“id-of-element”) OR $()  document.getElementsByTagName(“a”)  document.getElementsByName(“name”) Useful Functions getElementsByClassName(“external-links”) getElementsBySelector(“p.intro a”)

Slide 5: Undervalued  JavaScript is NOT a toy  Ajax!  High Profile Applications - like Gmail  Has more use than validation

Slide 6: Underestimated  Leader in client side scripting  Bring Web Apps closer to the Desktop

Slide 7: JavaScript is a Powerful language  First Class functions  Map, Reduce functions $("element").addEventListener("click", function(){ alert(this.innerHTML + " was clicked"; });

Slide 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));

Slide 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); }

Slide 10: Misunderstood  JavaScript is NOT Java  Its a functional language

Slide 11: Problems With JavaScript  Design Errors  Bad Implementations  Browser wars

Slide 12: Solution to the Problem - Libraries  Cross Browser Functionality  You write less code  Some operations are faster  Better documentation than homebrew solutions  etc.

Slide 13: JavaScript Libraries  jQuery  Prototype  YUI  Dojo  ExtJS  And many more...

Slide 14: JSL - JavaScript Library  My Own JS Library  http://www.openjs.com/scripts/jslibrary/