The Time is Right to Learn JavaScript

» If you review the Intro to PHP at w3schools, you'll find Javascript listed as one of the items there under the heading » What You Should Already Know. That's interesting .. cuz you dont need to know Javascript in order to learn PHP.

JavaScript: The Definitive Guide, 6th edition, released May 2011 I know .. cuz I've been learning PHP, and I dont know JavaScript. (Rather, I know about JavaScript .. specifically its dot.syntax - from

[ Note the converse is not true. PHP is not listed as a prerequisite for learning JavaScript. (Only item listed is HTML. Heck, not even CSS.) ]

PHP code is executed on the web server. JavaScript, on the other hand, is executed on your local machine (.. in your browser). Two totally different environments.

Most web people, I'd imagine, learn Javascript (browser scripting) before they learn PHP (server-side scripting).

This seems to be the natural progression of things. In other words » first HTML (page structure & conent) » then CSS (presentation & styling) » JavaScript (behavior) » PHP/MySQL (server-side mojo).

HTML5 logo» HTML5 Makes This a Good Time

Recently I've been learning HTML5. The longer I look, the bigger HTML5 seems. From what I can see, it promises to be a major step forward for the Web.

The main reason for its geeky coolness (by far) is the new HTML5 API's. (I count 31 of them.) As Erik says, HTML5 means » more power to the browser as a programming platform.

And the language HTML5 uses to exercise this power? .. that's right » JavaScript.

In HTML 4, for example, you need to specify JavaScript as the language inside the script tag (i.e. » <script type="text/javascript"> ). In HTML 5, on the other hand, you neednt specify (rather merely » <script> ) .. cuz JavaScript is assumed (.. as the default scripting language for an HTML5 web page).

So it's clear, even from my limited vantage point .. as a non-professional web-hacker .. that the time for learning JavaScript has arrived.

••• today's entry continues here below •••

I'm not talking about becoming a pro (a ninja) .. rather about learning enough to be able to formulate intelligent questions. That's the trick. Cuz the ability to ask intelligent questions gives you access to most of the groovy coolness. But even that takes more time than you might imagine.

So it seems time spent learning Javascript today will continue to pay rich dividends .. well into the web's future. Sorta feel like I'm looking at the dawn of a new day from a distant peak.

JavaScript: The Definite Guide, 6th edition, released May 2011 » Release of 6th Edition Rhino

Along these lines, Flanagan just released an updated version of his book (few weeks ago) .. titled » JavaScript: The Definitive Guide: Activate Your Web Pages (.. aka "the Rhino book." That's a picture of a 'Javan' rhino on the cover).

This is the 6th edition .. and the title's first upgrade since 2006 (« the 5th edition). Heck, the 4th edition was released in 2001. (First edition way back in '96.) So it's not like Flanagan releases an upgrade every year. At this rate, this book should do ya 'til 2016.

From what I can see, researching various JavaScript titles and reader-comments over at Amazon, it seems obvious this is *thee* JavaScript book to get. (And NOW seems like an excellent time to invest in a text .. rather than doing the library thing.) Learning JavaScript will make it easier to do more cooler things with a web page.

[ Can you see it? Can you see the web-programming stars aligning? =) ]

I really like that Rhino-6 addresses the new HTML5 API's (.. chapters 18, 20, 21 & 22). And it also contains a chapter on jQuery (.. the "write-less, do-more JavaScript library" .. in chapter 19).

JavaScript: The Definitive Guide, 6th edition, released May 2011» Grabbing the Rhino by its Horn

If you need a gentle (gore-less) intro to JavaScript -- prior to grabbing the Rhino by its 1100-page horn -- you can definitely find that at w3schools.

JavaScript supports the Object-Oriented Programming model (OOP) .. tho, like PHP, it can also be used procedurally, funcionally. I'm wondering if these new HTML5 API's will use an OOP interface (.. which I'll need to learn).

My buddy Nigel (NZ) says JavaScript is a better language than PHP (.. PHP primarily targets string-manipulation) .. cuz JavaScript has more LISP snuck into it (.. and therefore more lambda calculus).

Another difference is that, for PHP, you need to install (and configure) a LAMP stack (Linux, Apache, MySQL & PHP) on your machine (as a local development environment) .. which might pose a challenge for some. Not so for JavaScript .. which uses your already-installed browser to run the scripts (code).

A few years ago I had to get a VPS .. which required I learn about servers (.. how to administrate one). This also meant I had to learn the Unix shell (command-line terminal) .. cuz it gives you access to so much administrative power. Major time-saver. All server admins use the shell to work their Linux mojo. So it's not surprising I went the PHP-route first.

I am finding many JavaScript similarities with PHP. For example, they both use the double-slash ( // ) for single-line comments, and the slash-star ( /* ... */) for multi-line. Variable types are also similar .. tho JavaScript doesnt use the $dollar_sign to begin each $variable_name, like PHP does. I am pleasantly encouraged by finding these and many more similarities.

Note that HTML5 is coming (.. like a freight train in the night), but hasnt yet arrived. This will give us time to get ready .. so we can be waiting for the train when it finally arrives at the station. (Always nice to be a step ahead of the curve.)

I said it before, but it bears repeating » HTML5 will be like Web 1.0 .. the way the Web should have begun. Somebody pinch me. ■

For more along these lines, here's a Google search preconfigured for the query » learn javascript programming book

Radified home

About this Entry

This page contains a single entry by Rad published on June 5, 2011 6:05 AM.

Exercise & Physical Fitness » Yoga vs Running & Weight-lifting was the previous entry in this blog.

Move #26 & Javascript Curios is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.