Electronic Design

The Book of JavaScript, 2nd Edition

By David ThauISBN: 1-59327-106-9

Scripting languages are becoming more important in embedded applications as the level of connectivity continues to rise. It is no longer sufficient to provide a Web interface to a remote device. Now a higher level of interaction is a requirement. This is why it is important for embedded developers to take a look at things like JavaScript and AJAX (Asynchronous JavaScript and XML).

The Book of JavaScript, 2nd Edition, by David Thau does not target embedded developers specifically, but it does provide the basics in a fashion that any embedded developer will appreciate. It covers JavaScript along with the more advanced AJAX. This book starts with the basics and provides practical examples that can be tried with most Web browsers and servers.

Moving computation and the user interface to a PC can offload small, microcontroller-based systems. Basic JavaScript can often suffice. Thau covers the language and browser compatibility right at the start. The first working example covers rollovers, events that occur when a mouse cursor is placed over a field or element in the Web browser's screen. The material then moves on to window manipulation.

The author's presentation methodology uses small text snippets of code where important lines are numbered. These highlights are matched with explanation in the text. It works very well as long as the figure is on the same page as the explanation; otherwise, page flipping results. Luckily, this does not happen often. The approach also eliminates cryptic comments in the sample code and provides a more detailed discussion when necessary.

The book covers all of the important details like cookie handling and dynamic HTML, and it then gets into AJAX basics. The latter is covered in two chapters along with a server-side discussion. This provides sufficient information to see how AJAX works, but you will still want to get an AJAX book to get into more sophisticated applications. Given the number of different AJAX development tools and platforms, this level of presentation works best because anything else would be very specific to one of these tools and platforms.

The book includes assignments with each chapter, making it suitable for class work. It also has the answers in the appendices.

If you want to get your feet wet with JavaScript and AJAX, then this is the book for you. A little background in almost any other programming language helps, but you will be able to handle the basics after getting through this book even if you are starting from ground zero.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.