HOME

TheInfoList



OR:

MooTools (My Object-Oriented Tools) is a lightweight,
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
framework A framework is a generic term commonly referring to an essential supporting structure which other things are built on top of. Framework may refer to: Computing * Application framework, used to implement the structure of an application for an op ...
. It is released under the free, open-source
MIT License The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license comp ...
.


Overview

MooTools provides the user with a number of options beyond native JavaScript. These include: * An extensible and modular framework allowing developers to choose their own customized combination of components. * MooTools follows object-oriented practices and the DRY principle. * An advanced effects component, with optimized transitions such as easing equations used by many Flash developers. * Enhancements to the
DOM Dom or DOM may refer to: People and fictional characters * Dom (given name), including fictional characters * Dom (surname) * Dom La Nena (born 1989), stage name of Brazilian-born cellist, singer and songwriter Dominique Pinto * Dom people, an et ...
, enabling developers to easily add, modify, select, and delete DOM elements. Storing and retrieving information with Element storage is also supported. The framework includes built-in functions for manipulation of
CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
,
DOM Dom or DOM may refer to: People and fictional characters * Dom (given name), including fictional characters * Dom (surname) * Dom La Nena (born 1989), stage name of Brazilian-born cellist, singer and songwriter Dominique Pinto * Dom people, an et ...
elements, native JavaScript objects,
Ajax Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Greek ...
requests, DOM effects, and more. MooTools also provides a detailed, coherent
application programming interface An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how t ...
(API), as well as a custom downloads module allowing developers to download only the modules and dependencies they need for a particular app.


History

Valerio Proietti first authored the framework and released it in September 2006 taking as his inspiration
Prototype A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and Software prototyping, software programming. A prototyp ...
and Dean Edward'
base2
MooTools originated from Moo.fx, a popular
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
effects library released in October 2005 by Valerio Proietti as an add-on to the
Prototype Javascript Framework The Prototype JavaScript Framework is a JavaScript framework created by Sam Stephenson in February 2005 as part of Ajax support in Ruby on Rails. It is implemented as a single file of JavaScript code, usually named prototype.js. Prototype is dist ...
. It can be used as a lighter alternative to script.aculo.us or other, bigger libraries. It provides simple, basic effects, and guarantees a small library size. Whereas Prototype extended—prototyped—many of JavaScript's native String, Array, and Function objects with additional methods, Proietti desired a framework that (at the time) further extended the native Element object as well to offer greater control of the
Document Object Model The Document Object Model (DOM) is a cross-platform and language-independent interface that treats an XML or HTML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document wi ...
(DOM).


Components

MooTools includes a number of components, but not all need to be loaded for each application. Some of the component categories are: * Core: A collection of utility functions that all the other components require. * More: An official collection of add-ons that extend the Core and provide enhanced functionality. * Class: The base library for Class object instantiation. * Natives: A collection of
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
Native Object enhancements. The Natives add functionality, compatibility, and new methods that simplify coding. * Element: Contains a large number of enhancements and compatibility standardization to the
HTML Element An HTML element is a type of HTML (HyperText Markup Language) document component, one of several types of HTML nodes (there are also text nodes, comment nodes and others). The first used version of HTML was written by Tim Berners-Lee in 1993 ...
object. * Fx: An advanced effects-API to animate page elements. * Request: Includes XHR interface, Cookie,
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
, and
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
retrieval-specific tools for developers to exploit. * Window: Provides a cross-browser interface to client-specific information, such as the dimensions of the window.


Browser compatibility

MooTools is compatible and tested with: *
Safari A safari (; ) is an overland journey to observe wild animals, especially in eastern or southern Africa. The so-called "Big Five" game animals of Africa – lion, leopard, rhinoceros, elephant, and Cape buffalo – particularly form an importa ...
3+ *
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated IE or MSIE) is a series of graphical user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
6+ *
Mozilla Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current and a ...
2+ *
Opera Opera is a form of theatre in which music is a fundamental component and dramatic roles are taken by singers. Such a "work" (the literal translation of the Italian word "opera") is typically a collaboration between a composer and a librett ...
9+ * Chrome 4+


Emphasis on modularity and reusability

Every JavaScript framework has its philosophy, and MooTools is interested in taking full advantage of the flexibility and power of JavaScript in a way that emphasizes greater modularity and code reuse. MooTools accomplishes these goals intuitively to a developer coming from a class-based inheritance language like Java with the MooTools Class object. Class is an object of key/value pairs containing either properties or methods (functions). Class is effortlessly mixed and extended with other Class instantiations allowing for the most excellent focus of MooTools: Code reuse achieved through maximizing the power of JavaScript's prototypical inheritance but in a Class object syntax more familiar to classical inheritance models.jQuery versus Mootools
/ref>


Object-oriented programming

MooTools contains a robust Class creation and inheritance system that resembles most classically based
Object-oriented programming language Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
s. For example, the following is MooTools' equivalent of the
examples Example may refer to: * '' exempli gratia'' (e.g.), usually read out in English as "for example" * .example, reserved as a domain name that may not be installed as a top-level domain of the Internet ** example.com, example.net, example.org, ex ...
in Wikipedia's polymorphism page: var Animal = new Class(); var Cat = new Class(); var Dog = new Class(); var animals = ; Object.each(animals, function(animal) ); // alerts the following: // // Missy: Meow! // Mr. Bojangles: Meow! // Lassie: Arf! Arf!


See also

*
Ajax framework Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Greek ...
*
Rich Internet application A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...
*
Web 2.0 Web 2.0 (also known as participative (or participatory) web and social web) refers to websites that emphasize user-generated content, ease of use, participatory culture and interoperability (i.e., compatibility with other products, systems, and ...
*
Comparison of JavaScript frameworks This is a comparison of web frameworks for front-end web development that are heavily reliant on JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World W ...
*
XMLHttpRequest XMLHttpRequest (XHR) is an API in the form of an object whose methods transfer data between a web browser and a web server. The object is provided by the browser's JavaScript environment. Particularly, retrieval of data from XHR for the purpos ...
*
JavaScript framework A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and ...
*
JavaScript library A JavaScript library is a library of pre-written JavaScript code that allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. Libraries With the expanded demands for JavaScript, an ea ...


References


Further reading


"The Introduction to MooTools Architecture"
''Applied Mechanics and Materials''.
"Interactive Consultation Based on MooTools Long Polling Techniques"
''Applied Mechanics and Materials''. * * *


External links

* {{DEFAULTSORT:Mootools JavaScript libraries Ajax (programming) Software using the MIT license Web frameworks