Friday, September 3rd, 2010

The Quick & Easy Way of Getting into YUI: SimpleYUI

Category: YUI

>The Yahoo! YUI is an incredibly feature-rich JavaScript library with a LOT of functionality but getting your head around all of those features can be tough. The YUI team wants to help developers get up and running more quickly and announced yesterday the release of SimpleYUI; a basic and more streamlined version of the YUI library.

SimpleYUI will contain basic DOM access and manipulation including support for CSS 3 selectors in the selector engine, animations via the new transition module, the event system, Ajax and JSON support.

The great thing is that when you’re ready to leverage more advanced features like managed attributes and custom events, you still have the ability to do on-demand loading just like you’d expect from the full-featured version of YUI. This includes any YUI 2 or 3 component or YUI 3 Gallery module.

javascript
< view plain text >
  1. <script type="text/javascript" src="http://yui.yahooapis.com/3.2.0pr2/build/quickyui/quickyui-min.js"></script>
  2.  
  3. <script>
  4. Y.use('dd-drag','yui2-datatable', 'gallery-accordion', function(Y) {
  5.      
  6.       // here you can use YUI 3 Drag and drop, YUI 2 DataTable, Accordian or any other control contributed to the gallery by the community    
  7.  
  8. });
  9. </script>

YUI team member Eric Miraglia put up a nice post about SimpleYUI which shows you some of the goodness include.

Related Content:

13 Comments »

Comments feed TrackBack URI

Does anybody think that YUI’s going to usurp jQuery? I’m sure it’s got it’s got it’s niche (at Yahoo), but outside of that?

Comment by Skilldrick — September 3, 2010

And I’m sure it’s technically and conceptually superior and all that, but we all know how that story goes…

Comment by Skilldrick — September 3, 2010

We’ve written and rewritten our web application (a packaged software product) using several different JavaScript libraries. We used Prototype+Scriptaculous and Dojo on the first version, jQuery on the prototype for the second version, and now YUI on the third version.

For our type of application, YUI appears to be a solid choice. I like the good base of widgets, class structure, extensibility, and reliability.

Here’s a quick walk through of some of the YUI widgets that we use:
http://www.screencast.com/users/ericrich/folders/Jing/media/7d499412-d4af-49be-ae25-08918371f74f

We’re using YUI 2 now and have played with YUI 3. This all may change when we upgrade to YUI 3..

Comment by ericrich — September 3, 2010

BTW, thanks YUI for the great work. YUI 3 looks exciting!

Comment by ericrich — September 3, 2010

Well, the story of technically and conceptually superior in the development world often goes different then in the consumer world :-)

AFAIC YUI rocks. I especially like the structured approach to building components. For the casual user, I think the the ease with which you can pull down components from both YUI and the user gallery with one command should be appealing.

Comment by mschipperheyn — September 3, 2010

I don’t think anything will surpass jQuery because it’s absolutely great for doing the basics and serves as a point of entry for designers and developers coming from non-scripting backgrounds. Where it falls short is when you’re actually building applications. Data binding, components/modules, dependency loading, and sandboxing really do help build cleanly structured apps. You can do these to some extent in jQuery, but it’s not the default/natural way of doing things.

It’s not about winning, it’s about building a large enough community to get yui3 self sustaining without the yui team. There are more than enough JS developers to sustain multiple js library communities, it’s more about convincing people that different libraries really are good for different things.

Comment by grayrest — September 3, 2010

YUI will find it’s place in a slightly bigger niche as people start writing scripts to be run on both client and server with node.js. jQuery is just not as useful as YUI in that environment .

Comment by BigAB — September 3, 2010

I have never used YUI before (although I have used dojo, proto/scriptaculous and jquery). That said, if you need to release a streamlined version of your library to help people understand it, isn’t that perhaps indicative of a problem?

Comment by drlongghost — September 4, 2010

[warning: comment might sound flame-baitish, but it's just a strong opinion]
.
IMO it’s a way for the YUI team to say “hey world! we released a dumbed down version of our library so all you jQuery pseudo-developers can migrate to YUI without feeling pressure to learning real programming”.
I think it’s both good and bad: they create a new entry point to YUI, but they also still scare some monkeys that fear there’s an “Advanced YUI” that they cannot tackle with their just-download-and-mix-a-hundred-jquery-plugins skills.

Comment by gonchuki — September 6, 2010

@gonchuki
That’s not flamebait*ish*. That’s just a flame.

But as has been already mentioned, YUI and jQuery have two *completely* different goals. YUI is, as the name suggests, a complete user interface framework, with desktop-esque controls, modules and dependency resolution, etc – suitable as the basis for large web applications mimicing the desktop app style. jQuery is nothing more than a cross browser DOM manipulation and AJAX library. It’s great for when you just need a reliable way to create interactive content, but don’t need ish like tabbed pagination or a data table or whatnot. Its when the jQuery developer starts reaching for something like jQuery UI that jQuery stops being a good choice.

Just because a project running in the browser doesn’t need rich controls and the like doesn’t mean its a hack job that a plugin-of-the-week jQuery monkey could write.

Comment by pharrington — September 6, 2010

@gunchuki: I disagree. SimpleYUI isn’t a dumbed-down version of anything — it’s the full YUI 3 that developers expect. Rather, it’s a convenience bundle that rolls up some common functionality and creates a global instance immediately. You can still Y.use() modules not included in the rollup — just as you would do when using any YUI 3 seed file as a starting point. This is a great way for prototypers to get started with YUI and it makes easier the use case of throwing YUI 3 on a page to do simple Dom, Event and Ajax operations. By no means is it reductive beyond that — it’s the full, real YUI 3, with all YUI 3′s capabilities and strengths. -Eric

Comment by miraglia — September 7, 2010

@eric: you are right there, I was just thinking loudly and nothing else. in fact, presence of the Y.use method is what ultimately shows that you are more capable than simple dom and ajax.
my comment was more in perspective of “what people see” rather than “what it really is”.

Comment by gonchuki — September 8, 2010

Now I can finally do all my prototyping with YUI3 instead of jQuery. The only thing that was really holding me back was ease of use.

Comment by rhyolight — September 20, 2010

Leave a comment

You must be logged in to post a comment.