Posts Tagged ‘ECMAScript’

Future of Web – JavaScript all the way!

Now-a-days one could call “Database API” using JavaScript (CouchDB). With the rise of Server-Side JavaScript (SSJS)
, one could write server side logic of a web application using JavaScript (NodeJS). One could write client portion of a web application quickly (ExtJS/jQuery UI) using fast/performant (jQuery) JavaScript. One could also use frameworks such as Knockout.js/Underscore.js/Backbone.js to assemble together a MVC/MVVM/MV* style web apps in quick time. One could even develop mobile applications using JavaScript (Appcelerator Titanium).

Rich two-way binding based on libraries like Handlebars is the norm these days.Frameworks like Meteor are also on their way to the developer toolbox to solve concurrency & scalability issues and let the developer only be concerned about developing what they want in a high level way.

Not to mention the beast that is the Html5 as it holds a lot of promise for the future. W3C Web Workers is coming onto the scene as a form of “threading” and supported in the ECMAScript Edition 5.

Html5 offline client-side storage features like File System API,
Indexed Database API (IndexedDB)Web SQL DatabaseWeb Storage and
Application Cache are also JavaScript based not to mention other third party
storage solutions like SQL.jsTrappistDBPersistJS.

I know talking about Html5 WebSockets would entail another post per se. but the least one could say about it is that the future of communication in web world is persistent full duplex connection. And that can be achieved with WebSocket.

Then there is the small matter of Emscripten by which one could Port a C/C++ Library to JavaScript (xml.js). So you can imagine that the “sky should be the limit” with what could be achieved in JavaScript alone.

There are number of up and coming libraries for doing tasks in JavaScript which up until now was considered only a “server job”. Pdf.js is one such HTML5 technology experiment that explores building a faithful and efficient Portable Document Format (PDF) renderer without native code assistance. Zip.js is another JavaScript library to zip and unzip files on the client-end. JS-Crypto is a collection of JavaScript crypto functions to call from the front-end.

Is this how the future would shape up to for the Web 3.0? Is JavaScript in every layer in an N-Tier Architecture i.e. Presentation Layer, Business Layer, Data Access Layer a viable solution? I would love to get your view regarding today’s JavaScript in “every sphere” based development paradigm.

Advanced JavaScript Resources

JavaScript, being so simple to learn & use is one programming language which is not always given its proper due. I think the main reason for this is that most people who tries to undermine the language are greatly fooled by it’s simplicity. Although, it has its fare share of shortcomings but the kind of things it can accomplish is pretty amazing.  If you have any doubts, check Can Your Programming Language Do This? at Joel on Software.

There are raging and never ending debates as to whether JavaScript is even a true programming language or whether it is an object-oriented language at all but that’s beside the point.

IMHO, JavaScript does indeed exhibit object-oriented programming language features. As per Yahoo! Answers, there are two models of object orientation. One is based on classes as the templates from which to create objects (instances of classes), and the other relies on prototypes that are already objects and which can be cloned to create new instances. JavaScript (and others) takes the prototype approach.

In any case, today I am here to guide you towards few sources which should go a long way in giving you a good idea about what JavaScript is and what it isn’t. Statutory warning – most of them are of advanced nature :). So, here you go, look at these sources which might quench your thirst for advance level JavaScript:

JavaScript Execution Context, Closure, Eval and “this” Keyword

Javascript Closures

The Magic Eval

Quirksmode JavaScript Tutorials

Scope in JavaScript

Variable Scope for New Programmers

Code Conventions for the JavaScript Programming Language

The JavaScript Programming Language

Douglas Crockford: JavaScript Doesn’t Suck

JavaScript as a Functional Language

Functional JavaScript – Harnessing the power of the Function Object

Yahoo! User Interface Blog has these excellent resources:

Douglas Crockford, a senior JavaScript Architect at Yahoo! and introducer of JavaScript Object Notation (JSON) to the world, whose  JavaScript: The World’s Most Misunderstood Programming Language is a must read, had a go at clearing the common JavaScript misgivings for you folks out there:

YUI Theater: Douglas Crockford, The JavaScript Programming Language

Video: Douglas Crockford, “An Inconvenient API: The Theory of the Dom”

Video: Douglas Crockford, “Advanced JavaScript”

Learning JavaScript Programming Language through Video Lectures