Rey Bango of Ajaxian Interviews YUI Developers Adam Moore, Satyen Desai, and Luke Smith

April 30, 2010 at 1:25 pm by Eric Miraglia | In Miscellany | 2 Comments

Rey Bango of Ajaxian (and Microsoft) visited Yahoo! last week, and he has posted his interview of YUI core team members Adam Moore, Satyen Desai, and Luke Smith. Check it out on his blog or in the embed below.

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

In the YUI 3 Gallery: Peter Peterson’s Ratings Widget

April 28, 2010 at 8:46 am by Peter Peterson | In Development, YUI 3 Gallery | 4 Comments

About the author: Peter Peterson is a lead front-end engineer for Yahoo!’s internal developer tools.

I wanted to get my feet wet with the finalized widget infrastructure presented in YUI 3.1.0, and I’ve always felt the best way to do that is to write some code. I wanted something easy, and I found that in a CSS ratings implementation I found on Komodo Media. The resulting widget is the YUI3 Ratings Widget (demo). The bulk of the work of the widget is handled by CSS and is described well in the Komodo Media article. The only trouble with that widget, was once a rating was chosen, nothing really happened unless the page was reloaded, and when the widget lost focus, it lost its rating. This is where the YUI 3 Gallery Ratings widget comes in.

My goals for the project were:

  • The code for the widget should be just enough to touch on the basics for how to create a YUI 3 widget
  • The widget would progressively enhance the page
  • The user’s interaction with the widget is easily captured
  • Add a clear rating button which does not exist in the original design
  • The widget should be accessible for people using screen readers
  • Make the instantiation and interaction with the widget dead simple with as little code as possible.

It is easy to add the ratings widget to your page using the YUI loader:

YUI({
    gallery: 'gallery-2010.04.14-19-47'
}).use('gallery-ratings','event', function(Y) {
    // Program logic...
});

You’ll also need the image assets and CSS file located located at github or from your own copy of the gallery.

Simply add a node in your source that contains the current rating (any number between 0 – 5) or is empty.

<span id="myWidget">2.5</span>

You can then instantiate the widget with the following code in your sandbox:

var myRating = new Y.Ratings({ srcNode: "#myWidget" });
myRating.render();

I felt that it was important to make this widget easy to customize and so I added some configuration to the constructor. inline when set to true will display the rating inline with text on the page (defaults to false). skin can be set to “small” to decrease the size of the widget ( Example: )

On its own, the ratings widget does little more that set up the rating interaction for the user. A little more work needs to be done to actually use the value. I’m leaving that up to the implementer to consider; whether to add a callback to the event fired when the rating changes, or to supply a plugin to the widget to handle it automatically. To get you started, whenever a rating is changed the ratingChange event fires. It is easy to set up an event listener to catch the ratingChange event for all the widgets on the page. In this example, I log the Rating Widget srcNode’s id, the previous rating, and the new rating for any rating widget on the page when the rating changes:

Y.on("ratings:ratingChange",function(e){
  var id = e.target.get("contentBox").get("id");
  Y.log(id+" New Value: "+e.newVal+" was: "+e.prevVal);
});  

Future ideas for the project:

  • Progressively enhance form elements
  • Make the clear rating button optional
  • Make the rating range configurable
  • More skins, and combination of the CSS sprites
  • Internationalization

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

Cinco de NodeJS — May’s BayJax Celebrates Server-Side JavaScript with Ryan Dahl, Elijah Insua, and Dav Glass

April 27, 2010 at 11:23 am by Eric Miraglia | In Development, YUI Events | 3 Comments

BayJax organizer Gonzalo Cordero has announced that it’s time for another BayJax, and this time we’ll be celebrating the explosion of server-side JavaScript with Cinco de Node.js at Yahoo!. We have three fantastic speakers: Ryan Dahl, creator of Node.js; Elijah Insua, creator of one of the major DOM abstractions for Node; and Dav Glass, a YUI engineer who has been blogging about his work getting YUI 3 running under Node.

Please join us on May 5th @Yahoo! HQ from 5:30pm to 9:00 p.m. As Gonzalo puts it: “Sombreros, ponchos and luchador outfits are encouraged.” RSVP on the BayJax Meetup page.

Ryan describes his talk this way:

It is well known that event loops rather than threads are required for high-performance servers. Javascript is a language unencumbered of threads and designed specifically to be used with asynchronous evented I/O, making it an attractive means of programming server software. Node.js ties together the V8 Javascript compiler with an event loop, a thread pool for making blocking system calls, and a carefully designed HTTP parser to provide a browser-like interface to creating fast server-side software. This talk will explain Node’s design and how to get started with it.”

Elijah, who will be Skyping in from New York, will talk about his project, jsdom, which provides the essential DOM abstractions that allow client-side, DOM-dependent JavaScript to run under Node.js. This is an important part of the paradigm shift, enabling levels of server- and client-side code reuse never possible before and allowing progressive enhancement to be a natural, efficient outgrowth of our development environment.

Dav will carry this theme forward, showing in practical terms how the foundation of Node.js, the abstractions in jsdom, and Dav’s own work to add BOM features to jsdom enable a full implementation like YUI to illustrate some of the enormous promise of this kind of development. You can read about Dav’s work here on YUIBlog (Part 1; Part 2).

Catch Up On Past BayJax Meetups

Gonzalo has organized a great series of BayJax events of late. Did you miss any? Here are the YUI Theater links for the latest in the series:

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

In the Wild for April 24, 2010

April 24, 2010 at 6:57 am by Eric Miraglia | In In the Wild | No Comments

After another nice edition of YUI: Open Hours on Friday, we’ll round out this week with just a few notes recent notes and implementations from the YUI development community:

How much did we miss? Let us know via @yuilibrary or in the comments below (if you’re feeling retro).

Stay tuned: Rey Bango from Ajaxian stopped by Yahoo yesterday and recorded a video interview with YUI engineers Luke Smith, Satyen Desai and Adam Moore. That session, plus a talk with BayJax event organizer Gonzalo Cordero, should be running on Ajaxian in the coming week.

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

YUI Theater — Adam Granicz: “Robust and Rapid Web Development with WebSharper” (57 min.)

April 23, 2010 at 8:49 pm by Eric Miraglia | In Development, YUI Theater | 2 Comments

Adam Granicz, CEO of Intellifactory, speaking at Yahoo! on April 21, 2010.

Adam Granicz stopped by Yahoo! earlier this week to talk about the F# programming language and its use in web application development.

Granicz’s company, Intellifactory, produces the WebSharper platform. WebSharper fills the role in the F# community that GWT and similar tools fill in the Java community, promising a strongly typed, fast, tightly integrated development experience with deployment to rich web applications. As Fybit’s Riatrax4JS and yui4java do for Java developers, WebSharper brings the power of YUI 2 to F# developers, making a wide range of YUI widgets available.

If the video embed below doesn’t show up correctly in your RSS reader of choice, be sure to click through to watch the high-resolution version of the video on YUI Theater.

Other Recent YUI Theater Videos:

Subscribing to YUI Theater:

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

YUI: Open Hours for Friday, April 23rd

April 22, 2010 at 12:32 pm by Luke Smith | In Development | 4 Comments

The next installment of YUI: Open Hours is tomorrow, Friday the 23rd!

The first Open Hours was a huge success, with about 30 people joining in and some great conversation and feedback for both Lauren Smith’s YUISand Gallery module as well as for YUI.

The time will be the same as before, 10am – 12pm PDT. The primary agenda item for this week will be an introduction and code review of Eric Ferraiuolo’s Component Manager Gallery module. I’m also going to start opening the conversations with a "YUI 3 tip or trick" of sorts.

This week, we’ll be joined by fellow YUIer Satyen Desai (@dezziness), the lead architect behind the Attribute, Base, and Widget infrastructure pieces in YUI 3. (If you’d like to meet Satyen before the event, you can do that on YUI Theater.)

Like before, the plan is to use Adobe Connect for screen sharing and do voice over a conference bridge. This is the info for joining in:

  1. Dial in to 1-888-371-8922 (non-US participants, email me for a local number)
  2. Enter the attendee code 47188953
  3. Join the screen sharing session (this will prompt you to install the Adobe Connect plugin if this is your first time using it)

And as mentioned with the first YUI: Open Hours, you can keep up to date with the upcoming schedule and topics by following @yuilibrary on Twitter or subscribing to the YUI Event Calendar.

If this is the first you’ve read about YUI: Open Hours, it’s an open forum with myself and other YUI team members and some great minds from the YUI community. You can read more about it here.

Hope to see you there!

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

YUI Theater — Nicholas Zakas, Stoyan Stefanov, Ross Harmes, Julien Lecomte, Matt Sweeney: “High Performance JavaScript” (92 min.)

April 21, 2010 at 10:36 am by Eric Miraglia | In Development, YUI Theater | No Comments

BayJax event at Yahoo! on March 31, 2010.

The April 2010 edition of the BayJax meetup at Yahoo! featured five speakers, all of whom are co-authors on the new High Performance JavaScript volume from O’Reilly (free chapter available here). There were about 200 attendees filling the URLs Cafe in the heart of Yahoo!, and they heard five distinctly interesting takes on web-app performance.

If the video embed below doesn’t show up correctly in your RSS reader of choice, be sure to click through to watch the high-resolution version of the video on YUI Theater.

Other Recent YUI Theater Videos:

Subscribing to YUI Theater:

[Photos by Nicole Sullivan; used by kind permission.]

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

Next Page »
Hosted by Yahoo!

Copyright © 2006-2010 Yahoo! Inc. All rights reserved. Privacy Policy - Terms of Service

Powered by WordPress on Yahoo! Web Hosting.