Simply JavaScript
Yank (Kevin) & Adams (Cameron)
Source: Yank (Kevin) & Adams (Cameron) - Simply JavaScript
Paper - Abstract

Paper SummaryText Colour-Conventions


Preface

  1. On the surface, JavaScript is a simple programming language that lets you make changes to your web pages on the fly, while they’re being displayed in a web browser. How hard could that be to learn, right? It sounds like something you could knock over in an afternoon.
  2. But JavaScript is bigger on the inside than it seems from the outside. If you were a Dr. Who fan, you might call it the TARDIS of programming languages. If you’re not a Dr. Who fan, roll your eyes with me as the fanboys (and girls) geek out. Everyone back with me? Put your Daleks away, Jimmy.
  3. As I was saying, JavaScript sounds like it should be simple. Nevertheless, throughout its ten year history (so far), the best ways of doing things with JavaScript have seemed to change with the seasons. And advice on how to write good JavaScript can be found everywhere: “Do it this way — it’ll run faster!” “Use this code — it’ll run on more browsers!” “Stay away from that feature — it causes memory leaks!”
  4. Too many other JavaScript books — some of them from very respected names in the industry — will teach you a handful of simple solutions to simple problems and then call it a day, leaving you with just enough rope with which to hang yourself when you actually try to solve a real-world problem on your own. And when in desperation you go looking on the Web for an example that does what you need it to, you’ll likely be unable to make sense of the JavaScript code you find, because the book you bought didn’t cover many of the truly useful features of the language, such as object literals, event listeners, or closures.
  5. This book aims to be different. From the very first page, we’ll show you the right way to use JavaScript. By working through fully fleshed-out examples that are ready to be plugged right into a professionally-designed web site, you’ll gain the confidence not only to write JavaScript code of your own, but to understand code that was written by others, and even to spot harmful, old-fashioned code that’s more trouble than it’s worth!
  6. Throughout this book, we’ve tried to go the extra mile by giving you more than just the basics. In particular, we’ve covered some of the new JavaScript-powered development techniques — like Ajax — that are changing the face of the Web. We’ve also included sections that explore the new crop of JavaScript libraries like jQuery, Prototype, Yahoo! UI, and Dojo, making this the only beginner’s JavaScript book to cover these powerful time-savers. … all of which made this book a lot harder to write, but that’s why they pay us the big bucks.

What’s in This Book
  1. Chapter 1: The Three Layers of the Web
    A big part of learning JavaScript is learning when it’s the right tool for the job, and when ordinary HTML and CSS can offer a better solution. Before we dive into learning JavaScript, we’ll take a little time to review how to build web sites with HTML and CSS, and see just how JavaScript fits into the picture.
  2. Chapter 2: Programming with JavaScript
    JavaScript is a programming language. To work with it, then, you must get your head around the way computer programs work — which to some extent means learning to think like a computer. The simple concepts introduced in this chapter — statements, variables, expressions, loops, functions, and objects — are the building blocks for every JavaScript program you’ll ever write.
  3. Chapter 3: Document Access
    While certain people enjoy writing JavaScript code for its own sake, you wouldn’t want to run into them in a dark alley at night. As a well-adjusted web developer, you’ll probably want to use JavaScript to make changes to the contents of your web pages using the Document Object Model (DOM). Lucky for you, we wrote a whole chapter to show you how!
  4. Chapter 4: Events
    By far the most eventful portion of this book (ha ha ha…I slay me), this chapter shows you how to write JavaScript programs that will respond to the actions of your users as they interact with a web page. As you’ll see, this can be done in a number of ways, for which varying degrees of support are provided by current browsers.
  5. Chapter 5: Animation
    Okay, okay. We can talk all day about the subtle usability enhancements that JavaScript makes possible, but we know you won’t be satisfied until you can make things swoosh around the page. In this chapter, you’ll get all the swooshing you can handle.
  6. Chapter 6: Form Enhancements
    I know what you’re thinking: forms are boring. Nobody leaps out of bed in the morning, cracks their knuckles, and shouts, “Today, I’m going to fill in some forms!” Well, once you trick out your forms with the enhancements in this chapter, they just might. Oh, and just to spice up this chapter a bit more, we’ll show you how to make an element on your page draggable.
  7. Chapter 7: Errors and Debugging
    When things go wrong in other programming languages, your computer will usually throw a steady stream of error messages at you until you fix the problem. With JavaScript, however, your computer just folds its arms and gives you a look that seems to say, “You were expecting, maybe, something to happen?” No, English is not your computer’s first language. What did you expect? It was made in Taiwan. In this chapter, we’ll show you how to fix scripts that don’t behave the way they should.
  8. Chapter 8: Ajax
    You might have heard about this thing called Ajax that makes web pages look like desktop applications, and shaky business ventures look like solid investments. We put it into this book for both those reasons.
  9. Chapter 9: Looking Forward
    JavaScript doesn’t just have a future; JavaScript is the future! Okay, you might think that’s taking it a bit far, but when you read this chapter and see the many amazing things that JavaScript makes possible, you might reconsider.
  10. Appendix A: The Core JavaScript Library
    As we progress through the book, we’ll write code to solve many common problems. Rather than making you rewrite that code every time you need it, we’ve collected it all into a JavaScript library that you can reuse in your own projects to save yourself a ton of typing. This appendix will provide a summary and breakdown of all the code that’s collected in this library, with instructions on how to use it.

Text Colour Conventions (see disclaimer)

  1. Blue: Text by me; © Theo Todman, 2018
  2. Mauve: Text by correspondent(s) or other author(s); © the author(s)



© Theo Todman, June 2007 - June 2018. Please address any comments on this page to theo@theotodman.com. File output:
Website Maintenance Dashboard
Return to Top of this Page Return to Theo Todman's Philosophy Page Return to Theo Todman's Home Page