Simply JavaScript
In past years I’ve really only tinkered with JavaScript as necessary, both personally and for work. But recently, I have read articles on the current state of the language and what can be done with it, and even attended a presentation put on by Dustin Diaz back in October.
I didn’t know enough about JavaScript previously to realize just how flexible it is, and how much can be achieved with it. But after having read Simply JavaScript from SitePoint, I realized what I have been missing! My eyes have been opened to possibilities that I had never considered before.
This book starts with an introductory chapter, then a chapter on the basics of JavaScript. Despite the basics being covered, I don’t think this book is suitable for someone just starting to learn JavaScript, unless they are already familiar with programming concepts. I don’t think one chapter is enough to get someone started in this regard.
The remaining chapters cover a variety of topics: Document Object Model (DOM), Events, Animation, Forms, Errors, and AJAX. They seem to cover the usual spectrum of topics that are addressed in other JavaScript books. Throughout, examples are given based on a JavaScript library called Core, which is available for download from the SitePoint site.
Core handles a lot of nitty-gritty details of the language, such as registering event handlers and manipulating element styles. It does more than that of course, but those are just two examples. And the library is extensible, so you could customize it with whatever functionality you would think appropriate in a “Core” library.
Back to the chapters, it is explained HOW Core is being used, as well as how to write scripts to make use of Core’s functionality.
The final chapter leaves off with a look at some of th amazing things that are possible with JavaScript, including flickr, Google Mail, and numerous other Rich Web Applications. Truly amazing - and all this time, I had no idea!
At the back of the book is a large appendix that shows the full source of the Core library (not all that large actually), and walks you through each function the library provides. This made for great reading so as to understand how certain common tasks may be abstracted.
After finishing this book, I have come to the realization that JavaScript is so much more than just a simple utility…When used properly, it is quite capable of powering sophisticated web applications and websites. The way the Core library is constructed has shown me how related functions can be grouped within yet another function, thereby stimulating namespaces, which I don’t think JavaScript officially has currently. I suspect that knowing how code can be simplified in such a way, I will be revisiting my existing JavaScript and rewriting it in the new namespaced fashion, which could greatly help maintainability.
Overall, I would suggest this book is for someone with an interest in writing modern JavaScript. The reader should preferably already know JavaScript basics, or otherwise be familiar with coding principles. Else the content may be a bit much for the JavaScript newbie to keep up with.