In a previous post, I previewed my forthcoming, self-published JavaScript book: why I’m writing it, when, and how. Here, then, is the current Table of Contents, with some explanatory text. To be fair, this is the first draft of the table of contents, and it’s probably more inclusive than the final book will be. As I write the text, the order and specifics will no doubt change, and I may need to cut some of the most advanced and esoteric content if the book gets to be too long or complex.
As always, any and all feedback you may have on the proposed book is most welcome.
Part 1: Getting Started
The first section of the book introduces JavaScript as it is today, in all its facets. The first chapter talks about what JavaScript specifically is and what it’s used for, what JavaScript isn’t, and what the current landscape looks like. The second chapter has the reader creating some real-world code—client-side and server-side form validation, using both hand-written JavaScript and the jQuery framework (even if he or she doesn’t know JavaScript yet, which is really how we all begin with JavaScript anyway). The third chapter discusses development tools that are useful as one is learning JavaScript. This includes things like JavaScript-aware IDEs and text editors, the JavaScript-specific features of different Web browsers, and debugging tools. The focus in this first part is on a grasp of JavaScript as a whole, also providing a context within which the reader can continue through Part 2 of the book, the most important part.
- Chapter 1: (Re-)Introducing JavaScript
- What is JavaScript?
- How JavaScript Compares to…
- JavaScript Isn’t…
- Why JavaScript is a Good Thing
- JavaScript Versions and Browser Support
- Chapter 2: JavaScript in Action
- Embedding JavaScript into HTML
- Acknowledging No JavaScript Support
- Cobbling Together Some Code
- Applying a Framework
- Steal This JavaScript
- Chapter 3: Tools of the Trade
- The Great Debate: Text Editors vs. IDEs
- A Handful of Text Editors
- A Couple of IDEs
- The Browser: Your Friend, Your Enemy
- Online Resources
Part 2: JavaScript Fundamentals
The second section of the book is the meat of the text, useful for all readers. Here are the fundamentals for programming in JavaScript, i.e., the treatment of JavaScript as a language in its own right. Some of the early material may be too basic for some, but none of the material will be beyond the needs of the standard Web developer. By the end of this section, the reader will be able to understand most JavaScript code just by looking at it, and will be well prepared for the more advanced examples in the third part of the book. Most of the fundamental concepts will be demonstrated using a real-world example. Many examples will also be presented in an alternative syntax (e.g., an ExtJS or jQuery demonstration of the same technique).
- Chapter 4: Simple Variable Types
- Basic Variable Syntax
- Creating Calculators
- Formating Numbers
- Constructing Strings
- Deconstructing Strings
- Generating Dates and Times
- Chapter 5: Using Control Structures
- Comparing Numbers
- Comparing Strings
- What is true?
- More Complex Conditionals
- Performing Iterations
- Chapter 6: Complex Data Types
- Arrays
- Objects
- Arrays are Objects!
- Chapter 7: Creating Functions
- Defining Your Own Routines
- Passing Values to Functions
- Returning Values from Functions
- Variable Scope
- Anonymous Functions
- Chapter 8: Event Handling
- Browser Events
- Keyboard Events
- Input Device Events
- Chapter 9: JavaScript and the Browser
- The Window
- DOM Manipulation
- Cookies
- Chapter 10: Working with Forms
- Handling Form Submissions
- Form Validation
- Regular Expressions
- Handling File Uploads
- Chapter 11: Ajax
- Understanding Ajax
- Providing Dynamic Content
- Form Validation
- User Interactions
- Chapter 12: Working with Other Data
- XML
- JSON
- Chapter 13: Debugging and Error Management
- Simple Debugging Errors
- Handling Problems Gracefully
- Creating Informative Errors
- Creating Useful Errors
Part 3: Next Steps
The final part of the book extends what has already been covered in two ways. First, it more formally discusses major topics like frameworks, things that have been shown in bits of pieces already. Second, Part 3 goes into some of the secondary uses of JavaScript, like server-side JavaScript, Google Gears HTML5, and Adobe AIR. These extensions demonstrate the breadth and usefulness of today’s JavaScript. Realistically, these chapters will be more of an introductory tutorial to the topic than a full-fledged resource. In each chapter of Part 3, the reader will develop one or more (mostly) complete applications.
- Chapter 14: Frameworks
- Choosing a Framework
- Introducing jQuery
- Introducing ExtJS
- Introducing YUI
- Chapter 15: Server-Side JavaScript
- What is Server-Side JavaScript?
- What You’ll Need
- Validating Form Data
- Performing Database Queries
- Chapter 16: Google Gears HTML5
- Chapter 17: JavaScript for Desktop Applications
- What is Adobe AIR?
- What You Need to Know
- Creating a Knowledgebase Application
Appendix A: Basic JavaScript Reference
The appendix provides a simple reference guide to JavaScript. Tables and other listings cover the kinds of things that are easily forgotten: operators, defined objects, methods, etc.