Reply
Anyone use MooTools?
Old 09-12-2008, 05:38 PM Anyone use MooTools?
VirtuosiMedia's Avatar
Usability > SEO

Posts: 801
I've been having quite a bit of fun working with MooTools lately. I'm building up a script library that uses MooTools. I'm going to be open-sourcing and releasing my scripts after I write a few more (I'm at about 12 right now) and redesign my site. Each script will have demos, full documentation, and a tutorial. I was wondering who, if anyone, on this forum uses MooTools and would a MooTools script library with classes and functions for common JavaScript uses interest you?
__________________
RSS Feed Tutorial
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
When You Register, These Ads Go Away!
Old 09-12-2008, 05:49 PM Re: Anyone use MooTools?
wayfarer07's Avatar
$frontend->developer

Posts: 1,511
Name: Abel Mohler
Location: Asheville, North Carolina USA
Sorry, the name is just too silly for me. It doesn't sound as cool as jQuery. All I can think of is silly cows mooing JavaScript.
__________________
<!--<a href="http://wayfarerweb.com">if a signature drops in the forest, and no one is there to see it, does it make a link?</a>-->
wayfarer07 is online now
Reply With Quote
View Public Profile
 
Old 09-12-2008, 07:10 PM Re: Anyone use MooTools?
thehuskybear's Avatar
Ultra Talker

Posts: 275
Name: Sam
Location: Prescott Valley, AZ
Im using jQuery right now... haven't given MooTools any thought... Does it have any benefits over jQuery?
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Old 09-12-2008, 07:31 PM Re: Anyone use MooTools?
VirtuosiMedia's Avatar
Usability > SEO

Posts: 801
My personal preference is MooTools, but jQuery would probably be my second choice. From what I hear, some of the animations in MooTools might be a little smoother. I also like the syntax a little more and some of the plugins are a little cleaner in general. jQuery seems to have more plugins and a better community, though. That's part of the reason I'm making a lot of these plugins. However, both libraries offer a lot of the same functionality. I've seen a lot of framework flame threads, but I really think it just comes down to what you're most comfortable using.

By the way, if anyone has any ideas for MooTools plugins, please share them. I've quite a few ideas myself, but I might have missed something.
__________________
RSS Feed Tutorial
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 09-12-2008, 07:55 PM Re: Anyone use MooTools?
wayfarer07's Avatar
$frontend->developer

Posts: 1,511
Name: Abel Mohler
Location: Asheville, North Carolina USA
From what I heard you say in a previous thread, you like the syntax better than jQuery. As far as I know, however, jQuery is more compact and efficient than any other widely used framework in the world. It was perfect for me, since I already knew CSS before I studied JavaScript, as it uses CSS selectors liberally.

I'm willing to bet that MooTools doesn't have as good of encapsulation as jQuery. jQuery doesn't extend native JavaScript objects (unless they are attached to the jQuery chain itself), so there is no chance of creating conflicts with other non-jQuery code that might be present on the page. The one thing jQuery does introduce, however, is the $ global object, which can also be expressed as jQuery. $ is sometimes used by other libraries, so you can noconflict it in a few ways, such as this:
Code:
(function($) {
//a bunch of code goes here, where you use $ instead of jQuery
})(jQuery);
This is almost always how plugins are created.

Also, almost all jQuery code goes into a $(document).ready(function() {}); wrapper, which keeps your code away from other code, since you can make as many of these wrappers as you like, without having only one of them execute, unlike the standard window.load event. Of course there are ways around this with regular JavaScript, but document.ready also has the added benefit of executing its code immediately when the DOM is ready, instead of waiting for all of the images to load. This is usually a huge advantage, but when it is not, you can place scripts inside of a $(window).load(function() {}); event (which can also be used multiple times).

The other thing I really love about jQuery is the community. The community is very passionate, and is highly educational. Most of the theories revolve around closures, object-literals, prototype extension (for plugins), and is all about writing small code. It is pretty much a whole new way of thinking about client-side scripting, although I'm positive many of the ideas in jQuery originated with the Prototype library. jQuery is much less bloated than Prototype, however.

I think studying any library is going to improve ones understanding of the weirdo-world of JS. You never know when it may come in handy to be familiar with one particular framework, especially as they become more dominant.

Besides the top ones (jQuery, Prototype, YUI, Dojo), some you may want to check out is:
extJS (mostly for making spreadsheet-type applications and other table-organized applications)
Mochikit (which adds some Python-like features to JavaScript)
and of course
MooTools (which has a weird name, and makes me think of cows mooing out JavaScript).

It's never going to hurt to have more tricks in your bag. Of the above, I know the most about jQuery, and I've also played around with Prototype, YUI, and extJS. I've messed a bit with a slide built from MooTools, but it was mostly compressed when I got to it, so I can hardly say I've coded in it, though it could never hurt to try.
__________________
<!--<a href="http://wayfarerweb.com">if a signature drops in the forest, and no one is there to see it, does it make a link?</a>-->

Last edited by wayfarer07 : 09-12-2008 at 09:46 PM.
wayfarer07 is online now
Reply With Quote
View Public Profile
 
Old 09-12-2008, 08:06 PM Re: Anyone use MooTools?
wayfarer07's Avatar
$frontend->developer

Posts: 1,511
Name: Abel Mohler
Location: Asheville, North Carolina USA
BTW, if MooTools doesn't have an extension like this: http://video.yahoo.com/watch/979796/3765292 , it definitely needs one. jQuery has one. Until I found it, I was thinking of writing it myself.
__________________
<!--<a href="http://wayfarerweb.com">if a signature drops in the forest, and no one is there to see it, does it make a link?</a>-->
wayfarer07 is online now
Reply With Quote
View Public Profile
 
Old 09-12-2008, 08:55 PM Re: Anyone use MooTools?
vangogh's Avatar
Post Impressionist

Posts: 9,011
Name: Steven Bradley
Location: Boulder, Colorado
I'm still not doing much with either at the moment, but I've been leaning toward jQuery, mostly because I too had heard it was more compact and it's easy to see the community around it.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
| Small Business Forum
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 09-13-2008, 12:31 AM Re: Anyone use MooTools?
VirtuosiMedia's Avatar
Usability > SEO

Posts: 801
There are some differences between jQuery and MooTools. I don't know all of them, but I do know a few. MooTools doesn't have a no-conflict mode like jQuery does and it does extend native JavaScript. Both of those are by design, which is fine, I guess, though maybe not the way I would have chosen if I had built it. However, if you're using more than one major framework on the same page, you may want to reexamine your design.

The selectors are similar, but I'm not sure what all the finer points of difference are. In MooTools, there is a $() function that is a shortcut for selecting an item by its id and also for "making an element in Internet Explorer "grab" all the Element methods." There is also a $$() function that grabs a group of elements by class or other selectors. I've found some of the other selectors very useful as well as you can select an element by any attribute, even using bits of regex to do so if necessary.

I don't know about jQuery, but one thing that you might find interesting is that MooTools can also interact with Flash on a limited basis through the Swiff utility. I haven't played with it yet, but I'll get to it sometime in the future.

The MooTools equivalent for the .ready() function in jQuery looks like this:

HTML Code:
window.addEvent('domready', function(){
     //Your code here
});
Compressed and gzipped, the full version of MooTools is about 18k, which is just a little bit bigger than jQuery's 15k. MooTools is modular and class-based, though, so you can choose to only download the parts you need with their dependencies and skip the rest.

The community is probably what separates jQuery the most from MooTools, however. It's very open and inviting to beginners and newcomers whereas I haven't always found that to be the case with MooTools. It states right on the front page that MooTools is for intermediate to advanced users of JavaScript. I don't know that that's necessarily the case, but the documentation certainly isn't for beginners and until recently, there haven't been a whole lot of tutorials aimed at those who don't know very much JavaScript. I struggled a lot learning it because I didn't know any JavaScript at the time. Now that I'm starting to get a handle on it, though, I've come to appreciate it a lot more. I'd like to open that way up for others too, if I can, with the library I'll be releasing. Not all of the scripts will be incredibly advanced, but I'm hoping that they'll be useful for people.

All that said, at some point in the future, I might try to port a lot of my library to jQuery as well because I find the community there really appealing and also because I wouldn't mind learning another framework.

At the end of the day, I really think it amounts to personal preference when choosing a framework, because I think most of them can do most jobs that you'll need. Some might do it a little easier or more elegantly than others, but it depends on what your level of comfort is.
__________________
RSS Feed Tutorial
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 09-13-2008, 12:37 AM Re: Anyone use MooTools?
thehuskybear's Avatar
Ultra Talker

Posts: 275
Name: Sam
Location: Prescott Valley, AZ
Quote:
Originally Posted by VirtuosiMedia View Post
At the end of the day, I really think it amounts to personal preference when choosing a framework, because I think most of them can do most jobs that you'll need. Some might do it a little easier or more elegantly than others, but it depends on what your level of comfort is.
I think that is what it really comes down to with frameworks in general, since using a framework is a preference.

I suppose it might be good to play around with MooTools.. never know when it might come in handy to be familiar with it.
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Old 09-13-2008, 12:42 AM Re: Anyone use MooTools?
VirtuosiMedia's Avatar
Usability > SEO

Posts: 801
Just for reference, I listed a bunch of MooTools resources in this thread, in case anyone reads this and wants to learn more about it.
__________________
RSS Feed Tutorial
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 09-17-2008, 04:32 PM Re: Anyone use MooTools?
bakerc's Avatar
Penguins on toast

Posts: 2,059
Name: carl
Location: UK
Good posts, I have been looking at which framework to learn after VM posted the post above (pardon my grammer !)

I was favouring either MooTools or jQuery and must admit am still on the fence due difference in syntax as I am not sure which would be most suited to myself (as I dont know a lot of JS I dont know which would suit me best if you know what I mean) so have decided to learn more about JS before learning a framework which should put me in good stead (or at least I am hoping it wll).
In saying that I am also trying to learn php at the same time which is probably not the best way of doing things - I have tried to make php priority over JS (because I need a database etc), but JS keeps pulling me back in cos of the cool stuff you can do with it

Thanks for the FF plugin BTW VM
(cant seem to give anyone TP as "I have to spread some about..")

Last edited by bakerc : 09-17-2008 at 04:46 PM.
bakerc is offline
Reply With Quote
View Public Profile Visit bakerc's homepage!
 
Old 09-17-2008, 07:19 PM Re: Anyone use MooTools?
Novice Talker

Posts: 12
It is easier to learn jQuery. It is compact and reliable. Why do you choose to learn MooTools over jQuery?
__________________
BeeWhois.com - Domain Name
No Image Ads. No Pop-Ups. Just a faster Whois.
beewhois is offline
Reply With Quote
View Public Profile
 
Old 09-26-2008, 06:40 AM Re: Anyone use MooTools?
Experienced Talker

Posts: 40
Name: Jabis Sevon
Location: Tampere, Finland
"It is easier to learn jQuery. It is compact and reliable. Why do you choose to learn MooTools over jQuery?"

I beg to differ on this matter Here's a few reasons why MooTools came to be my choice, over jQuery, Dojo and others;
The OO in MOO (if you don't get it, then just move along), very fast CSS-selectors compared to other Frameworks, very neat'n'compact, not at all verbose code, and simply the modularity of the whole framework, as well as no need for "use and discard"-objects bloating your browser memory,

Few ultra-fast cases
- You want fast Ajax content, well hey, just do $('content').load(url);
- You need to post a form, just do $('formid').send();
- You want a nice smooth transition when anchor is mouseovered, and another one when mouse outs; just do
PHP Code:
$$('a').addEvents({
'mouseenter': function(el) { el.tween('font-size', ['12pt','20pt']); },
'mouseleave': function(el) { el.morph({'font-size': ['20pt','12pt'], 'color''#090' }); }
}); 
And a few a bit advanced nice use-cases:
- You want to play music and control the playback using everyday html elements, such as anchors, divs, spans and so on, check out MooSound
- Or perhaps you want to have autocompletion for your search-boxes, check out Digitarald's Autocompleter

Just check out how neat and comparably small these classes are, and how easy it is to implement them, and compare the syntax to jQuery - not too much a difference imo

Perhaps MOO has a bit more steep learning curve, and some say "not so beginner friendly community", "a read only forum and google groups wont be enough" and "not as big a plugin-repository as jQuery's", but as the core developer team states, they concentrate on developing this product for developers much more than average joes, who're just looking for fancy Web 2.0 effects with no effort.

Well, this rant is getting longer and longer so onwards to my conclusion:
I will have to agree to the fact that it's only a preference which FW suits YOUR style best, but I'd like to remind those people early on their designing path, that always going for the "easiest" solution (read: über low learning curve) will never improve and mold your own design pattern, nor does it make you a good coder/designer
jabis is offline
Reply With Quote
View Public Profile Visit jabis's homepage!
 
Old 09-27-2008, 01:47 AM Re: Anyone use MooTools?
VirtuosiMedia's Avatar
Usability > SEO

Posts: 801
Quote:
Originally Posted by jabis View Post
- You want fast Ajax content, well hey, just do $('content').load(url);
- You need to post a form, just do $('formid').send();
I missed both of those when I was doing some of my Ajax stuff. I'll have to go back and take a look at them. Thanks for pointing that out and welcome to the forum.
__________________
RSS Feed Tutorial
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 09-27-2008, 10:03 AM Re: Anyone use MooTools?
Christopher's Avatar
Iced Cap

Posts: 3,113
Location: Toronto, Ontario
I use both. I download a custom-built MooTools that has extensions to natives (ie Array) and the Class class. The rest of MooTools I don't use.

I prefer to use jQuery when it comes to things like event handling and selectors. Because that's all jQuery is really, and it does it great. MooTools on the other hand has all of the utility functions I need to write clean, concise code.
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 10-01-2008, 02:15 PM Re: Anyone use MooTools?