Tag Archives: JavaScript

BOOK REVIEW: Node Up and Running

Front-end web developers everywhere know JavaScript and use it for everything from DOM manipulation to Ajax applications. That’s why I am really excited that Node.js exists—JavaScript running on the server side, running applications from the server rather than the browser. The exciting aspect of it is it opens up server-side programming to front-end developers who until now have focused on the browser.

Node Up and Running by Tom Hughes-Croucher and Mike Wilson provides a primer on Node that I really enjoyed. I have not worked with Node before but I’m experienced with JavaScript—in other words, I’m the ideal reader for an introductory book such as this. The most useful chapter for me was actually the first, which introduces Node and—most importantly—explains the scalability of Node and its ability to handle large applications. I wasn’t sure it was suitable for these things compared to Java or other server-side languages. I wish the book dived deeper into these questions, but the chapter was enough to make me feel comfortable using Node in these situations.

The rest of the book covers basic Node concepts like loops, error handling, APIs and data handling. All the basics you will need are here, but there’s more to Node and I will be looking forward to a more extensive Node “cookbook” from O’Reilly in the future. (Tom Hughes-Croucher said on Amazon.com that it is in the works.) Node Up and Running is short so you don’t get into all the details, but I was impressed it packed in as much useful details as it did. I also liked that the very first project code in the second chapter consisted of a chat server and a Twitter service—both look impressive and show off Node functionality.

One complaint about Node Up and Running is that the book covers a quickly-changing framework and some parts of the book are outdated at this point. Another criticism is that the book is too short—it’s not even 200 pages, so it’s really just an introduction to Node. But as an introduction it serves its purpose very well and entices front-end developers with some great server-side code that can be built with their JavaScript skills. It’s an exciting time to be a JavaScript developer!

Node Up and Running
Tom Hughes-Croucher and Mike Wilson
Published by O’Reilly
US $34.99
Rating: 9/10
Buy at Amazon.com

BOOK REVIEW: Trevor Burnham’s CoffeeScript For Pragmatic Programmers

CoffeeScript cover

CoffeeScript, a programming language that lets you output JavaScript with cleaner code, is barely two years old but it’s already exciting developers. I hadn’t heard of it until I got a copy of CoffeeScript: Accelerated JavaScript Development by Trevor Burnham, from The Pragmatic Programmers line of books “by developers for developers.” I could tell right away that Trevor is a decent developer and has the chops to write a book like this—his grasp of JavaScript, JavaScript frameworks and of course CoffeeScript is solid. His writing style is also fairly clean and easy to follow, which is important for a book like this that covers a language not everyone has experienced.

CoffeeScript is basically a primer for the CoffeeScript language: you’ll learn the basics of the language and also dive into some very basic chapters on jQuery and Node.js, but there’s a lot more to learn that you will have to find on your own. This isn’t necessarily a bad thing—some of my best learning experiences have been spurred by small, lean books—but this is probably not the complete reference on CoffeeScript.

I also should point out that CoffeeScript is not JavaScript. CoffeeScript is compiled and translated into JavaScript after the coding process, which lets you work with the cleaner CoffeeScript syntax throughout your project. Ruby and Python programmers will appreciate CoffeeScript more than the typical JavaScript and jQuery programmer. I happen to be one of the latter more than the former, so I read this book from that perspective. Fortunately, CoffeeScript clearly explains how to work with CoffeeScript from the initial installation, which some books sometimes fail to do.

The hands-on work done in CoffeeScript comes from a game project that Trevor builds and improves from chapter to chapter. I like smaller, in-chapter projects as well as larger projects that span over multiple chapters, but sometimes the code didn’t seem very clean or easy to follow. Maybe some more pages devoted to writing and explaining the code would have helped, or perhaps the larger project could have been replaced with some smaller ones. There’s a few ways Trevor could rework the code and make it easier to learn.

I really enjoyed reading CoffeeScript and would like to branch out into using CoffeeScript more to improve my code production. I’m looking for other books to take me further down the learning path, but the book has provided me a fine head start.

CoffeeScript: Accelerated JavaScript Development
Trevor Burnham
Published by Pragmatic Bookshelf
US $29
Rating: 8/10
Buy at Amazon.com

BOOK REVIEW: Eloquent JavaScript Simplifies Scripting For The Web

Marijn Haverbeke’s Eloquent JavaScript: A Modern Introduction to Programming is really about the fundamentals of coding clean JavaScript for websites. In any professional’s career, “fundamentals” are taught early on but can be forgotten or pushed aside in favor of getting projects out the door when deadlines are tight or in favor of new training that do things differently. In any case, fundamentals are usually the foundation of good programming and it’s beneficial to revisit them from time to time.

Eloquent JavaScript does a good job of detailing the fundamentals and explaining concepts like the stack and the environment. This attention to detail is what sets the book apart from other JavaScript books. However, Eloquent JavaScript is a comprehensive JavaScript guide so many features and techniques aren’t discussed. Another downside is the lack of tutorials or step-by-step examples: since the focus is on basic concepts, Marijn only needs basic snippets of code to illustrate his examples. There are a few larger projects used to demonstrate things over the course of a chapter or two, but they’re not really laid out as tutorials.

There are other aspects of JavaScript that aren’t discussed in Eloquent JavaScript, the most glaring of which might be libraries like jQuery. jQuery, Dojo and other JavaScript libraries are commonly used to make coding JavaScript easier, but Eloquent JavaScript mentions them on one page in passing. Again, there are many books out there that cover jQuery—and far more resources and code examples online—but this book is all about understanding JavaScript and knowing how to write elegant code from scratch.

Eloquent JavaScript is a very specialized book for programming purists and web developers who want to write the best code possible. Many developers are happy writing code that simply works, and this book may not be for them—a larger resource like O’Reilly’s JavaScript: The Definitive Guide or a book on jQuery might be a better fit for them. But if you want to grasp all the basic concepts behind JavaScript and write more eloquent code, try Eloquent JavaScript.

Eloquent JavaScript: A Modern Introduction to Programming
Marijn Haverbeke
Published by No Starch Press
US $29.95
Rating: 8/10

buy from amazon