Introducing my new book; Web Development with MongoDB and Node.js! Its been a long 6 months of blood sweat and tears, but its finally released!

Screen Shot 2014-10-08 at 9.07.25 PMA little over 6 months ago I was contacted by someone within Packt Publishing inquiring if I would be interested in writing a book about web development using Node.js and MongoDB. This was only a month or two after the release of my massive blog post and Amazon eBook so I was pretty excited by this opportunity! After a little bit of negotiating with the contract and fleshing out details with regard to the book description and outline, the contract was signed and I was on my way to becoming an officially published author!

The book itself is a tutorial of sorts, focusing on in-depth coverage and a hands on approach to building a complete web application from scratch using Node.js with MongoDB. Here is the chapter outline for the book:

  • Chapter 1, Welcome to JavaScript in the Full Stack, introduces you to the world
  • of full stack JavaScript development and reviews what to expect in the remainder of the book.
  • Chapter 2, Getting Up and Running, walks you through the necessary steps to download, install, and configure your development environment.
  • Chapter 3, Node and MongoDB Basics, is a brief introduction to the basics of JavaScript, Node.js, and MongoDB.
  • Chapter 4, Writing an Express.js Server, introduces you to the Express.js Node.js Web Framework and is a walkthrough of the code necessary to write the main application server.
  • Chapter 5, Dynamic HTML with Handlebars, teaches you how to create dynamic HTML
  • pages using Handlebars, the popular template-rendering engine.
  • Chapter 6, Controllers and View Models, walks you through writing the Controllers and View Models for the main application, the core of the application’s functionalities.
  • Chapter 7, Persisting Data with MongoDB, continues with our Controllers and View Models, where we wrap all of the logic using Mongoose with MongoDB as the main data layer for the application.
  • Chapter 8, Creating a RESTful API, reviews the concepts behind REST APIs and introduces the Postman REST Client tool to test and interact with our own custom Node.js API.
  • Chapter 9, Testing Your Code, introduces the tools and techniques to write automated tests for our Node.js code.
  • Chapter 10, Deploying with Cloud-based Services, is a step-by-step walkthrough of deploying your application to a number of popular cloud-based hosting services such as Heroku, Microsoft Azure, and Amazon’s AWS.
  • Chapter 11, Single Page Applications with Popular Frontend Frameworks, takes a look at the current trend in thick client applications by learning more about popular frontend single application frameworks such as Ember.js, AngularJS, and Backbone. js. Additionally, you will learn about the popular build tools frontend developers use to make their lives easier.
  • Chapter 12, Popular Node.js Web Frameworks, takes a look at some very popular and robust alternatives such as Meteor and Sails, even though Express.js is one of the most popular web frameworks for Node.

The end result after finishing the work outlined in the book is basically a working clone of an image hosting website.

You can purchase the book online at both Amazon and

  • Amazon (physical and Kindle editions)
  • PacktPub (physical purchase includes eBook)

Proposed outline and contract negotiations

When I was first contacted about writing the book, I was basically only given a brief description and title for the book. After I said I was interested the first step was for me to put together a rough outline proposal for the book. This was pretty interesting because I was basically tasked with designing a book that needed to be 12 chapters and roughly 250 pages. Having no idea how to do this and literally no prior experience this turned out to be pretty trying. However in the end the final book came pretty close to my original proposed outline!

After the outline was accepted a contract was sent my way. There were a few very tiny conditions I wasn’t too thrilled about but my request at changes was met with no pushback whatsoever so that was pretty relieving. Once the contract was finalized I had to process some electronic paperwork with regard to wire transfer of funds (the payment was based on a schedule of meeting various milestones during the process). A schedule was also drafted and delivered to me which gave me roughly 2 weeks per chapter to deliver first draft.

Getting started and early speed bumps

The first three chapters went pretty smoothly as I got into the flow of the book. Right around the middle of chapter 3 I received revision requests for the first two chapters. This is when the idea of using Microsoft Office kicked in, unfortunately. The first three chapters I wrote using Google Docs and didn’t realize before then that the publisher uses a Word doc template with very specific styles predefined for everything. Once I received that doc I had to convert my first three chapters to it and then started using it for Chapter 4 on. Fortunately the $9.99/mo plan with Office 365 was a life saver as I really didn’t want to spend hundreds of dollars on a copy! The revisions themselves were pretty minor, only pointing out formatting issues and a few typos here or there.

Stress starts!

Up until Chapter 4, most of the writing had just been general tutorial type stuff. However Chapter 4 started the work of writing about the project that was going to be built throughout the remainder of the book. This made each chapter extra stressful as I had to not only write the tutorial web app, but also break it down and write about it line by line. Furthermore, I needed to break the app into parts that would fit into each chapter of the book. The stress here was that I was writing a web app, making sure it was written in a way that made sense in a chapter by chapter format, breaking parts of it down line by line so that I could write about it per chapter. Keeping track of all of this in my head was starting to drive me mad!

Chapter 7 was particularly grueling as I had to basically write about the bulk of the apps logic including tying everything together with MongoDB. After completing the chapter, I realized that it just became way too long and didn’t really fit in with the rest of the book. This is one of the only minor regrets I have with the book in that I would have liked to have broken chapter 7 down into 2 chapters. However the outline was made, committed to, and the flow of the book wouldn’t really make sense changing it at this point. So I forged ahead!

Rewrites and technical reviewer feedback

By the time I started writing chapter 8, I started to receive rewrite requests for chapter 1. These rewrite requests included the original chapter with changes and comments marked up based on editorial and technical reviewer feedback. Most of the feedback I received from my technical reviewers was extremely valuable and made me not only a better writer, but also stronger in the subject matter as well. The remaining chapters continued in this way, with my writing the next chapter while also receiving rewrites for earlier chapters. The work was starting to double up but the good news is that I could start to see a light at the end of the tunnel (and the majority of the hard part was over as the app I was writing about was complete).

It was also during this time that I was tasked with selecting an image for the cover of the book as well as providing the bullet points and back of book description. In addition I needed to provide an author’s bio and the technical reviewers submitted their bios as well.

Sprint to the finish

Once I delivered the final chapter, I received “prefinal” copies of each chapter which was a PDF of the chapter formatted exactly how it would appear in the book along with all of the changes made during the rewrite and technical feedback process. This is when I started to get excited because I was finally seeing the result of all of the hard work – these prefinal chapters really started to look like a finished product! Reviewing the prefinal chapters was easy because it only involved my reading the chapter again and just looking for anything major that popped out and/or was missed during the rewrite process. The changes I actually submitted for each of these chapters was very very minor.

Shortly after the last prefinal chapter was handed off, I received notice that the book was published!

All done!

So, after about 6 months from original outline proposal to final digital copy of the book sent to the printer, I received my 3 physical copies of the book! It was a hard hard process, with a lot of work and a lot of late nights plugging away on chapters and rewrites. There were times when I thought the project would never be finished and times when I wondered if it was even worth it and if I’d ever write again. For me physically receiving a copy of the book was extremely exciting and made the whole process very rewarding!

I learned so much writing this book and honestly, I would definitely do it again for sure!