Thursday 12 July 2012

JavaScript in Action : an HTML5 primer


JavaScript in Action : an HTML5 primer

As I write this web-site with 2012 almost upon us, HTML5 is a curious beast. It’s been around in some form or another for a couple of years now, but it wasn’t that long ago that the XHTML 2.0 progress was halted, which made HTML5 the de facto next standard for Web development.

JavaScript in Action : Choosing a Doctype


JavaScript in Action : Choosing a Doctype

When I first began doing Web development, I had no appreciation of an HTML page’s document type declaration, aka DOCTYPE. I believe I was using HTML 3.2 at the time, and only understood that meant pages must begin with:

JavaScript programming goals


JavaScript programming goals

In starting a new endeavor, whether it’s learning JavaScript for the first time or learning better, more modern JavaScript techniques, one ought to have a sense of the goals before starting out. The purpose of a Web site, of course, is for it to be viewable and usable by clients—end users with their Web browsers.

JavaScript versions and browser support


JavaScript versions and browser support

As already stated, the core of JavaScript comes from ECMAScript, which is currentlyin version 5 as of 2009. The most current version of JavaScript, based upon ECMAScript 5, is JavaScript 1. 8. 5, which came out in July of 2010.

Why JavaScript is a good thing


Why JavaScript is a good thing

If you’re reading this book, you presumably have an interest in learning JavaScript,but I’d be remiss if I didn’t also present my thoughts as to why JavaScript is a GoodThing. The most important and obvious reason is that JavaScript is useful. A largeswath of the dynamic functionality that’s normal in today’s Web sites is accomplishedusing JavaScript.

JavaScript isn’t...


JavaScript isn’t. . .

Now that you have an understanding of what JavaScript is (hopefully), let’s take a minute to talk about what JavaScript isn’t. This could also be called the “Myth Busters” section of the chapter!First, JavaScript is not Java. This is a common point of confusion and reasonably so (they both start with “Java,” after all). But, no, JavaScript is not Java.

What is JavaScript ?


What is JavaScript ?

JavaScript is, technically speaking, an object-oriented, weakly typed, scriptinglanguage. One could toss more jargon into this definition, but those are the mostcritical aspects of the language. Let’s look at them in detail. First, JavaScript is an object-oriented programming language, as opposed to aprocedural one. This distinction has several implications.

JavaScript intro


JavaScript intro

JavaScript today is one misunderstood programminglanguage. From what JavaScript can do, to what it can’t,to what JavaScript isn’t (JavaScript is not Java), there’s a lot ofconfusion about this technology that’s at the heart of today’s Web.