Live data from Hacker News

YUI3 and a Quiet Revolution

andrewwooldridge.com

1–10 of 15 posts

Re: YUI3 and a Quiet Revolution

#2
Not to mention YUI 3.1 is released this week, 3/30/2010. On top of some new functionality, the development team is porting a lot of YUI2 widgets, fixing memory bugs, and cleaning up some of the abstraction.

Re: YUI3 and a Quiet Revolution

#5
Can't see much revolution there.

So they now have a plugin-repository and allow you to directly reference those scripts from your pages. That's great and all, except I don't want to embed external code that may change silently (or not so silently..) at any time.

Here's a tip: People flock to jQuery not because of some bells & whistles like a plugin-repo, but rather because it makes one hell of a lot of sense at the very core. It just feels right™ and allows for very short and elegant code. YUI? Not so much.

YUI feels more like someone took the "Java" in Javascript way too seriously.

Re: YUI3 and a Quiet Revolution

#6
I am patiently waiting for YUI3 to finally reach the feature level of YUI2. I've used version 2 on a few projects and it was a pleasant experience all-in-all.

The only downsides were it was too heavy and too verbose.

I often resort to JQuery when i need DOM manipulation because its nowhere near as verbose as YUI2.

As for the too-heavy thing, it was a compromise because it provides one of the richest widgets in all JS libs out there.(plus YUI3's module system is supposed to help)

Re: YUI3 and a Quiet Revolution

#7
Lots of people that have been using YUI2 will appreciate the new YUI3 modular concept. While using YUI2 if you wanted to use a basic version of a YUI widget/component you would have to include the all of that widget library. Now that has that behavior has changed and most of the widgets/components/modules have been divided in several smaller chunks that make sense. For example, YUI3 IO has io-base, io-xhr, io-form, io-queue etc. You could load any one of them depending you needs. No need to load all of IO.

YUI3 has chaining similar the jquery (not as clean, I think) which makes is less verbose and pleasant to write JS.

Re: YUI3 and a Quiet Revolution

#8
post #5

Can't see much revolution there. So they now have a plugin-repository and allow you to directly reference those scripts from your pages. That's great and all, except I don't want to embed external code that may change silently (or not so silently..) at any time. Here's a tip: People flock to jQuery not because of some bells & whistles like a plugin-repo, but rather because it makes one hell of a lot of sense at the v…

"So they now have a plugin-repository and allow you to directly reference those scripts from your pages. That's great and all, except I don't want to embed external code that may change silently (or not so silently..) at any time."

YUI 3 gallery modules are hosted on Yahoo!'s CDN, and are versioned. Once a particular version of a module is on the CDN at a particular location, it will never ever change, and URLs pointing to it will always point at that exact version.

"YUI feels more like someone took the "Java" in Javascript way too seriously."

This is a common criticism of YUI 2, but have you tried YUI 3? Carlos Bueno's jQuery - YUI 3 Rosetta Stone is an excellent source for comparing common jQuery syntax and idioms with YUI 3. If you haven't looked at YUI 3 before, you may be surprised: http://carlos.bueno.org/jq-yui.html

Re: YUI3 and a Quiet Revolution

#9
post #8
post #5

Can't see much revolution there. So they now have a plugin-repository and allow you to directly reference those scripts from your pages. That's great and all, except I don't want to embed external code that may change silently (or not so silently..) at any time. Here's a tip: People flock to jQuery not because of some bells & whistles like a plugin-repo, but rather because it makes one hell of a lot of sense at the v…

"So they now have a plugin-repository and allow you to directly reference those scripts from your pages. That's great and all, except I don't want to embed external code that may change silently (or not so silently..) at any time." YUI 3 gallery modules are hosted on Yahoo!'s CDN, and are versioned. Once a particular version of a module is on the CDN at a particular location, it will never ever change, and URLs point…

Once a particular version of a module is on the CDN at a particular location, it will never ever change, and URLs pointing to it will always point at that exact version.

Well, I still don't see the revolution. Javascript hosting is not exactly rocket science. So, okay, they have a shiny plugin store now. Great. Pig + lipstick?

you may be surprised: http://carlos.bueno.org/jq-yui.html

Thanks for that link, interesting comparison.

I'm sorry to say that I was not surprised, though. There is not a single snippet where YUI is less verbose. In every non-trivial snippet YUI is more verbose, often significantly so.

The difference may seem small in these trivial snippets but it hints at what happens in real-world codebases: YUI complexity does pile up exponentially, not so with jQuery.

Re: YUI3 and a Quiet Revolution

#10
post #5

Can't see much revolution there. So they now have a plugin-repository and allow you to directly reference those scripts from your pages. That's great and all, except I don't want to embed external code that may change silently (or not so silently..) at any time. Here's a tip: People flock to jQuery not because of some bells & whistles like a plugin-repo, but rather because it makes one hell of a lot of sense at the v…

I agree completely. My company's site was set up with yui2 before I came on board. Maintaining that old code and being forced to write new features with yui has not been a pleasant experience. I am transitioning the site to jquery as soon as possible. I've looked at yui3 over the last few months and while it's better than 2, it's still a mess to work with. There's also performance issues. Jquery is simply more capable and more efficient than yui3 according to recent benchmarks
Post reply on HN