‘Meteor in Action’: A good how-to guide for learning a popular JavaScript framework – #programming #bookreview


Meteor in Action

Stephan Hochhaus and Manuel Schoebel

Manning – paperback

I have worked with several JavaScript frameworks, and Meteor has become a favorite, mainly because it is closely related to the MEAN stack family and plays well with MongoDB and Node.js.

As the Meteor in Action authors note: “Meteor runs on top of Node.js and moves the application logic to the browser, which is often referred to as single-page applications. The same language is used across the entire stack, which makes Meteor an isomorphic platform. As a result, the same JavaScript code can be used on the server, the client, and even in the database.”

Meteor is versatile and easy to use, particularly for simple applications. But, like any other JS framework, it does have a learning curve. And there are some inherent weaknesses, as well as strengths, that must be considered when deciding if Meteor is the right choice for a particular project.

Meteor in Action can give you a good grounding in Meteor’s basics, plus solid momentum along the path toward Meteor mastery. The book begins with a polished and not-too-lengthy overview of Meteor’s Open Source framework. Then it shows how to build a small, reactive game application. From there, the major topics include: templates; data; fully reactive editing; users, authentications, and permissions; exchanging data; routing; the package system; advanced server methods; building and debugging; and going into production.

Another reviewer has stated that parts of this book may be outdated soon, because some of the technology associated with Meteor is changing fast. But not every work site immediately will keep up with the latest and “greatest” changes to Meteor software, of course. And, you may encounter applications needing support that are still running earlier releases of Meteor.

This  is a worthy and valuable book for anyone just starting to learn Meteor. And it likewise can be helpful to Meteor users who want better understanding of the framework, how it is put together, and how it can be used effectively in large applications. The two authors of this book have been working with Meteor since the framework’s “infancy” in 2011.

Si Dunn




Elixir in Action: A good guide to the ‘alternative language for the Erlang virtual machine’ – #programming #bookreview



Elixir in Action

Saša Jurić

Manning – paperback

“Elixir,”  Saša Jurić writes, “is a modern functional programming language for building large-scale, distributed, fault-tolerant systems for the Erlang virtual machine.”

What Elixir really is, of course, is a breath of fresh air for software developers who find it hard or confusing to work with Erlang’s sometimes complicated syntax and conventions.

Erlang has long been almost off the chart–the bottom of the chart–when computer languages are stacked up by popularity.  It began its oddball life in the 1980s as a programming language for the computers in telephone switching systems, specifically Swedish-made, Ericsson telephone switching systems.

Indeed, I first encountered Erlang in the  late 1980s while trying to help Ericsson sell Swedish-made computers to American banks. Back then, I counted my lucky stars that I didn’t have to learn it, because I was a tech writer, not a software developer.

Today, however, Erlang and its Open Telecom Platform (OTP) libraries are gaining new converts among serious practitioners of functional programming. Many of them likewise are drawn to Erlang’s built-in support for concurrency, distribution and fault tolerance.

The digital Swedish meatball known as Erlang turns out to be a powerful choice for providing high reliability and scalability to networked and distributed systems with multi-core processors. Telephone networks require high reliability and flexible scalability. And Erlang was designed to help provide both — without limiting itself to telecom systems.

Some of Erlang’s lack of popularity can be blamed on the language’s somewhat difficult learning curve. But it also has not been heavily promoted to software developers. That has been changing recently as companies and developers learn more about Erlang’s good track record, Saša Jurić points out.

“It powers various large systems and has been doing so for more than two decades, such as the WhatsApp messaging application, the Riak distributed database, the Heroku cloud, the Chef deployment automation system, the RabbitMQ message queue, financial systems, and multiplayer backends. It’s truly a proven technology.”

In Elixir in Action,  Saša Jurić nicely meets his goal of writing a book that brings “programmers new to Elixir and Erlang to the point where they can develop complex systems on their own.” Elixir provides an alternative language based on several other languages, including Ruby and Clojure, as well as Erlang.

Jurić’s how-to guide requires no prior experience with either Erlang or Elixir, but you should be familiar with at least one other programming language, such as JavaScript, C# or Ruby.

His book is divided into three parts:

  • Part 1, “The Language,” offers a high-level overview of Erlang and Elixir. Then it delves into Elixir’s basic building blocks and details common functional programming idioms.
  • Part 2, “The Platform,” focuses on primary aspects of BEAM, the Erlang virtual machine, as well as “how concurrency works and how it can help you build reliable systems.” Indeed, “[c]oncurrency is at the heart and soul of Erlang systems,” Jurić writes. “Almost every nontrivial Erlang-based production system is highly concurrent. Even the programming language is sometimes called a concurrency-oriented language.”
  • Part 3, “Production,”discusses “production aspects of BEAM-powered systems,” as well as “how to package components, reuse third-party libraries, and build a simple web server,” and “how to build a deployable standalone release and how to interact with the running system.”

Elixir in Action does not cover everything. But it provides fine overviews, clear how-to instructions, and compact code examples that illustrate important points. It can get you going in good directions.

“Elixir,” the author emphasizes, “lowers the entry barrier into the Erlang world and improves developer productivity.”

 — Si Dunn


D3.js in Action: A good book packed with data visualization how-to info – #javascript #programming

D3.js in Action

Elijah Meeks

Manning – paperback


The D3.js library is very powerful, and it is full of useful choices and possibilities. But, you should not try to tackle Elijah Meeks’s new book if you are a JavaScript newcomer and not also comfortable with HTML, CSS and JSON.

It likewise helps to understand how CSVs (Comma Separated Values) can be used. And you should know how to set up and run local web servers on your computer. Prior knowledge of D3.js and SVG (Scalable Vector Graphics) is not necessary, however.

Some reviewers have remarked on the amount of how-to and technical information packed into DS3.js in Action. It is indeed impressive. And, yes, it really can seem like concepts, details and examples are being squirted at you from a fire hose, particularly if you are attempting to race through the text. As Elijah Meeks writes, “[T]he focus of this book is on a more exhaustive explanation of key principles of the library.”

So plan to take your time. Tackle D3.js in small bites, using the d3js.org website and this text. I am pretty new to learning data visualization, and I definitely had never heard of visualizations such as Voronoi diagrams, nor tools such as TopoJSON, until I started working my way through this book. And those are just a few of the available possibilities.

I have not yet tried all of the code examples. But the ones I have tested have worked very well, and they have gotten me thinking about how I can adapt them to use in some of my work.

I am a bit disappointed that the book takes 40 pages to get to the requisite “Hello, world” examples. And once you arrive, the explanations likely will seem a bit murky and incomplete to some readers.

However, that is a minor complaint. D3.js in Action will get frequent use as I dig deeper into data visualization. D3.js and Elijah Meeks’s new book are keepers for the long-term in the big world of JavaScript.

Si Dunn

JavaScript Application Design: A book you likely need if you are working with, or still learning, JavaScript – #programming #bookreview

JavaScript Application Design

A Build First Approach

Nicolas Bevacqua

Manning – paperback


I didn’t know how much I needed this book until I started reading it and exploring its code examples.

Many of us who have worked with JavaScript started our connections to the language in very haphazard fashions. We learned some of it on the job, under deadline pressure to fix or update somebody else’s code. Or we took an introductory class or two and then started picking up whatever else we could on the fly, including the bad habits of others around us who seemed to know a bit more about JavaScript than we knew at the moment.

Unfortunately, JavaScript is a big, messy programming language, and it offers numerous opportunities to crash and burn if you really don’t know what you are doing.

In his new book, JavaScript Application Design, Nicolas Bevacqua makes a compelling case for using “the Build First philosophy of designing for clean, well-structured, and testable applications before you write a single line of code.”

He writes: “You’ll learn about process automation, which will mitigate the odds of human error…. Build First is the foundation that will empower you to design clean, well-structured, and testable applications, which are easy to maintain and refactor. Those are the two fundamental aspects of Build First: process automation and design.”

In his well-written text, he argues: “Front-end development requires as much dedication to architecture planning and design as back-end development does. Long gone are the days when we’d copy a few snippets of code off the internet, paste them in our page, and call it a day. Mashing together JavaScript code as an afterthought no longer holds up to modern standards. JavaScript is now front and center.”

He continues: “We have many frameworks and libraries to choose from, which can help you organize your code by allowing you to write small components rather than a monolithic application. Maintainability isn’t something you can tack onto a code base whenever you’d like; it’s something you have to build into the application, and the philosophy under which the application is designed, from the beginning. Writing an application that isn’t designed to be maintainable translates into stacking feature after feature in an ever-so-slightly tilting Jenga tower.”

Bevacqua divides his nine-chapter book into just two parts: build processes and managing complexity. Here is how the chapters are organized:

    1 – Introduction to Build First
    2 – Composing build tasks and flows
    3 – Mastering environments and the development workflow
    4 – Release, deployment, and monitoring
  • 5 – Embracing modularity and dependency management
    6 – Understanding asynchronous flow control methods in JavaScript
    7 – Leveraging the Model-View-Controller
    8 – Testing JavaScript components
    9 – REST API design and layered service architectures

Bevaqua notes that “Linting is often referred to as the first test you should set up when writing JavaScript. Where linters fail, unit tests come in.” He strongly pushes testing and automation right from the start.

Linting soon leads to Grunt, which Bevaqua uses as a task runner and key build tool (with selected modules) in this book. “Grunt is a tool that allows you to write, configure, and automate tasks–such as minifying a JavaScript file or compiling a LESS style sheet–for your application,” he states. (It also works well on Windows machines, which I find handy.)

Grunt leads to running a bit of Node.js on the command line. And if you’ve never worked with Node.js, Bevacqua takes the reader smoothly through the process of installing it and using it in linting exercises. Indeed, he devotes an entire appendix (B) to installing and running Grunt and picking the right plugins for the right tasks and targets.

One of the best parts of this book, to me, is how the author uses short code examples to introduce a concept, and  then builds upon the examples with helpful descriptions and more short but expanded code samples.

Nicolas Bevacqua offers his readers plenty of helpful how-to and why information. Using his book, I have begun applying the Build First approach to some new projects and learning to how test and automate more of my work. I feel as if I now have a good shot at getting a lot better at JavaScript.

There is one small but important glitch to note: At two points in my preview copy of the book from Manning, Bevacqua shows what he calls a simple way to create bare-minimum JSON manifest files. For example, echo “{}” > package.json. Creating a blank, starting-point manifest file did not work this way for me. Instead, I had to use echo {“name: ” “project-name”} > package.json. The empty package.json issue apparently is somehow related to certain versions of Node’s npm.

Si Dunn 

jQUERY UI IN ACTION: A smooth guide to getting, learning and using plugins supported by the jQuery Foundation – #bookreview

jQuery UI in Action

TJ VanToll

 (Manning – paperback)


TJ VanToll had two straightforward goals in mind when he decided to write this nicely prepared book: “I wanted to write about how to use the jQuery UI components in real-world usage scenarios and applications. I also wanted to tackle the tough questions for jQuery UI users. [Such as] Why should you use the jQuery UI datepicker instead of the native date picker included in HTML5? How do you use jQuery UI on mobile devices, especially in low bandwidth situations?”

According to the jQuery Foundation, “jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.”

The problem with popularity, of course, is that jQuery became widely employed soon after it was introduced in 2006. Users quickly created a flood of jQuery plugins that, Van Toll writes, “had inconsistent APIs, and often had little or no documentation. Because of these problems, the jQuery team wanted to provide an official set of plugins in a centralized location. In September 2007 they created a new library with these plugins—jQuery UI.”

He adds: “From a high level, jQuery UI was, and still is, a collection of plugins and utilities that build on jQuery. But dig deeper and you find a set of consistent, well-documented, themeable building blocks to help you create everything from small websites to highly complex web applications. Unlike jQuery plugins, the plugins and utilities in jQuery UI are supported by the jQuery Foundation. You can count on them to be officially supported and maintained throughout the life of your application.”

Well-written and well-illustrated, jQuery UI in Action reflects VanToll’s knowledge and experience as a professional web developer and member of the core jQuery UI team.

The book is structured into three parts, encompassing 12 chapters. And it assumes readers have at least basic experience with JavaScript, CSS, and jQuery.

Part One’s chapters introduce jQuery UI and “the ins and outs of widgets…the core building blocks of jQuery UI.”

Part Two’s chapters offer “a comprehensive look at the components of jQuery UI: twelve jQuery UI widgets (chapters 3–4), five jQuery
UI interactions (chapter 5), numerous jQuery UI effects (chapter 6), and the jQuery UI CSS framework (chapter 7).” VanToll explains how each component works and shows how to apply the knowledge to real-world applications. The example projects include: building complex webforms with jQueryUI; using layout and utility widgets; adding interaction to interfaces; and using built-in and customized themes to provide “a consistent look to all widgets.”

Part Three focuses on “Customization and advanced usage.” Here, VanToll explores such topics as using the widget factory to create custom widgets, preparing applications for production, and building a flight-search application “at real-world scale.” In the final chapter, he takes us under jQuery’s hood “to dig into a series of utilities, methods, and properties intended for more advanced usage of the library.”

If you work with jQuery or are ready to start using it, take a good look at jQuery UI, as well. As this book promises, “You’re only one tag away from richer user interfaces….” That tag is pretty simple: <script src=”jquery-ui.js”> — but a lot can happen once you include it.

TJ VanToll’s new book should be your go-to guide for getting, learning and putting jQuery UI into action.

Si Dunn








You’ll master jQuery UI’s five main interactions—draggable, droppable, resizable, selectable, and sortable—and learn UI techniques that work across all devices.

Node.js Blueprints – A good how-to book that covers plenty of JS frameworks and tools – #programming #bookreview

7338OS_Node.js Blueprints (1)


Node.js Blueprints

Develop stunning web and desktop applications with the definitive Node.js

Krasimir Tsonev

(Packt Publishing paperback, Kindle)


Krasimir Tsonev’s new Node.js Blueprints book has proven helpful for me as I try to become more adept at using Node.js and a few of the many software packages that can work with it, such as AngularJS, Backbone.js, Ember.js, ExpressJS, Grunt.js and Gulp.js.

If you’ve never used Node.js before, here is its official description from the Nodejs.org site operated by Joyent, Inc.:

“Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.”

The focus of Node.js Blueprints is on showing readers the basics of how to use various frameworks, libraries and tools that can help them develop real-world applications that run with Node.js.

Tsonev’s approach is to introduce several popular frameworks, libraries and tools, provide code examples and explain the roles of various sections or modules within the code. The goal in each chapter is to help the reader learn how to work with a framework or other package and create a simple application — a blueprint for something bigger — that can run with Node.js

The book is aimed at intermediate-level JavaScript developers, especially “web developer[s] with experience in writing client-side JavaScript,” who are interested in using Node.js in web and desktop applications.

The 12-chapter, 268-page book is structured as follows:

  • Chapter 1, Common Programming Paradigms, focuses on how “common design patterns known in JavaScript” can be applied in Node.js, as well.
  • Chapter 2, Developing a Basic Site with Node.js and Express, shows how to use ExpressJS, “one of the top frameworks on the market,” in applications “using the built-in Express modules and…your own modules.”
  • Chapter 3, Writing a Blog Application with Node.js and AngularJS, explains how to use the Angular frontend framework with Node.js, MongoDB and MySQL to create “a dynamic application that works with real databases.”
  • Chapter 4, Developing a Chat with Socket.IO, points out that “every big web app uses real-time data” and how it is “important to show instant results to the users.” And it covers “the creation of a simple real-time chat,” while emphasizing that “[t]he same concept can be used to create an automatically updatable HTML component.”
  • Chapter 5, Creating a To-do Application with Backbone.js, notes that “Backbone.js was one of the first frameworks that introduced data binding at the frontend of applications.” A simple (but useful) to-do application is used to illustrate how to use the powerful framework along with Node.js.
  • Chapter 6, Using Node.js as a Command-line Tool, explains that many command-line tools have been written with Node.js, and this chapter shows how to create one. The result is “a simple application which grabs all the images in a directory and uploads them to Flickr.”
  • Chapter 7, Showing a Social Feed with Ember.js, is centered on producing “an Ember.js example that will read a Twitter feed and display the latest posts. That’s actually a common task of every developer,” Tsonev says, “because a lot of applications need to visualize social activity.” (Reviewer’s caution: Ember.js has a long learning curve, and this chapter just barely gets you started.)
  • Chapter 8,  Developing Web App Workflow with Grunt and Gulp, explains how to use two popular task runners. “Grunt is the de facto standard” for simplifying and managing tasks such as concatenation, minification, templating and other operations before an application is delivered to users. Gulp, meanwhile, is a popular build system. The projects in this chapter include generating a cache manifest file using Grunt, and concatenating and minifying using Gulp.
  • Chapter 9, Automating Your Testing with Node.js, is especially aimed at fans (and forced-by-employer “enthusiasts”) of test-driven development and behavior-driven development. The chapter introduces how to use the Node.js versiosn of the Jasmine and Mocha frameworks for testing JavaScript code and how to use the headless browser PhantomJS to test user interfaces. You also are shown how to use DalekJS, a Node.js module that allows you to control major browsers such as Google Chrome, Internet Explorer and Firefox while doing interface tests.
  • Chapter 10, Writing Flexible and Modular CSS, emphasizes how “[t]he Web is built on the basis of three languages–HTML, CSS, and JavaScript” and “Node.js provides really helpful instruments to write CSS…and improve our style sheets.” Other topics include the Less preprocessor, the Stylus preprocessor, the Sass preprocessor, and the AbsurdJS preprocessor.
  • Chapter 11, Writing a REST API, focuses on building a Representational State Transfer (REST) Application Programming Interface (API). The chapter’s Node.js project is “an API of a simple online books library. The resources are the books, and they will be accessed through the REST API.” Tsonev notes that “Node.js is very often used to build REST APIs. Also, because it is a common tool, we have several possible approaches.” In this chapter, however, the emphasis is “to build our REST API from scratch, because it will be more interesting and challenging.”
  • Chapter 12, Developing Desktop Apps with Node.js, declares that “Node.js can be used to produce desktop programs, and w don’t have to learn a new language or use a new tool.” In this chapter, Tsonev shows how to use node-webkit to create a file browser that runs as a desktop program, reads files from the hard drive, displays the files on-screen, and also displays images.

Tsonev’s well-written book introduces a lot of good material to help you get started. After that, you have to do the work to get better at using the various frameworks and tools. But the writer gives you plenty of possibilities to start with in your quest to become a better developer.

You may encounter an occasional typo in the book’s printed code. Thus, be sure to download the available code examples for reference, even if you prefer to type in code by hand (one of my favorite ways to learn, too).

And, during the lengthy process to write, edit, and publish the book, some of the software has changed to newer versions than are called for in the text–which may affect how something works in certain small areas of code.  Indeed, in programming books that rely on several different software packages, changes always happen, and those changes seldom are convenient to the printing deadline.

So if something doesn’t work the way you expect, and you are positive your hand-typed code has no known mistakes, don’t yell at the author. Download the code examples. Look for the publisher’s errata files. Seek out comments at book sites such as the readers’ reviews on Amazon, as well as comments on social media sites and specialized sites where JavaScript and Node.js developers hang out. Also take a look at the “official” websites for the frameworks and tools.

I have been wanting to learn more about working with Node.js, and Node.js Blueprints definitely is filling that need.

Si Dunn

Ember.js in Action – An ambitious overview, with glitches – #programming #bookreview

Ember.js in Action

Joachim Haagen Skeie

(Manning – paperback)


The Ember.js JavaScript framework has “a steep learning curve,” Joachim Haagen Skeie cautions readers repeatedly in his new book.

Indeed, Ember does. I’ve watched that learning curve confuse and frustrate several experienced JavaScript and Ruby on Rails developers. And I’ve banged my own (thick) skull against the Ember.js framework several times while (1) trying to learn it from an assortment of books and websites, including emberjs.com, and (2) building a few basic apps.

Skeie’s new book is an ambitious overview of software that bills itself as “a framework for creating ambitious web applications.” And Skeie ambitiously does not start out with a lame “Hello, World!” example. Right in Chapter 1, you dive into building a real-world application for creating, editing, posting and deleting notes. ” The source code for the Notes application weighs in at about 200 lines of code and 130 lines of CSS, including the templates and JavaScript source code,” Skeie points out. “You should be able to develop and run this application on any Windows-, Mac-, or Linux-based platform using only a text editor.”

I got  the Notes app to (mostly) run on a Windows machine and a Linux machine. But I can’t get it to save the contents of notes, even though I downloaded the book’s code samples, and my code seems to match what the author highlights in his book. (Still trying to sort out the problem. Perhaps something is wrong in my setups?)

I hate writing mixed reviews. It takes enormous effort and thought to create and finish a book. And I have been looking and hoping for a solid how-to text on Ember. For me, however, this book has two key downsides. First, the code examples are written for Ember.js 1.0.0, and as this review is being written, Ember.js 1.5.1 is the latest release (with 1.6 in beta). Second, the book’s opening chapter is very difficult for beginners to follow.

Some other reviewers also have noticed problems with the book’s example code –which, for me, forms the heart of a good how-to book. And they have taken issue with how the code is presented in the text.

Still, there is much to like here, especially if you are experienced in JavaScript and in model-view-controller (MVC) frameworks and have been curious about Ember.js.

I am fairly new to Ember, so some of the chapters most helpful to me have included using Handlebars js, testing Ember.js applications and creating custom Ember.js components–areas not given much notice in the other Ember books I have read.

If you are new to JavaScript and to frameworks, do not attempt to dive into Ember.js in Action as your first Ember exposure. Start with the Ember.js website and some simpler books first. Then, consider this book.

Hopefully, in the next edition, the all-important opening chapter will be reworked, and the code examples will be presented in a clearer and more complete fashion.

Si Dunn