Moobile 0.1 Released

Written By Jean-Philippe Déry, on Tuesday, April 24th 2012, 12:22pm

Moobile

Moobile is a mobile web application framework built on MooTools. It focuses on building mobile apps that behave as close as possible to their native counterparts, either on a mobile browser or on a webview wrapper such as Phonegap.

Moobile is also meant to be extended. I believe one of the strengths of a mobile web app is the ease of creating something entirely different. Moobile helps in this area by providing a structure as well as controls, view and controllers that can be easily extended to suit your needs.

Moobile relies on external stylesheets for presentation and animations which makes it easy to customize. Rules that should not be changed are marked with an /* Important */ comment. Following these notes will make your app less likely to break or behave strangely.

Moobile also includes a simulator which works in Google Chrome and Safari. This tool will help you develop your app faster as it will give you a good idea of how your app looks and behaves on different devices and orientations. Also, it’s a lot easier to debug and profile your code on a desktop browser. The simulator, however, is not meant to replace a real mobile browser. I encourage to test your application often (and early) in a mobile browser.

Supported platforms

Moobile currently works on Webkit-based browser and has been tested with Safari Mobile on iPhone 3GS, 4, 4S, iPad 2 and “the new iPad”. The simulator runs in both Google Chrome and Safari.

Future Plans

Apart from the usual bug fixing and performance enhancements, the next step is to extend its supported platforms, starting with Android. I’m also looking to make Moobile work with all major browsers supporting CSS transformations, transitions and animations such as Firefox and Opera.

I also plan on improving the simulator so it can simulate multi-touch gestures much like the iOS simulator.

How to help

There’s so much to be done and so little time. If you’re interested in helping, you can contact me at jeanphilippe.dery@gmail.com and we’ll see what can be arranged.

Get it!

Grab your copy at www.moobilejs.com. The project is also hosted on github at www.github.com/jpdery .

MooTools 1.4.5 Released

Written By Arian Stolwijk, on Sunday, February 26th 2012, 9:00pm

MooTools Core 1.4.5 is a maintenance release for the 1.4 branch.

1.4.5 brings a critical bugfix for Fx.CSS which caused many troubles for tweening and morphing your element styles. The bug was caused by a fix in 1.4.4 which should improve animating other length units like % or em (see #2160. Many of you noticed the bug and filled bugreports and also helped us testing this new release.

We have improved our tests and are planning to freeze the code for a new release for a longer period so we can gather more feedback to prevent potential regressions. If you’re interested in testing a new release in your application, you can ping us on IRC (#mootools on freenode.net), Twitter (@mootools / @astolwijk) or in the MooTools User Group.

Fixes

  • #2280 - Fx.CSS breaks Fx.Morph and Fx.Tween
  • #2289 - .setProperty() should trigger .toString()

Contribute

Send us issues (tickets) or feature requests to the MooTools Core Issues or report your problems in the MooTools User Group.

Get it!

MooTools 1.4.4 Released

Written By Olmo Maldonado, on Tuesday, February 7th 2012, 11:30am

Today we release MooTools Core 1.4.4 which is a critical maintenance release. 1.4.3 release introduced a bug as a result of fixing another bug. Specifically, 1.4.3 did not allow custom attributes (e.g. data- or non-standard attributes). See this issue for a full explanation and solution.

We recommend that all users upgrade to 1.4.4 as soon as possible.

Fixes

  • #2160: Fx.Tween/Fx.Morph problem with ‘%’ unit
  • #2175: IE Leak: Array.flatten
  • #2178: IE doesn’t set value when creating element if css attributes are used
  • #2241: Slick.finder index selector
  • #2247: Element.get not reading custom attributes in IE7/8
  • #2248: contains causes “Out of Stack Space” in IE
  • #2252: Element.getParents doc clarification
  • #2262: SVGAnimatedString causes Slick error
  • #2266: Calling setOpacity with null does not remove the style
  • #2275: Update Slick to 1.1.7

Known Issues

  • #2184: IE9 on Windows Server throws exception; can’t continue
  • #2194: Function#bind ES5 bug when bound function is called as part of a new expression
  • #2199: Browser.version always returns the same for Android 2-4
  • #2207: Fx.cancel() should clear animation so Fx.resume() will not continue it
  • #2214: IE8 - Cannot inject into window.opener
  • #2225: IE in-page memory leak when using removeChild
  • #2236: IE8 tween/morph clip:rect breaks
  • #2243: Memory leak with request class
  • #2245: Element.getOffsets() is broken in iOS 4.3 if using -webkit-transform
  • #2265: new Element(‘style’, {text: ”}) throws IE exception
  • and more

These issues will be fixed subsequently prior to release of the next maintenance release, 1.4.5.

Contribute

These fixes and improvements would not have happened if you didn’t submit an issue (ticket) to the MooTools Core Issues, or reporting your problems in the MooTools User Group. Send us your (MooTools) issues (or feature requests) so that your favorite JavaScript framework keeps getting better.

Get it!

MooTools 1.4.3 Released

Written By Olmo Maldonado, on Saturday, January 21st 2012, 12:59pm

Today we release MooTools Core 1.4.3 which is a small maintenance release. Upgrading from 1.4.2 should not cause any backward incompatibilities. We recommend that all users upgrade to 1.4.3 as soon as possible.

Fixes

  • #2109: IE7/8 getProperty returns functions
  • #2110: Documentation: Request.JSON’s behaviour of onFailure
  • #2117: Document conflicts between Array and Elements methods
  • #2121: Missing Fx.options.frameSkip documentation.
  • #2126: Re-add undocumented from argument to Element.fade
  • #2127: Element.js memory leaks
  • #2146: Add Element.NativeEvents to docs
  • #2150: Add Fx.isPaused() method
  • #2152: Packaging issue. Build header and Core.js yml header collide
  • #2155: Add special note to Element.empty
  • #2163: IE7 Crash with Mootools Core 1.4.2
  • #2164: Cannot set numerical 0 values to form fields.
  • #2169: Array#filter should store this[i] in a variable before calling the callback.
  • #2170: propertychange on an input[type=radio] with this.checked fires standard onChange
  • #2176: uid remnant which prevented proper cleaning of elements and their storage
  • #2182: element.erase( ‘html’ ) sets content to text ‘undefined’

Known Issues

  • #2129: < IE9 sets width/height attribute once, and doesn’t update on other loads
  • #2130: Object.each doesn’t address IE DontEnum bugs like Object.extend and others
  • #2160: Fx.Tween/Fx.Morph problem with ‘%’ unit
  • #2168: Fixes 2129.
  • #2175: IE Leak: Array.flatten
  • #2178: IE doesn’t set value when creating element if css attributes are used
  • #2183: Incorrect event.key from some keypress events in Firefox
  • #2184: IE9 on Windows Server throws exception; can’t continue
  • #2185: Fix #2184: IE9 on Windows Server throws exception; can’t continue
  • #2188: Fixes #2178 - A input field should keep its value even when the type property is changed (in IE)
  • #2189: Uncaught TypeError: Property ‘id’ of object # is not a function
  • #2193: Element clone storage again
  • #2194: Function#bind ES5 bug when bound function is called as part of a new expression
  • #2196: it’s better for getStyle method always returns style value with px unit
  • #2199: Browser.version always returns the same for Android 2-4
  • and more

These issues will be fixed subsequently prior to release of the next maintenance release, 1.4.4.

Contribute

These fixes and improvements would not have happened if you didn’t submit an issue (ticket) to the MooTools Core Issues, or reporting your problems in the MooTools User Group. Send us your (MooTools) issues (or feature requests) so that your favorite JavaScript framework keeps getting better.

Get it!

JxLib: An Introduction

Written By Aaron Newton, on Monday, December 26th 2011, 3:02pm

Jon Bomgardner is a contributor to the jxlib.org project. After recently joining the MooTools Developer mailing list and sharing his experience in upgrading jxlib to MooTools 1.4.2 we asked him to share his work here on the blog.

What is JxLib

JxLib is a JavaScript UI framework built on MooTools. It allows web developers and designers to quickly build user interfaces for their applications. JxLib is based on some sweet HMTL markup and strives to be fully CSS compliant. It is also a modular library allowing you to pick and choose from the available components as well as giving you the ability to override default behaviors and extend core classes.

All of this flexibility is, in large part, due to being built on MooTools. The library is heavily object-oriented with a huge number of classes inheriting from a single base. If you know how to use the MooTools class system you will quickly get up to speed on JxLib. In addition to being based on HTML and CSS, which provides an amazing amount of flexibility itself, the library’s architecture is based on a plugin system that allows additional functionality to be added to each component at the developer’s discretion.

A couple of quick examples

So, I wanted to show a couple of easy examples of what you can do with JxLib. There’s a ton of functionality built in and for more complete examples you can check out the examples page at jxlib.org. Here are 3 quick jsfiddles that you can play around with to get a feel of some of the functionality.

Example 1: Drop Down Menu Toolbar

This example shows a simple menu toolbar with cascading menus

Example 2 : Jx.Form and Form fields

This example shows off Jx.Form and a lot of the bundled fields you get out of the box.

Example 3: The New Jx.Container and Jx.LayoutManager classes

This one shows off some of the new work in JxLib 3.1.1. It creates the entire layout using a single javascript object. Check out the center panel’s tabs for a look at Jx.Editor and other components.

Experiences achieving compatibility with Core 1.4.2

I am happy to report that the conversion to Core 1.4.2 went relatively easily. The biggest conversion headache was when I originally worked on getting compatibility with 1.3.2 - that was a ton of work. We used many of the $ global methods ($defined, $H, $A were some of the big ones) and they were littered about the code base quite liberally. I really didn’t want to use the compatibility layer that the folks here at MooTools so graciously provided everyone because the download was big enough as it was. Hunting down all of those changes took the most time. In the process of doing so however I learned a few interesting tidbits:

First, it was best to replace $defined() with a check for undefined and null. for example:

if ($defined(some_variable)) {

became

if (some_variable !== undefined && some_variable !== null) {

I realize that the conversion docs state that checking undefined should be enough but when I tried that at first I got a LOT of weird errors. This change fixed them.

The other thing I discovered is that Object.each and Object.keys weren’t all that useful when the object you’re using them with was actually on the prototype of the class they were in. For example, in JxLib 2.0 we had this code:

processElements: function(template, classes) { 
    var keys = classes.getValues(); 
    elements = this.processTemplate(template, keys); 
    classes.each(function(value, key) { 
        if (key != 'elements' && elements.get(value)) { 
            this[key] = elements.get(value); 
        } 
    }, this); 
    return elements; 
}

It seems that those two functions use hasOwnProperty() which was causing the loop above to have 0 iterations because the classes variable was actually this.classes which was found on the prototype of the class. When converting to Core 1.3.2 (and subsequently 1.4.2) we had to use this:

processElements: function(template, classes) { 
    var keys = [], 
        values = []; 
    for (var key in classes){ 
        if (key !== undefined) { 
            values.push(classes[key]); 
            keys.push(key); 
        } 
    } 
    elements = this.processTemplate(template, values); 
    keys.each(function(key){ 
        if (key != 'elements' && elements[classes[key]] !== undefined && elements[classes[key]] !== null) { 
            this[key] =  elements[classes[key]]; 
        } 
    },this); 
    return elements; 
}

Once those were figured out, and we had full compatibility with 1.3.2, moving up to 1.4.x was pretty painless. For more info on what I learned during the conversion (some of it not MooTools or even javascript related) check out my blog post.

Get More information

You can get more information on JxLib at the following places:

If you have any questions or comments feel free to leave those below or in the Google group (linked above). Also, if you like what you’ve seen and read here please consider pitching in and helping to make JxLib even better. We have many plans for future releases but could always use a few extra hands.