views:

297

answers:

7

Through the past few years I've been busy with server side programming and I kinda ignored these JavaScript libraries. Because of my good knowledge and long experience with JavaScript I always wrote everything from mostly scratch. Even back then it seemed stupid but I guess it was more the challenge and student mentality. Recently I've started working with YUI, Javascript and Prototype and I easily do what I want however I haven't spent enough time on it and am not sure what I should stick with. I'm planning to use these in a site with 100 users online at a time. So two concerns are efficient AJAX and also client side load time. I am planning to go with the combination of JQuery and YUI. loading Yahoo UI from yahoo and the latter form google. However it seems to me that this is unnecessary and I might in the future regret it. I wanted to get some opinions! I did look around and read other posts but most people seemed to have an emotional problem rather than technical.

A: 

I'm only just getting into JQuery but I find it great for what I need it to do. Since its hosted on Google's content delivery network I don't find it to be a major contributor to load times. The minified file itself is cached in many places accross the net and on client machines as well.

YUI I did use for a while and then abandon in favor of building my own html and CSS layouts. That could be because I do mostly custom work for clients and updating layouts and creating new layouts is not a priority for me. I find my custom code to be easier to read an maintain but that said I don't think that loading YUI added much overhead.

Perhaps use YUI for building new pages for your site and then optimize the code for popular pages and elements when or if you start to experience performance issues. Same would go for JQuery. Google and Yahoo both have a vested interest in code performance since they handles millions of web visitors a day.

left_coaster
+3  A: 

http://stackoverflow.com/questions/394601/which-javascript-framework-jquery-vs-dojo-vs

http://stackoverflow.com/questions/2644556/prototype-vs-jquery

this next one is a little bit dated but I remember when I was making a similar decision last year this article seemed fairly thorough and symmetrical in it's treatment of pretty much all of the major js frameworks + browsers

http://blog.creonfx.com/javascript/mootools-vs-jquery-vs-prototype-vs-yui-vs-dojo-comparison-revised

I remember this article being decent, but keep in mind he is a rails guy so he's obviously going to like prototype better:

http://thinkrelevance.com/blog/2009/01/12/why-i-still-prefer-prototype-to-jquery.html

I went with jquery based mostly on performance. They use sizzle and seem to be very conscious of the size of their codebase.

umassthrower
A: 

Note that jQuery and YUI are both hosted on googleapis which also offers https whereas Yahoo's CDS does not.

Graham Chiu
why would I want to link to it via https?
jsd911
If you run any https pages, and link to css/js on a non https site, you will get for *every page* warnings from IE that you are getting a mixture of secure and insecure content. This is very annoying!
Graham Chiu
+4  A: 

I'm not objective about this, but the argument for YUI 3 is that it's concise, efficient, and scalable -- and with 200 modules now in the YUI 3 Gallery, it's got a community making it better every day.

My take on why YUI 3 is the best choice, now about a year old, is here:

http://developer.yahoo.com/yui/theater/video.php?v=miraglia-yuiconf2009-yui3

Since that time, the team has continued to build on the fundamentals discussed there...and YUI 3, for me, is as fun and productive as JavaScript development has ever been.

-Eric

Eric Miraglia
+1  A: 

Yeah I love jquery

Bill Jones
+2  A: 

I love jquery man and YUI is getting big!

jjprime
+1  A: 

I used YUI extensively on a couple projects and I can say that their online documentation is second to none. Furthermore, the framework is very mature.

I have also started using jQuery recently. So far it also appears to be a fine JavaScript framework.

B Shelton