Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Overview  





2 History  





3 Components  





4 Browser compatibility  





5 Emphasis on modularity and reusability  





6 Object-oriented programming  





7 See also  





8 References  





9 Further reading  





10 External links  














MooTools






العربية
Deutsch
Español
فارسی
Français


Polski
Português
Русский
Українська
 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


MooTools
Developer(s)The MooTools Dev Team
Initial releaseSeptember 8, 2006; 17 years ago (2006-09-08)[1]
Stable release

1.6.0 / January 14, 2016; 8 years ago (2016-01-14)[2]

Repositoryhttps://github.com/mootools/mootools-core
Written inJavaScript
TypeAjax framework / JavaScript Framework
LicenseMIT License[3]
Websitemootools.net

MooTools (My Object-Oriented Tools)[4] is a lightweight, object-oriented JavaScript framework. It is released under the free, open-source MIT License.[5]

Overview[edit]

MooTools provides the user with a number of options beyond native JavaScript. These include:

The framework includes built-in functions for manipulation of CSS, DOM elements, native JavaScript objects, Ajax requests, DOM effects, and more. MooTools also provides a detailed, coherent application programming interface (API),[10] as well as a custom downloads module allowing developers to download only the modules and dependencies they need for a particular app.[11][12]

History[edit]

Valerio Proietti first authored the framework and released it in September 2006[13] taking as his inspiration Prototype and Dean Edward's base2. MooTools originated from Moo.fx, a popular JavaScript effects library released in October 2005 by Valerio Proietti as an add-on to the Prototype Javascript Framework.[14] 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)[15] further extended the native Element object as well[13] to offer greater control of the Document Object Model (DOM).[16]

Components[edit]

MooTools includes a number of components, but not all need to be loaded for each application. Some of the component categories are:

Browser compatibility[edit]

MooTools is compatible and tested with:[24]

Emphasis on modularity and reusability[edit]

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.[25]

Object-oriented programming[edit]

MooTools contains a robust Class creation and inheritance system that resembles most classically based Object-oriented programming languages. For example, the following is MooTools' equivalent of the examples in Wikipedia's polymorphism page:

var Animal = new Class({

    initialize: function(name) {
        this.name = name;
    }

});

var Cat = new Class({
    Extends: Animal,

    talk: function() {
        return 'Meow!';
    }

});

var Dog = new Class({

    Extends: Animal,

    talk: function() {
        return 'Arf! Arf!';
    }

});

var animals = {
    a: new Cat('Missy'),
    b: new Cat('Mr. Bojangles'),
    c: new Dog('Lassie')
};

Object.each(animals, function(animal) {
    alert(animal.name + ': ' + animal.talk());
});
 
// alerts the following:
//
// Missy: Meow!
// Mr. Bojangles: Meow!
// Lassie: Arf! Arf!

See also[edit]

References[edit]

  • ^ "Release 1.6.0 · mootools/Mootools-core". GitHub.
  • ^ "MooTools". mootools.net.
  • ^ "MooTools at FOSDEM slides" (PDF). Archived from the original (PDF) on 2011-07-23. Retrieved 2010-02-17.
  • ^ The Official MooTools Website
  • ^ MooTools' Core Download Page
  • ^ MooTools Class Object Archived 2008-08-31 at the Wayback Machine
  • ^ MooTools' Effects (FX) Class Archived 2008-06-23 at the Wayback Machine
  • ^ MooTools' Element Class - A comprehensive list of Element manipulation methods. Archived 2008-09-05 at the Wayback Machine
  • ^ A Better Way to Use Elements
  • ^ MooTools Core Builder
  • ^ MooTools More Builder
  • ^ a b Newton, Aaron (September 18, 2008). MooTools Essentials: The Official MooTools Reference for JavaScript and Ajax Development (1st ed.). Apress. pp. xvi. ISBN 978-1-4302-0983-6.
  • ^ Newton, Aaron (September 18, 2008). MooTools Essentials: The Official MooTools Reference for JavaScript and Ajax Development (1st ed.). Apress. pp. xv. ISBN 978-1-4302-0983-6.
  • ^ Version 1.6.1 of Prototype includes "an element metadata storage system." Prototype 1.6.1 released Archived 2010-03-01 at archive.today by Sam Stephenson, written September 1st, 2009. Retrieved March 21, 2010.
  • ^ Note that MooTools does not extend the native Object—all JavaScript primitives like String and Function inherit from it—but instead provides a convenient Hash for the purpose: Think of it like having a set of utility methods that allow for nearly effortless object manipulation of regular JavaScript objects that are otherwise unaffected by the process. (Newton, Aaron (September 18, 2008). MooTools Essentials: The Official MooTools Reference for JavaScript and Ajax Development (1st ed.). Apress. pp. xvi. ISBN 978-1-4302-0983-6.)
  • ^ MooTools Core Archived 2009-10-02 at the Wayback Machine
  • ^ MooTools More Archived 2009-10-04 at the Wayback Machine
  • ^ MooTools Class Archived 2008-08-31 at the Wayback Machine
  • ^ MooTools Element Archived 2008-09-05 at the Wayback Machine
  • ^ MooTools Fx Class Archived 2008-06-23 at the Wayback Machine
  • ^ MooTools Request Class Archived 2008-07-30 at the Wayback Machine
  • ^ In addition to getting the size for any Element, you can easily get the dimensions of the window Archived 2008-09-11 at the Wayback Machine
  • ^ MooTools lists its compatibility on its homepage.
  • ^ jQuery versus Mootools
  • Further reading[edit]

    External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=MooTools&oldid=1232641636"

    Categories: 
    JavaScript libraries
    Ajax (programming)
    Software using the MIT license
    Web frameworks
    Hidden categories: 
    Webarchive template wayback links
    Webarchive template archiveis links
    Articles with short description
    Short description is different from Wikidata
    Articles with self-published sources from November 2008
    All articles with self-published sources
    Articles lacking reliable references from November 2008
    All articles lacking reliable references
    Articles with multiple maintenance issues
    Official website different in Wikidata and Wikipedia
     



    This page was last edited on 4 July 2024, at 20:29 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki