Book Image

MooTools 1.2 Beginner's Guide

Book Image

MooTools 1.2 Beginner's Guide

Overview of this book

MooTools is a simple-to-use JavaScript library, ideal for people with basic JavaScript skills who want to elevate their web applications to a superior level. If you're a newcomer to MooTools looking to build dynamic, rich, and user-interactive web site applications this beginner's guide with its easy-to-follow step-by-step instructions is all you need to rapidly get to grips with MooTools.
Table of Contents (14 chapters)
MooTools 1.2 Beginner's Guide
Credits
About the Authors
About the Reviewer
Preface

Chapter 1. MooTools and Me

In recent years, the Web has undergone a major evolution, an evolution towards highly-interactive, dynamic, responsive web pages and web applications. We're at a time where users expect (and often, demand) web interfaces that talk to them.

Gone are the days where only desktop software was associated with smooth and feature-packed user interfaces that performed complicated tasks. In fact, applications that we normally think of as traditionally being for the desktop (such as Word Processors, Image editors, and Spreadsheet software) are now moving to browser-based environments because of the many advantages of web-based applications (such as operating system/platform interdependency, interoperability with other systems, and collaborative possibilities).

JavaScript is the technology that's driving this evolution by giving web developers the capability to create complex, robust, interactive web page components and Rich Internet Applications (RIA) that respond effortlessly to user actions through a combination of techniques such as Ajax, on-the-fly DOM manipulation, and smooth, animated effects.

However, JavaScript isn't perfect (in fact, it's far from it), its syntax is sometimes unintuitive and repetitive, and often requires a great deal of code-authoring to perform complicated and cross-browser-compatible operations.

This is where MooTools steps in! By providing web developers with a set of useful and cross-browser-compatible functions, methods, and classes within an intuitive framework for writing client-side scripts, we can side-step a lot of frustration and time, typically associated with code-authoring in JavaScript:

In this chapter we shall:

  • Learn about what MooTools is

  • Discuss some advantages of using MooTools

  • Learn how to download and install MooTools

  • Learn about notable MooTools resources on the web

So let's get on with it!

What is MooTools?

MooTools (which stands for My Object-Oriented "JavaScript" Tools) is a lightweight, modular, object-oriented JavaScript framework. It greatly speeds up and enhances the development cycle of feature-rich Ajax/JavaScript web applications. Created by Valerio Proietti—who originally intended it to be an extension to the Prototype JavaScript framework—MooTools has since grown into an independent, open-source, and very robust JavaScript framework with a solid team of core developers and thousands of users who support, contribute, and rabidly evangelize the project.

MooTools, in essence, abstracts normal JavaScript code so that you can write more terse and elegant client-side scripts. It has a host of useful functions, methods, and classes that'll let you develop robust web components and web applications.

The developers of MooTools strongly believe in applying Object-Oriented Programming (OOP) principles to JavaScript, a structural programming language. Since everything in JavaScript is an object, MooTools provides a cleaner, easier, and more elegant way to manipulate the object to our will. MooTools also helps make the JavaScript code cross-browser compatible.