What is the best lightweight JavaScript framework? [closed]

I'm looking for a lightweight JavaScript framework whose primary purpose is to abstract out browser differences. I are primarily using it to create new UI elements, and I don't need much other than something that gives me a platform independent language and DOM.

Answers:

Answer

There are 3 JS libraries that I currently use: Prototype, jQuery and MooTools. Prototype and jQuery are the most widely used. jQuery and MooTools are the most lightweight.

MooTools has a nice feature on their site that allows you to build a custom compressed .js file with only the modules you need, making the lightest, depending on what you're doing. jQuery has a much higher fan base, and better support because of it.

Of the 3, I'd recommend jQuery, but it's probably not a bad idea to take a look at all the options available.

Answer

I use jQuery - it is simple and small, and best of all: Very easy :)

Answer

Also see question What JavaScript library would you choose for a new project and why?

It seems that jQuery has been growing the most recently. (See this presentation, slide 4)

Answer

mooTools is my favorite as well. Their interface allows you to take as much or as little as you like, so if you would like to add more tricks to your tool bag down the line, it's pretty easy to do so.

Answer

I'm a big fan of the Yahoo! User Interface (YUI) Library. It has a good set of DOM manipulation stuff, and a pretty solid widget framework. Plus, you can mix and match what you want to be using.

Answer

I prefer JQuery. It has good documentation also.JQuery

Answer

I also like jQuery because of the powerful selector function "$" and want to provide a link to an alternative documentation: Visual jQuery

Answer

Here is a comparison chart that I used to help evaluate some of the various libraries out there.

Javascript Framework

It is by no means lists every feature of every library, but gives you a good overview to narrow down your choices to what frameworks you should dig further into to see if it meets your needs.

Answer

I tried prototype and scriptaculous first but then switched to jquery and there is no looking back. If you want nice user interface then YUI is good, but jQuery is simple one in my opinion.

Answer

Try DOMAssistant. It's only 7 KB gzipped, is really fast and has Unicode support.

Answer

Personally, when I was doing client-side work, I fell in love with JQuery, which has a 15k version. There's a slight learning curve, but it's very very slick.

Answer

jQuery is very slick and very easy to learn. I have used Moo in the past for some basic DOM manipulation. It's got less of a footprint but less functionality. The best choice for you definitely depends on your requirements.

Answer

The base YUI code -- yahoo-dom-event.js -- is 31KB and works very nicely. You get all sorts of nice event handling & DOM manipulation, and it's very easy to then add on the more complex -- and heavier -- stuff if and when you need it.

Answer

Just a suggestion, but I would look for a framework that has the features you desire and not worry too much about the size, within reason. Most modern frameworks like PrototypeJS or JQuery are not that big and have minimized versions (spaces removed, etc). Additionally, you should have your site configured for caching of these libraries. The only time a user will need to download the library is on the first visit, or any visit after they have cleared their browser cache.

When naming the library file(s), make sure to use a unique file name. For example, name your library based on the version of the library. When you need to upgrade to a new version of the library, just reference the new file name (version) from the relevant pages. This will allow you to cache these files without a short-term expiration date.

There are a lot of other caching techniques you might use to get around library file size and improve performance. I would recommend "High Performance Web Sites", ISBN: 0596529309. While all the information in the book can be found online the book does a nice job of collecting the information you need in one place, and glues the various concepts together (I have not financial interest in this book).

Answer

Whatever you choose, consider letting Google host it for you:

http://code.google.com/apis/ajaxlibs/

Answer

This question is really a duplicate of this question (I think). My answer on that question was as follows (and applies here as well):

You will get a million answers here. The short one is: there are several, not a single one. They are all different in some ways and similar in others, and, in general, none of them are poor choices. The main frameworks that I would recommend are (in alphabetical order so as not to show any bias):

* Dojo
* jQuery
* MooTools
* Prototype (with Scriptaculous)
* YUI
* MochiKit

Each of these have different styles, different communities, and different focuses. Which one you should choose is mostly a matter of matching these frameworks' style with your own. Spend some time with the tutorials and demos of each and pick the one that makes the most sense for you.

As a disclaimer, I'll point out that I'm a developer for MooTools, and wrote a book on how to use it. I wouldn't say that MooTools is better than any of these other frameworks; only different.

Answer

I use Prototype pretty extensively. The default package is 28 KB, whereas jQuery is 90ish*.

http://www.prototypejs.org

*Uncompressed

Answer

You can pack any JavaScript code to make it more lightweight, so the question might come down to which do you prefer? I go for Prototype - there is a version available called protopacked which I think comes in at about 20 KB.

Answer

MooTools is pretty hot. It's getting a bit bigger these days (the base is 60 KB) so that might be out of your reach.

But if you're really just after basic DOM, jQuery would probably be ideal.

Answer

Another vote for jQuery here. Fast, light, and the more you learn it, the faster and more concise your code will be.

Answer

I'd recommend MooTools :-)

var theDiv = new Element('div', {
    'id': 'theDiv',
    'styles': {
        'backgroundColor': '#BF1942',
        'color': '#fff'
    }
}).toggleClass('someClass').inject($('someSibling', 'after');

I really like the readability of its code.

Answer

I've rolled my own for years, but when playing with others stay far far away from dojo + jquery. I have nothing but good stuff to say about a combination of mootools (best js ani I've seen) + the gui or yui kits

Answer

I agree with JQuery as the light, extensible, powerful option. My company is currently using Extjs, which is massive and way more complex for what we are doing. Extjs is great if you need to make a quick site with no designers involved (it comes with all the graphics and styles for creating anything you need) but it's about 6MB and ends up making simple tasks more cumbersome :)

If I could do it all over, which may happen, I'd use JQuery.

Answer

Jquery hands down....

plus it's popular so you know it will be around

Web developer trends

Answer

midori is a lightweight JavaScript framework (only 45K uncompressed). It supports most CSS2 and CSS3 selectors to access DOM elements, and does not require you to learn an entirely new API. On top of the standard DOM, event and Ajax functionality, it also supports basic visual effects, drag and drop, pop-up menus and auto complete among other things.

Answer

jQuery is very good.

What would be very cool is if we could add our framework to a list of frameworks that are being suggested here and allow others to vote on the one that they like best or use - i.e. a dynamic poll/survey.

Answer

I like jQuery because it is lightweight but extremely powerful.

There is also excellent documentation and tutorials to get you started.

Answer

YUI is too big and complex for my tastes. I used to be a Prototype fanboi, but it's lost its luster to me as I've come to use jQuery in new projects. What I like about jQuery is the consistent mental model: find something, act on it.

I liked jQuery enough that I built a Dashboard widget for offline access to the docs: jQuery Reference Widget

Answer

jQuery is your best option if you are doing small enhancements, since it's the most widely used framework, and you'll get plenty of feedback from other users. However, I am not a jQuery user myself because I already develop RIAs using Ext. Because of that, I use Ext-core (a subset of Ext) because the framework has better OO design, and it provides the same basic functionality as jQuery (event handling, DOM manipulation, Ajax).

http://www.extjs.com/products/core/

I've never used Prototype because they augment Object.prototype which causes bugs in our code.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.