MooTools Core 1.3 Stable and MooTools More 1.3RC
Written By Christoph Pojer, on Monday, October 11th 2010, 4:11pmGood news, everyone! We are extremely happy to announce the official release of MooTools Core 1.3 after almost a year of development. You might call us perfectionists, but we’re now ready to call the 1.3 release complete and stable. For those of you who have been waiting to make the switch, now would be the perfect time. In addition, MooTools Core 1.3 is fully backwards compatible with all documented functionality of MooTools Core 1.2, but more on that later.
MooTools Core 1.3 brings the following new and improved features:
Core
We have revised the whole base of our Core framework to speed up MooTools, provide an even more beautiful API and to make it future-proof. In order to reduce the number of global variables, we have moved all $-prefixed functions into the most appropriate namespaces available ($splat → Array.from, etc…). In short, with 1.3 you are getting the best MooTools experience ever.
Slick
MooTools Core 1.3 includes Slick, our new standalone selector engine. Slick is a new official MooTools project developed by Thomas Aylott, Fabio Costa and Valerio Proietti with help from a vast assortment of JavaScript heroes, villains, trolls and kings.
Even if you can’t use MooTools Core in a project, you can still use Slick! It’s standalone, so instead of Slick requiring anything in MooTools, Core now heavily relies on everything that is Slick.
Slick supports almost every selector you could ever think of and paves new ground with tons of new selectors that you may never have thought possible. The engine is incredibly customizable and supports ninja magic such as reverse combinators.
Slick is unparalleled in its accuracy! We created an implementation agnostic test suite called the SlickSpec. It includes over 3,000 tests that cover the gamut from the wildest unicode edge case to insanely complex interactions when switching between multiple contexts and documents in more doctypes than you could stick.shake() at. Not to mention the obligatory bizarre browser-specific bug fixes and workarounds. We haven’t kept all this goodness to ourselves, we’ve worked hard to implement this test suite in a way that all other selector engines can use it.
Stay tuned in the coming days and weeks. We will certainly be posting much more about Slick and release a dedicated website for it.
Some Examples:
All div elements and p with the class ‘moo’
myElement.getElements('div, p.moo');
All direct child div elements with the class ‘cow’
myElement.getElements('> div.cow');
Search for the first parent that matches ‘div.cow’, matches the next ‘div’ sibling and returns the first input element that it contains. Ain’t that awesome?
myElement.getElement('! div.cow ~ div input');
- Using the
barFiframe document as the starting point context - Find me the first
div - whose direct parent is a
blockquote - whose next sibling is a
ul - who contains an element with the id
foo.
Slick.find(barF, '#foo ! ul !~ blockquote > div');
Element
With the addition of Slick and its new standalone CSS selector parser, we gained the ability to create elements using a CSS expression. I promise that you will love this feature!
new Element('div#cow.moo.big[data-size=5]');
Other Stuff in Core 1.3
- Revised
Core.js, added even more abstractions - Fixes for a lot of element attributes (
maxlength, etc…) - New feature tests further minimize reliance on browser detection
- New
Browser.jsfor the rare times when feature detection doesn’t cut it - New
DOMReadyimplementation improves speed and fixes edge case bugs Array.eachnow chains! Yes, indeed.- Support for touch events on breakthrough communication devices
- Array:
forEach,map,some,everyandfilternow behave according to the ES5 Spec in IE (skipping undefined values) - IE opacity style fixes
- If you build without 1.2 compatibility, Hash is gone. MooTools More 1.3 will provide
Hashfrom now on. Elementsis now an array-like-object instead of a real array.- Additions to
Request— authentication,onprogressand other cool stuff - Numerous stability improvements
- … and more!
Roll your own with Packager
With MooTools Core 1.2.5 and Core 1.3 we have introduced new headers in all of our JavaScript files that allow you to build your own custom edition of MooTools from the command line. Every file can now “provide” and “require” certain functionality. For example, Class.js provides “Class” and requires “Array, String, Function, Number”. Dependencies can even be specified cross-package; one GitHub repository equals a package and thus can be registered to Packager. You can find more information about Packager and a detailed README on kamicane/packager on GitHub.
All you need to do is clone the GitHub repositories that you need, register them with Packager and build. Packager will calculate all the dependencies from the source files in your registered packages and hand you a freshly baked copy of MooTools with all the goodness you need and nothing you don’t. You get all that magical goodness for free, invented by our amazing Valerio Proietti and honed to perfection by the MooTools Developers. You can find a lot of packager ready plugins for MooTools Core 1.3 on @kamicane’s GitHub or @cpojer’s GitHub (It’s-a-me!).
If you prefer Python, fear not! There is also an implementation using Django called Depender which allows you to do on-the-fly-building and compressing of your files.
Function.prototype.bind and Element.get with multiple arguments
We’ve had our own implementation of Function.prototype.bind in MooTools Core long before the ECMAScript 5 Standard was a twinkle in Douglas Crockford’s eye. Given that we fully support ES5, we have changed our implementation to match this new standard. However, you will only get the new implementation if you drop the 1.2-compatibility-layer.
Element.get used to be able to work both as a setter and getter. As described a few months ago when we announced 1.3 beta2, we are now changing this behavior to ensure a consistent API.
The issues that may arise with these two changes are described in the Update Guide from 1.2 to 1.3. If you experience any problems while updating or upgrading, feel free to jump in on IRC (#mootools on irc.freenode.net) or post on the Mailing List so we can help you get your websites and apps running!
Don’t forget that you can use jsFiddle.net to help the community answer your specific questions.
Testing
Thomas has always encouraged (and by that I mean forced) everyone to do test-driven-development. The only problem was that our old spec engine took forever to run in fast browsers. In slow browsers you were able to drink a coffee while watching the specs run. A few months ago, Arian and I rewrote our current engine which is now used by all major MooTools projects. It is still a work-in-progress and you will hear more about testing in later blog posts. The good news is that with MooTools Core 1.3 we have specifications that cover 95 % of the code base and all of our code is tested when you run the specs, which now takes less than two seconds.
MooTools More 1.3RC
After literally hundreds of bug fixes, plenty of new features and even a few new team members, we feel that it is the right time to provide a release-candidate of MooTools More 1.3 so that you can instantly get started with 1.3. You will find more information about MooTools More and all its new goodies very soon (once it loses the RC tag).
Get it while it’s hot!
- Download MooTools Core 1.3; Build MooTools Core 1.3
- Build MooTools More 1.3RC
- Update from 1.2 to 1.3 with 1.2 compatibility.
- Upgrade from 1.2 to 1.3 and drop 1.2 compatibility.
- Fork / clone MooTools 1.3 from GitHub, and build it yourself with Packager.
- Read the commit logs to see precisely what has changed.
- Browse the Documentation for Core & More.
- Please report any bugs you can find on Lighthouse, our bug tracker.
October 11th, 2010 at 4:39 pm
First!
October 11th, 2010 at 4:42 pm
1.3 rocks.
October 11th, 2010 at 4:59 pm
Last but not least, 1.3 ! I’ve got so much work at the moment, but I can’t help it… I will have to rewrite all my moo stuff.
Thanx a lot guys !
October 11th, 2010 at 4:59 pm
Congrats Dev Team!
October 11th, 2010 at 5:16 pm
Congrats! Just in time too :)
October 11th, 2010 at 5:29 pm
Just replaced Core and More in MochaUI with Core-1.3 and More 1.3rc1 and “It just works”!
Great Job, well done!
October 11th, 2010 at 5:36 pm
Grats, i go update my plugins.
October 11th, 2010 at 6:06 pm
If you need more Power for your new shiny MooTools 1.3 be sure to check out PowerTools: http://cpojer.net/PowerTools
October 11th, 2010 at 6:43 pm
Very awesome. Thanks for all the hard work!
October 11th, 2010 at 6:46 pm
Win. Awesome job!
October 11th, 2010 at 7:46 pm
The YUI compressor on http://mootools.net/more-rc/ is not working, everything is still fully commented and uncompressed after download.
October 11th, 2010 at 8:53 pm
Well done guys, your hard work is appreciated!
October 11th, 2010 at 9:51 pm
Awesome, glad to see this! MooTools FTW! :)
October 11th, 2010 at 11:54 pm
yeahaaaaaaaaaaa! moo rules
October 12th, 2010 at 2:08 am
Good job guys!
October 12th, 2010 at 2:27 am
Great job MooCowBoys !
What are the main reasons that led to Hash depreciation in favor of Object functions ? Chris, do you plan to merge your PowerTools with MootoolsMore in the future ?
October 12th, 2010 at 2:42 am
Awesome guys! Thanks! Italians do it better, right Valerio?? :D
October 12th, 2010 at 2:42 am
Great, can´t wait to test the new features and update my older scripts. ;-)
October 12th, 2010 at 3:29 am
Awesome dudes!!! Nice work!
(Why does the docs refer to Mootools 2.0? Example: http://mootools.net/docs/core/Core/Core#Deprecated-Functions:chk)
Martin
October 12th, 2010 at 4:11 am
simon, the YUI compressor on http://mootools.net/more-rc/ is now fixed.
October 12th, 2010 at 4:50 am
Great job! All new stuff available from jsFiddle as default setting.
October 12th, 2010 at 6:56 am
Delapouite: There are currently no such plans. I don’t believe there are any benefits of moving stuff into More a the moment. There is no harm in having separate plugin collections.
October 12th, 2010 at 6:59 am
very good job guys! congratulations
October 12th, 2010 at 8:21 am
I am super pumped right now.
October 12th, 2010 at 10:00 am
Congrats! I’ll start using it right the way :]
October 12th, 2010 at 10:47 am
Power!
October 12th, 2010 at 11:59 am
Awesome news! Thank you for all the hard work. Now gotta go and see if any of the plugins I wrote have problems with this new release.
October 12th, 2010 at 12:09 pm
Great work.
After this great release, do the team plan to do something for the Mootools marketing ?
Even Mootools is a great (the best?) JS framework, a lot of frustration make that the users offen look to another famous lib : - There is no “Getting started with Mootools” - The are few or no example of using each class. Much of them link to a very old example page. - The Forge is like invisible from Homepage. You have to be very curious to click on it.
As said, I’m an inconditionnal user of Mootools but I found sad, very sad, that Mootools today just looks like a lib made by developpers for developpers and whch is finaly not open to users.
Even you have the best product, if you do nothing for your communication, it will die. I hope someting will come for Mootools…
October 12th, 2010 at 3:24 pm
shortcuts in 1.2.x i’d prefer mostly, why i could to use the JS-like Object model?
October 13th, 2010 at 2:32 am
Good Job, Guys Slick seems pretty useful..
October 13th, 2010 at 12:02 pm
you moved Hash to ‘more’ package why you don’t move Swift?
October 13th, 2010 at 1:25 pm
new Element(‘div#cow.moo.big[data-size=5]’); is totally Awesome
October 13th, 2010 at 8:59 pm
We start our next browsergame … Mooo 1.3 will be on bord 4 sure ;-) Thx for the great Work at the past years, i like the Mooo Team and all supporters.
let’s start the Engine …
October 13th, 2010 at 9:15 pm
No Docs on Slick?
October 13th, 2010 at 9:37 pm
@Eric; Slick’s project page is available at: http://github.com/subtleGradient/slick What are you looking for, exactly?
October 14th, 2010 at 3:33 am
@btw: removing Hash was originally not intended, it just happened. We did not plan to remove anything from 1.3, so that’s why we still support Hash in the compat layer. Some Plugins will likely make the switch to More in 2.0
October 14th, 2010 at 3:46 am
congrats dev team !
October 14th, 2010 at 6:05 am
Great news! Congrats!
October 14th, 2010 at 6:27 am
@davidwalsh I was looking for the documentation in the mootools documentation. Apparently, that was foolish of me… I can use 2 browser windows, thats cool too.
October 14th, 2010 at 10:05 am
Thanks 1.3 is Amazing!
FYI: In the Docs Object.map has a typo “Object.map(timesTwo”
October 14th, 2010 at 10:11 am
absolutely fantastic! gratulations to all! mootools ftw!!! but i noticed something minor: in the uncompressed version of core it says it provides Native, but this was moved to the compatibility layer instead (looks to me like Native was kind of renamed to Type, am i right?)
October 17th, 2010 at 11:38 pm
Very Nice, Thank for your hard work.
October 18th, 2010 at 1:07 am
Hi, I was eagerly waiting for this, specially for slick….
October 18th, 2010 at 11:43 am
Excellent news ! I will test this new version today, specially Slick