Another “Modern JavaScript: Develop and Design” Update

December 8, 2011

I last posted an update on my forthcoming JavaScript book, Modern JavaScript: Develop and Design, just over two months ago, so it’s high time I posted another update. Of course, I’ve been working so hard on the book that I haven’t done a very good job of putting out regular, good blog posts in the interim. Still, here’s where things stand…

The good news is that I just submitted the first draft of Chapter 10, “Working with Forms.” Although forms have been used to some degree since Chapter 2, “JavaScript in Action,” this chapter rounds out the knowledge of forms with respect to JavaScript. The chapter worked out much like a “recipe” type of chapter, with discussions of common tasks plus specific code for performing that task. Some of the examples are:

  • Inline error messages
  • Tooltips
  • Creating a master checkbox (that toggles a group of other checkboxes)
  • Linked select menus
  • Enabling/disabling submit buttons

The chapter also covers regular expressions, with a focus on validation. Because  regular expressions are complicated, and there’s already a lot of material in the book, I tried to keep the coverage as accessible as possible, without going into too much high-end stuff. The chapter ends with a good and realistic form validation example that combines most of the above.

Before Chapter 10, I finished Chapter 9, “JavaScript and the Browser,” and Chapter 8, “Event Handling”. Chapter 9 in particular was quite long. But now that I’ve covered events in detail, plus DOM manipulation, CSS interactions, and so forth, the possibilities have greatly expanded when it comes to what examples I can use, which makes writing the book easier and more rewarding. By this point in the book, the reader has also created a couple of mini-libraries that make things like event handler registration easy and cross-browser compliant. The book is continuing to emphasize–and demonstrate–progressive enhancement along the way.

I’ve also done the rewrites on the first four chapters and have seen the PDF layouts for the first two. This is my first full-color book and it looks great. Unfortunately, as seems to always happen with me, the page counts are coming back quite high. Between that and how grossly behind schedule I am, I’ll have to make some decisions as to what to keep in Part 3 of the book. Part 2 of the book, which is the meat, has two more chapters remaining: Ajax (Chapter 11) and Debugging and Error Handling (12). Part 3 of the book will definitely have one chapter on frameworks and another on advanced JavaScript programming. There will be at least one more chapter, but I’m not sure what that will be. Possible candidates are:

  • HTML5
  • Mobile Development
  • An example chapter of PHP and JavaScript

I’ve already decided not to do the server-side JavaScript chapter, as I don’t think that many people are doing server-side JavaScript yet, at least not among those that would be reading this book.

As always, if there’s not space to put something in the book, I’ll probably end up writing about those subjects here, or as articles elsewhere (so you’ll still get all the important content, you just won’t have to pay for it).

So that’s where things stand. Thanks to everyone for their interest in the book. Now I’m off to write Chapter 11!