Chapter 14. JavaScript, Dashboard, and Dashcode


  • The basics of the JavaScript scripting language

  • How to write Dashboard widgets with JavaScript, Cascading Style Sheets (CSS), and HTML

  • How to use WebKit CSS Animations to make visually stunning web pages and widgets

  • How to develop a web client application in Dashcode

JavaScript is one of the most widely used scripting languages around, and is essential for the operation of the Web. When it was initially introduced, its primary purpose was to add dynamic behavior to static web sites — graphical tricks such as making buttons change appearance when pressed, or animating a sequence of images.

Nobody at that point in time could have predicted that JavaScript would one day evolve into the language that underpins nearly all client-side web development. JavaScript is now much more than just flashy graphics — though it is that too — it also plays a big role in Web 2.0 technologies such as Ajax. (The "j" stands for "JavaScript.") In contrast to the hack-ish use of JavaScript in the early days, now there are large, well-engineered frameworks developed entirely in JavaScript. In short, Web 2.0 would probably not have happened without JavaScript.


Some of the most well-known JavaScript frameworks include Prototype, Scriptaculous, jQuery, Dojo, SproutCore, and Cappuccino. Many of these frameworks actually extend the JavaScript language, making up for its limitations.

The last few years, Apple has also started to embrace ...

Get Beginning, Mac OS® X Snow Leopard™ Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.