I've been working with JS since it was created, and I've written a lot of my own libs and utilities. I'm now taking a serious look at existing frameworks simply because the effort of writing, debugging, and documenting my own code is too time consuming.
Of the more mature and robust frameworks available, I think jQuery and MooTools offer the kind of approach that fits well with my thinking. There are differences between the two, but they are very similar in many respects. I'm leaning towards standardizing on jQuery because it packs a lot of functionality into a small package, is well documented, has a professional feel to it, is growing rather than shrinking, doesn't try to shove a class-based OO approach into JS where it doesn't belong, and has some great plugins and effects available for it. I am evaluating jQuery for two purposes: 1) To be used in a number of webapp projects by different teams, with costs in the millions. I don't want to pick a framework that will be gone and unsupported tomorrow, or one that moderately experienced js programmers wouldn't be able to pick up quickly. 2) My own use, to ease my pain. I'd like to take things like my fast and robust table sorting (and filtering, paging, etc) routines and map them into the jQuery namespace as plugins (I tried to comment on the zebra striping showdown and show my version but I think I was moderated out!). I have my own library that I've been working with/on for quite a while (even registered JavascriptElements.com) and I considered branching parts of jQuery into my own version. But, I'm sick of re-inventing the wheel - jQuery seems adequately round. I want to re-invent the steering wheel instead. With these things in mind, I have some general questions about the design decisions in jQuery: 1) There seems to be a lot of emphasis on using selectors and pseudo-selectors to access everything. It makes code short and simple, but is it really the most efficient? 2) Why encapsulate elements in a jQuery object rather than extending HTMLElement? Using the latter, you gain the ability to use built-in methods and properties of the elements, and you only have to worry about hacking it to work for IE (but hopefully not IE8!). 3) Some of the functions in jQuery seem to be "magic" in that they do and return a lot of different things depending on how they are called. This seems very Perl-ish to me, and that's one of the things that ended up making Perl so insanely incomprehensible to many. Why overload so many methods, rather than giving them their own understandable names? 4) Any chance of a jQuery-lite, without all the css selector logic? Or is that kind of Sonny without Cher? 5) What is the max compressed file size you want to stay under? Will plugins and other extensions be pulled into the main source file at some point? Or is the goal to keep the current core functionality as-is and depend on plugins for any extended functionality? Is there any concern that the framework will become fragmented (again, like Perl) so developers never know which set of plugins (modules) they need to do the job? 6) Finally, can anyone comment on introducing jQuery into a team of web developers with low to moderate javascript experience, building webapps or web sites that could run into the millions of dollars? Is jQuery robust enough and easy enough to deploy that it's an easy win? I tried to ask similar comparison questions on the MooTools forum, but the developers and community there seem to have a bit of an attitude problem: http://forum.mootools.net/topic.php?id=1607&replies=12 I appreciate the tone and professionalism of the jQuery site and community. It's a big plus. Thanks! -- View this message in context: http://www.nabble.com/jQuery-Design-Decisions--Comparison-to-MooTools--tf3218550.html#a8938358 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/