MooTools Core 1.3 Stable and MooTools More 1.3RC

Written By Christoph Pojer, on Monday, October 11th 2010, 4:11pm

Good 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 ($splatArray.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');
  1. Using the barF iframe document as the starting point context
  2. Find me the first div
  3. whose direct parent is a blockquote
  4. whose next sibling is a ul
  5. who contains an element with the id foo.

Slick.find(barF, '#foo ! ul !~ blockquote > div');

Interactive example

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.js for the rare times when feature detection doesn’t cut it
  • New DOMReady implementation improves speed and fixes edge case bugs
  • Array.each now chains! Yes, indeed.
  • Support for touch events on breakthrough communication devices
  • Array: forEach, map, some, every and filter now 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 Hash from now on.
  • Elements is now an array-like-object instead of a real array.
  • Additions to Request — authentication, onprogress and 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!

44 Responses to “MooTools Core 1.3 Stable and MooTools More 1.3RC”

  1. Thomas Aylott says:

    First!

  2. Rolf says:

    1.3 rocks.

  3. Raph says:

    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 !

  4. Enrique Erne says:

    Congrats Dev Team!

  5. Artem Nezvigin says:

    Congrats! Just in time too :)

  6. Tofu says:

    Just replaced Core and More in MochaUI with Core-1.3 and More 1.3rc1 and “It just works”!

    Great Job, well done!

  7. Danillo César says:

    Grats, i go update my plugins.

  8. cpojer says:

    If you need more Power for your new shiny MooTools 1.3 be sure to check out PowerTools: http://cpojer.net/PowerTools

  9. bowsersenior says:

    Very awesome. Thanks for all the hard work!

  10. Elad Ossadon says:

    Win. Awesome job!

  11. simon says:

    The YUI compressor on http://mootools.net/more-rc/ is not working, everything is still fully commented and uncompressed after download.

  12. Cole says:

    Well done guys, your hard work is appreciated!

  13. Daniel15 says:

    Awesome, glad to see this! MooTools FTW! :)

  14. Dr.Death says:

    yeahaaaaaaaaaaa! moo rules

  15. Tim says:

    Good job guys!

  16. Delapouite says:

    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 ?

  17. Stefano CB says:

    Awesome guys! Thanks! Italians do it better, right Valerio?? :D

  18. Tim says:

    Great, can´t wait to test the new features and update my older scripts. ;-)

  19. Martin says:

    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

  20. Djamil says:

    simon, the YUI compressor on http://mootools.net/more-rc/ is now fixed.

  21. zalun says:

    Great job! All new stuff available from jsFiddle as default setting.

  22. cpojer says:

    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.

  23. mploquin says:

    very good job guys! congratulations

  24. Jesse G. Donat says:

    I am super pumped right now.

  25. zorg says:

    Congrats! I’ll start using it right the way :]

  26. Seidr says:

    Power!

  27. Constantin says:

    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.

  28. Michel-Ange says:

    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…

  29. vady says:

    shortcuts in 1.2.x i’d prefer mostly, why i could to use the JS-like Object model?

  30. Nitin says:

    Good Job, Guys Slick seems pretty useful..

  31. btw says:

    you moved Hash to ‘more’ package why you don’t move Swift?

  32. Juan Silva says:

    new Element(‘div#cow.moo.big[data-size=5]’); is totally Awesome

  33. Elko says:

    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 …

  34. Eric says:

    No Docs on Slick?

  35. davidwalsh says:

    @Eric; Slick’s project page is available at: http://github.com/subtleGradient/slick What are you looking for, exactly?

  36. cpojer says:

    @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

  37. false says:

    congrats dev team !

  38. Bloggab says:

    Great news! Congrats!

  39. Eric says:

    @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.

  40. Milam says:

    Thanks 1.3 is Amazing!

    FYI: In the Docs Object.map has a typo “Object.map(timesTwo”

  41. deos says:

    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?)

  42. Sitthykun says:

    Very Nice, Thank for your hard work.

  43. Avinash says:

    Hi, I was eagerly waiting for this, specially for slick….

  44. Nicolas Chevallier says:

    Excellent news ! I will test this new version today, specially Slick