Version 1.5.0 Is Out!

My dear mates, lads, dudes and off course boys and girls, today is the day! The next major version of RightJS with version 1.5.0 is finally out! There were quite a lot of changes, some of them are great, some fascinating and some just cute.

  • First, all the old browser patches and hacks were moved in a separated dynamically loadable module. The core by itself now focuses on the modern browsers support, meaningly FF >=3.5, IE >=8 Opera >10=, Safari 3,4, Google Chrome, while the old browsers support module handles IE6,7, Konqueror and old versions of Opera and FF.

    The reason is simple. It allowed to reduce the size of the builds from 47k and 35k to 41.5k and 30.7k for minified and packed versions respectively. It also left space for new features and optimizations.

    For you, as a developer, it doesn't changes practically anything. All the difference is that you'll need to drop another file along with the core file and that's pretty much it. RightJS will automatically load it up when it needed.

    And naturally you can have the old style all-in-one builds by embedding the olds patch at the custom builds page

    Check the download page for more details.

  • The big cleaning up was done along with some more performance optimizations, many of the dom elements handling blocks were reworked, and now RightJS is faster than itself for another 10-15%.

    Check the benchmarks page.

  • The visual effects module was also heavily reworked, it was made to be working faster, smoother and more reliable. It also supports more features.

    Now you can process all the borders separately, you also can run visual effects on the backgroundPosition properties, you even can feed several options in one, like that

    $('element').morph({
    padding: '10px 10px',
    marging: '1px 2px 3px 4px'
    });

  • The smooth scrolling visual effect was added to the list of basic effects Fx.Scroll

    $('element').scroll({
    x: 100, y: 20
    });

  • The Class unit now supports the Ruby like mixins callbacks.

    var mixin = {
    selfIncluded: function(klass) {
    klass.prototype.mambo = 'jumbo';
    }
    };
    var Klass = new Class({
    include: Mixin
    });

    it supports both selfIncluded and selfExtened methods. Underscored versions self_included and self_extended are also work.

    Happy metaprogramming!

  • The Function unit now has two new methods to handle right-currying and chains.

    var func = function() { return $A(arguments).join('-');
    func.rcurry('bany', 'many')('any'); // -> 'any-bany-many'

    Chains work simple

    var list = [];
    var f1 = function() { list.push(1); };
    var f2 = function() { list.push(2); };
    var f3 = function() { list.push(3); };
    f1.chain(f2).chain(f3)(); // -> list == [1,2,3]

  • The Options module now has a new method called cutOptions, which is handy if your method might receive various number of arguments with an options hash at the end.

    var Klass = new Class({
    include: Options,

    initialize: function() {
    var args = this.cutOptions(arguments);
    }
    });

    This will chop off an options hash from the nd of arguments, feed the setOptions method and return the left arguments as an array.

This is about it. Have fun!