JavaScript Is Growing Up
Published:
JavaScript once felt like the language used for small tricks inside a web page. Validate a form, open a window, change an image, or make a menu move. The important programming seemed to happen on the server.
That picture is changing. Web applications are becoming larger, and more logic is moving into the browser. Libraries such as jQuery make browser differences easier to manage, while frameworks and patterns are beginning to appear for organizing larger JavaScript codebases.
An even stranger development is Node.js, created last year. It uses Google’s V8 JavaScript engine to run JavaScript outside the browser and is attracting attention for network applications. The idea of using the same language on both client and server still feels unusual.
JavaScript itself has many awkward parts. Type coercion can surprise people, global variables can create problems, and the language has historical decisions that cannot easily be removed because so much of the web depends on compatibility. Douglas Crockford’s writing about the “good parts” of JavaScript is useful because it accepts that the language needs discipline.
Still, the web gives JavaScript one enormous advantage: availability. Every modern browser already contains a JavaScript engine. A program written for the browser can reach users without asking them to install a special runtime.
I think this is changing the reputation of the language. Developers may not love every part of JavaScript, but it is becoming difficult to treat it as a toy. The browser is becoming an application platform, and the language inside that platform naturally becomes more important.
It is interesting to watch a technology grow beyond the job for which people first noticed it. JavaScript was designed in a hurry for a young web. Fifteen years later, that young language is being asked to support increasingly serious software.