Niceness is key.
Web development is traditionally centered around finding workarounds for problems when implementing something that looks easy enough to do on paper. Probably the most sinister and seemingly magical part of all is the web browser. Besides the fact that the major browsers all have various bugs and don’t completely support what is stated in the specs, you’ll quickly run into basic limitations, like missing user interface controls, unnecessarily complicated coding in JavaScript, and, of course, the dreaded cross-browser differences.
Well, forget about all that. This book will show you how to use Prototype and Scriptaculous to concentrate on what’s really important: implementing your ideas.
The simple premise of how to achieve this goal is niceness. The concept of niceness permeates both libraries, on all levels. First off, the libs are nice to you, as a developer. Most of the time, you can write a short line of code, and it just works. They also follow a consistent style throughout, so you don’t have to learn lots of stuff when you use a function for the first time. The source code is optimized to be very readable—just give it some time! The net effect is that you can create rich user interactivity in a very short time, extending this niceness directly to the user. You’ll actually get to make little tweaks to improve the user interface, instead of having to worry about how to get the underlying technology to work. This way, you can set up a productive “rinse and repeat” development cycle that easily allows you to get both designers and users on board early in the process (yes, “beta” is not just a hollow word).
Prototype and Scriptaculous didn’t invent this approach—they both were born out of and borrow heavily from the Ruby on Rails web development framework. Many things will be quite familiar if you have worked with Rails—and if you haven’t, you should try it!
Niceness goes a long way. It applies to all aspects of developing websites, from the underlying back end to seeing the user smile. To quote a Scriptaculous user, “The puff effect made me cry. They were tears of joy.” While you might not react quite like this, there are many ways to enjoy these libraries. Perhaps the most important one is being able to get home on time—because you finished early.
So have fun creating the next nice thing on the Web, and, if you like, give back to the community what you’ve learned by joining IRC channels and mailing lists. Or, even nicer, write patches and do bug fixes, or create your own open source extensions for Prototype and Scriptaculous!
Thomas Fuchs
CTO, wollzelle
Creator of Scriptaculous