Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

MooTools

From Wikipedia, the free encyclopedia
Software
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This articlemay contain excessive or inappropriate references toself-published sources. Please helpimprove it by removing references to unreliablesources where they are used inappropriately.(November 2008) (Learn how and when to remove this message)
icon
This articlerelies excessively onreferences toprimary sources. Please improve this article by addingsecondary or tertiary sources.
Find sources: "MooTools" – news ·newspapers ·books ·scholar ·JSTOR
(November 2008) (Learn how and when to remove this message)
(Learn how and when to remove this message)
MooTools
DeveloperThe MooTools Dev Team
Initial releaseSeptember 8, 2006; 19 years ago (2006-09-08)[1]
Stable release
1.6.0 / January 14, 2016; 10 years ago (2016-01-14)[2]
Written inJavaScript
TypeAjax framework /JavaScript Framework
LicenseMIT License[3]
Websitemootools.net
Repositoryhttps://github.com/mootools/mootools-core

MooTools (My Object-Oriented Tools)[4] is a lightweight,object-orientedJavaScriptframework. It is released under thefree, open-sourceMIT License.[5]

Overview

[edit]

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.[6]
  • MooTools follows object-oriented practices and theDRY principle.[7]
  • An advanced effects component, with optimized transitions such as easing equations used by many Flash developers.[8]
  • Enhancements to theDOM, enabling developers to easily add, modify, select, and delete DOM elements. Storing and retrieving information with Element storage is also supported.[9]

The framework includes built-in functions for manipulation ofCSS,DOM elements, native JavaScript objects,Ajax requests, DOM effects, and more. MooTools also provides a detailed, coherentapplication 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 inspirationPrototype and Dean Edward'sbase2. MooTools originated from Moo.fx, a popularJavaScript effects library released in October 2005 by Valerio Proietti as an add-on to thePrototype Javascript Framework.[14] It can be used as a lighter alternative toscript.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 theDocument 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:

  • Core: A collection of utility functions that all the other components require.[17]
  • More: An official collection of add-ons that extend the Core and provide enhanced functionality.[18]
  • Class: The base library for Class object instantiation.[19]
  • Natives: A collection ofJavaScript 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 theHTML Element object.[20]
  • Fx: An advanced effects-API to animate page elements.[21]
  • Request: IncludesXHR interface, Cookie,JSON, andHTML retrieval-specific tools for developers to exploit.[22]
  • Window: Provides a cross-browser interface to client-specific information, such as the dimensions of the window.[23]

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 aclass-based inheritance language like Java with the MooToolsClass 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 aClass 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 basedObject-oriented programming languages. For example, the following is MooTools' equivalent of theexamples in Wikipedia's polymorphism page:

varAnimal=newClass({initialize:function(name){this.name=name;}});varCat=newClass({Extends:Animal,talk:function(){return'Meow!';}});varDog=newClass({Extends:Animal,talk:function(){return'Arf! Arf!';}});varanimals={a:newCat('Missy'),b:newCat('Mr. Bojangles'),c:newDog('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]
  1. ^Original release announcement
  2. ^"Release 1.6.0 · mootools/Mootools-core".GitHub.
  3. ^"MooTools".mootools.net.
  4. ^"MooTools at FOSDEM slides"(PDF). Archived fromthe original(PDF) on 2011-07-23. Retrieved2010-02-17.
  5. ^The Official MooTools Website
  6. ^MooTools' Core Download Page
  7. ^MooTools Class ObjectArchived 2008-08-31 at theWayback Machine
  8. ^MooTools' Effects (FX) ClassArchived 2008-06-23 at theWayback Machine
  9. ^MooTools' Element Class - A comprehensive list of Element manipulation methods.Archived 2008-09-05 at theWayback Machine
  10. ^A Better Way to Use Elements
  11. ^MooTools Core Builder
  12. ^MooTools More Builder
  13. ^abNewton, 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.
  14. ^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.
  15. ^Version 1.6.1 of Prototype includes "an element metadata storage system."Prototype 1.6.1 releasedArchived 2010-03-01 atarchive.todayby Sam Stephenson, written September 1st, 2009. Retrieved March 21, 2010.
  16. ^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.)
  17. ^MooTools CoreArchived 2009-10-02 at theWayback Machine
  18. ^MooTools MoreArchived 2009-10-04 at theWayback Machine
  19. ^MooTools ClassArchived 2008-08-31 at theWayback Machine
  20. ^MooTools ElementArchived 2008-09-05 at theWayback Machine
  21. ^MooTools Fx ClassArchived 2008-06-23 at theWayback Machine
  22. ^MooTools Request ClassArchived 2008-07-30 at theWayback Machine
  23. ^In addition to getting the size for any Element, you can easily get the dimensions of the windowArchived 2008-09-11 at theWayback Machine
  24. ^MooTools lists its compatibility on its homepage.
  25. ^jQuery versus Mootools

Further reading

[edit]

External links

[edit]
.NET
C++
ColdFusion
Common Lisp
Haskell
Java
JavaScript
Back end
Server-side
Full-stack
Front end
Client-side
Perl
PHP
Python
Ruby
Rust
Scala
Smalltalk
Other languages
Low-level platform-specific
OnAmigaOS
OnClassic Mac OS,macOS
OnWindows
OnUnix
OnBeOS,Haiku
OnAndroid
CLI
Low Level Cross-platform
CLI
C
Java
High-level, platform-specific
OnAmigaOS
OnClassic Mac OS,macOS
Object Pascal
Objective-C,Swift
C++
CLI
OnWindows
CLI
C++
Object Pascal
OnUnix andX11
High-level, cross-platform
C
C++
Objective-C
CLI
Adobe Flash
Go
Haskell
Java
JavaScript
Common Lisp
Lua
Pascal
Object Pascal
Perl
PHP
Python
Ruby
Tcl
XML
shell
Dart
Dialects
Engines
Frameworks
Client-side
Server-side
Multiple
  • Cappuccino
Libraries
People
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=MooTools&oldid=1303148887"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp