What are your thoughts about javascript frameworks or libraries that you can use all around. For common tasks like AJAX, string alternation or such. I myself have only used jQuery and fell in love with it. It's simple, lightweight and powerful. Also one reason is because it's in Drupal core and also jQuery UI extends it to really powerful all around tool. Also I have heard about Moo Tools, YUI, MochiKit and Prototype. I have no experience with those.
My experience has taught me to take a page from 1980's coding, and realize that in a INTERPRETED language that's bandwidth restricted, libraries are idiotic code bloat that developers are dumber for them even existing. jQuery gets singled out in particular for my wrath; Simple?!? LIGHTWEIGHT???!??!??!!! These are not words I would associate with that fat bloated steaming pile of manure. That idiotic trash has no business on 99%+ of the websites it's used on, PERIOD. The claims of it helping with cross-browser as it's main focus hold water like a steel sieve are just plain BS -- since 90% or more of it's massive codebase is either doing CSS' job, or flat out just doesn't belong on a website in the first place if you give a flying purple fish about accessibility. Of course that by itself MINIFIED it is almost half my ideal target size for an entire page template of HTML+CSS+SCRIPTS+IMAGES, it's not like it's going to get on my list of what belongs on a website. Most of the other ones you listed are equally idiotic crap -- Much like the garbage of HTML 5, CSS frameworks, LESS, SASS and all the other halfwit crap people are sleazing out websites any old way like it's 1997, they claim to make things simpler, easier, faster -- when they do the exact opposite, and in the process piss all over any chance of having an accessible, functional, easy to use or maintain site. Realistically until there's a JS library of the actual useful bits that's under 8k in size uncompressed/unminified, I'm unlikely to be much of a fan... though really if you have more than 16k of scripting in more than two files on your average website, you are likely doing something horrifically and terrifyingly wrong, and shooting your site in the foot... then of course coming to places like this and asking "Why is my site a slow inaccessible mess?"
jQuery is 90% of the time cached in the user's browser, so I don't think it really matters with the size. Most computers have dual core processors at least so can't see a problem with processing 200kb of code. You need to get out of 2000 and move into 2013. jQuery is here and it's not going any where. http://royal.pingdom.com/2012/06/20/jquery-numbers/ Check that page out. It shows just how popular it is and people that are determined to use native JavaScript rather then a library need to realise why it's being used and just how much time it saves. It's most likely cached anyway unless the user has been visiting your sites. Keep up with the times old timer.
It's not so much the size of jquery as the performance hit most websites take when using it, IMO. You are making the false assumption that equivalent functionality implies equivalent performance. Did you know that creating a div is 50% slower in jQuery than native DOM? Intensive applications, such as games, will crumble under jquery. Everything else is so minor, that it's not even worth loading jquery, even if many users have it cached. Source Cited: http://jsperf.com/jquery-sucks
XTMX hit one of the reasons -- again, INTERPRETED language so any extra overhead is going to be slow, painful, and quite often make pages harder to use... and with that corresponding increase in execution time comes a corresponding increase in power use, taking all those 'pesky' arm devices and bending them over the table. Much like fancy CSS3 effects you're best off killing them if you give a flying purple fish about mobile users otherwise you're gonna drain 'em dry. http://www.netmagazine.com/news/jquery-primacy-points-mobile-issues-122298 For decades I've heard the same half-assed bull "Oh everyone has _____ fast a machine now" or "Everyone has at least ____ resolution", or any of the other assumptions and you know what? New smaller less powerful devices have ALWAYS come along. Particularly a problem since for complex math and certain types of operations ARM devices are a tenth the speed per clock cycle of an original 8087 -- and most mobile browsers are SINGLE THREADED. Just because something is popular doesn't make it good. See Justin Bieber and "sparkling" vampires. Which is the part I don't see at ALL. I fail to grasp how it saves time doing anything legitimate, in general it seems to -- as I've said hundreds of times by now -- fall into two categories, stuff that would be less code and more efficient WITHOUT jQuery, or crap that has NO MALFING BUSINESS on a website in the first place. (scripted tabs comes to mind, as does using JS for dropdown menus) Stop repeating the same sleazy half-assed garbage that put companies like WANG and DEC in the ground -- something I most likely was watching happen before you were a twinkle in your father's eye. I swear with the bloated useless crap people are sleazing out any old way as websites, it's like developers are charging by the K-LoC again. Laugh to see a repeat of the same idiocy that put Cobol and Fortran everywhere, then destroyed anyone's interest in those languages when C and Pascal took off.
I see lots of hostility not much useful information. deathshadow, I agree with you on CSS3. I don't agree with not using javascript libraries, it's like not using framework in PHP. If you say that things out there are crap, why don't you make better one then. The link that jquery sucks has a really bad example, ofcourse it will take more time to create element, but try to do other stuff. Your code will be ten times larger and your employer has to pay for the extra work. Thank you xyzseo for that reference, I will definetly check it out.
All these frameworks look pretty the same for me. But jQuery is more widely used, has large community, a lot of plugins, demos and documentation, and so on. I see no reason to switch to other library, if you already started with jQuery. If you need some heavy weight library to do a desktop-like interfaces, you may wish to take a look at ExtJS.
Don't need to -- anything I would do on a website with javascript jquery would save me MAYBE 100 bytes of code -- hardly worth wasting time with a library. That's my point -- libraries are more code, more to learn, more work, less speed, and in general cost too damned much overhead. I do have sort of a library (more like a reminder list), but for deployment I pick and choose the parts I'm actually using and dump it in the same file as the main code(to keep handshakes under control) -- and in total my reminders isn't even 5k (without any stupid malfing whitespace stripping) -- most of it redundant to stuff they FINALLY added in ECMAScript like ClassList and it's methods (add, remove, exists, toggle) since that's really all I need. Of course again, I'm of the opinion that on 99% of websites if you're using more than 16k of Javascript, you're probably doing something wrong... Quite correct, that is a bit of card stacking on that one -- since if you bother creating or accessing stuff at the start and storing it long term, it really negates the overhead unless you're wasting time creating and deleting elements for no good reason. I've cleaned up a number of people's code (jq and non-jq) that was wasting time deleting and recreating the same elements inside loops (really common in JS games) that were easily sped up by simply hiding the elements instead of deleting them. Most of the time I end up smaller, or the same size with more functionality, than I would with the so called 'frameworks' - usually the only time it saves you anything is when you are wasting time on crap like fade-in, fade-out, slide-in, etc, etc; as I've said many times crap that's either CSS' job or doesn't belong on a website in the first blasted place! Thank you xyzseo for that reference, I will definetly check it out.[/quote]
There's one good thing about jQuery - the CSS like targeting systems. The rest is mostly useless. However jQuery has become a standard and plenty of clients request it instead of vanilla JS. Frankly if browser makers would integrate the CSS like targeting system jQuery uses there wouldn't be much use for it on the market.