• Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • Tutorials
    • API Docs
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • YUI 2
    • YUI Compressor
    • YUI Doc »
    • YUI Builder
    • YUI PHP Loader
    • YUI Test
    • YUI Website

Blog: Archive for September, 2007

« Older Entries

Working with the YUI DataTable Control, Part 2: Changing the Contents of the DataTable

Don’t miss Part One of this series, in which Satyam explores practical steps on getting started with the YUI DataTable Control.

Daniel Barreiro (Satyam)About the Author: Daniel Barreiro (screen name Satyam) has been around for quite some time. The ENIAC was turned off the day before he was born, so he missed that — but he hasn’t missed much since. He’s had a chance to punch cards, program 6502 chips (remember the Apple II?), own a TRS-80 and see some fantastic pieces of operating equipment in his native Argentina which might have been in museums elsewhere. When globalization opened the doors to the world, his then barely usable English (plus an Electrical Engineering degree) put him on the career path which ended in a 5-year job in the Bay Area back in the days of NCSA Mosaic. Totally intrigued by the funny squiggles a friend of his wrote in his plain text editor, full of <’s and >’s, he ended up learning quite a lot about the world of frontend engineering. It’s been a long journey since COBOL and Fortran. Now he lives quite happily semi-retired in the Mediterranean coast close to Barcelona, Spain. When he’s not basking in the Mediterranean sun, Saytam can be found among the most prolific and knowledgable participants in the YUI community on the YDN-JavaScript developer forum.

In a previous article I wrote about how to get started with your own implementation of the DataTable component. In this article I will cover how to change the contents of the DataTable, especially how to communicate with your database server to make changes and, if successful, show those changes to the user, since in many applications, the contents of the DataTable should be a reflection of the information in a database.

(more…)

By SatyamSeptember 26th, 2007

Implementation Focus: Gaia Online

Jakob Heuser, Karen Ziv, and Joe Paulsen of Gaia Online

Recently we caught up with frontend engineers Jakob Heuser, Joe Paulsen and Karen Ziv of the youth-oriented online community site Gaia. You may have read about Gaia recently in conjunction with their bringing on Michael Boskin, former Chairman of the US Council of Economic Advisors, to help study and foster Gaia’s own economy (which is thriving). Gaia as a website has been around since 2003, starting out as a simple forum with customizable avatars. Since then, it has grown to include games, movies, journals, custom profiles, and so much more. For many teenagers, it’s become a place to express their individual style and identity. As of this writing, the site has over 1.15 billion posts and over 9 million registered users.

Jakob Heuser: (Jakobo) A problem solver at heart, Jakob has been programming as a means to satisfy his knowledge thirst for about 10 years. When not coding PHP, JavaScript, or authoring XHTML and CSS, he can be found musing about community, software development, and user engagement on his personal site felocity.org.

Joe Paulsen: (Joepa) Joe Paulsen has 10+ years of experience working on the web with various agencies/.coms and is currently a Senior Front End Developer at Gaia Online. When he’s not trying to figure out how to use YUI to deliver the complex DHTML interactions Gaia requires, he can be found hanging out with his wife Gloria, his dog Fenway, his guitar, or on the baseball diamond.

Karen Ziv: (foobarbazquux) Karen is a hybrid PHP/front-end developer who, in the last 6 months, has gone from writing simple alerts to self-executing anonymous functions. In her spare time, she likes to nitpick her personal website, collect O’Reilly books, and take her Miata out on back roads.

From a frontend engineering perspective, what are the core challenges you face in your work on Gaia Online?

Gaia is very graphically oriented by comparison to the typical web site, with a focus on avatars and a virtual world experience. As a result, the site has a constant need for rich visualizations to convey that sense of “world”. From the header down to the graphical heavy modules on the site (contest winners, featured content, upcoming events, etc), just about every piece of the page is given a graphical treatment. In many ways, our goals were directly opposed, both to build as many unique visuals into the site as possible while reusing as many elements as we could to reduce load times and ease the strain of content development. At Gaia Online, we were building a new look and feel for a site that has been around for several years. Due to the size of the site (and legacy code issues), the entire site could not be upgraded in one fell swoop. Instead, we needed to find a way to introduce UI components for the required functionality without disturbing the existing infrastructure on the site; all while letting us still plan for the interactivity and internal page refreshes slated to appear over the next several months.

The visually rich Gaia interface.

What role is YUI CSS playing in your project?

YUI Reset CSS and Grids CSS were the keys to creating our layouts in such a way they looked consistent across all browsers. During our migration, we created an alternate version of the reset.css, prefixing the declarations with #gaia_content. This let us mark the body tag on pages that had been converted to use both the reset.css and Yahoo’s grid system. Once we have migrated all of the, the body#id becomes obsolete and can be phased out of the document, leaving us with the pure YUI CSS.

Because of Gaia’s heavy graphical nature, we also found ourselves working with pixel based constraints as opposed to the em flexibility provided by the traditional YUI grid layouts. Not wanting to lose the all the power the grid layouts gave us, we made minor adjustments to our own core.css (an override loaded in addition to the YUI Grids and Reset). In this file, we used one higher layer of specificity to change the relevant measurements from em to px. It worked perfectly out of the box:

 
/* adaptation of yui-t7 */
/* 
*/ #gaia_content{ width:950px; padding:10px 9px; border-left:1px solid #000; border-right:1px solid #000; margin:0; background:#e4ded8 url(/images/gaia_global/body/shared/rs_bodygradient.gif) repeat-x top left; } #gaia_content.lrec_mainLanding .yui-b .yui-gb .yui-u{ width:310px; margin:0 0 0 10px; } #gaia_content.lrec_mainLanding .yui-b .yui-gb .first{ margin:0; width:200px; } #gaia_content.lrec_mainLanding .yui-b .yui-gb .second{ width:420px; } #gaia_content.lrec_mainLanding #yui-main{ margin:0 0 10px 0; height:250px; overflow:hidden; } #gaia_content.lrec_mainLanding .middle{ margin:0 0 10px 0; height:260px; overflow:hidden; }

(Note: In the above example, we created several variations of the yui-t7 layout by adding an additional class to div#gaia_content.)

Beyond the CSS, we found ourselves using Yahoo’s markup for more than just the YUI components. To remain consistent, modules were given the typical hd/bd/ft classes which could then be overridden with ID specific CSS. For our “pure graphical” modules such as advertisements, this let us give more semantic meaning to the modules, defining themselves for browsers that were not using CSS. Without knowing how the scope of the project would change after its launch, using these core class names and consistent styles make it possible to easily implement Drag/Drop, Panel, and Menu in the future depending on how the design might evolve.

You’re making use of YUI’s JavaScript Core (YAHOO, Dom, Event), Utilities and UI Controls, too?

  • YUI Menu Control both from HTML (primary navigation) and for the Shortcuts menu (from JS)
  • Panel Control for the world map navigation and the Daily Chance rewards
  • Connection Manager in the map navigation and Daily Chance
  • Animation Utility in the map navigation
  • Event Utility attachment in the header (menu items, map launching, Daily Chance)
  • TabView Control for rotating “features” on the logged in home page
  • Drag and Drop Utility in the Gaia Profiles
  • YUI’s Logger Utility to avoid alert() everywhere

For a tour of Gaia’s current use of YUI the YUI components listed above, check out video below (also available as a QuickTime movie):

What’s the most innovative thing you’ve done with YUI in the current Gaia release?

In Gaia’s current release, the map navigation was a milestone for the site. It set the direction towards interactivity, making use of the existing “browse the world map” concept we had, and reusing it in a much more engaging way. On the content level, the adaptation of the grids.css made it possible to enjoy Yahoo’s strong support for standards while accommodating the pixel-perfect requirements of the visual design team.

What would you like to see YUI developers improve on in upcoming releases of YUI?

The YUI documentation is very good, although sometimes we found it lacking in practical examples and applications, specifically on many of the more obscure (but very useful) methods that aren’t covered on the default YUI site. In our most recent development, we’ve used the YAHOO.util.Dom.generateId() method for many situations where we need a unique element, but do not actually need to know the ID outside of the module’s context.

In the actual code, the Menu Control has placed itself in a very interesting position. At present it’s hard to have both a lightweight and robust menu at the same time. We’d love to see Menu (and some of the “heavier” components) to make use of the YUI Loader once it is out of beta to include only as much code as needed. The second thing we would love to see improved as YUI grows is a way to access the underlying nodes that are created with so many of YUI’s build-from-markup utilities. Being able to access a Menu’s nodes and subnodes when built from HTML would be a prime example.

By Eric MiragliaSeptember 25th, 2007

YUI Version 2.3.1: Bug-Fix Release

YUI 2.3.1 is now available as a download from SourceForge.We’re pleased to announce today the release of YUI version 2.3.1, a minor release that is characterized by bug fixes and performance improvements throughout the library. Several dozen bugs are addressed in 2.3.1. The new release is available for download immediately.

Here’s what you need to know about YUI 2.3.1:

  1. Rich Text Editor (beta): YUI developer Dav Glass brings serious performance improvements to the YUI RTE, among the only full-featured RTEs to attempt full A-Grade browser support. Dav has continued his focus on this important component and has responded to your detailed feedback. In 2.3.1, several important bugs have been eliminated and improvements throughout the component have yielded major performance gains. We’re not done yet — this is still a beta — but I think you’ll be really gratified at how quickly Dav is progressing in this very challenging arena.
  2. DataTable (beta): Jenny Han Donnelly continues her intensive work on the YUI DataTable Control in 2.3.1. This version of DataTable features, among other things, CSS updates for better support of resizable columns. Moreover, Jenny has resolved issues surrounding the selection model, and she has addressed a number of issues throughout the remainder of the API.
  3. General Bug Fixes: The major 2.3.0 release of July 31, 2007, has generally proved solid, but this release addresses a number of issues that were associated with that release. For full details of fixes throughout the library, see the README files accompanying each library component or refer to YUI Program Manager Georgiann Puckett’s detailed release manifest on YDN-JavaScript.

On behalf of Satyen Desai, Jenny Han Donnelly, Dav Glass, Julien Lecomte, Todd Kloots, Nate Koechley, Matt Mlinac, Adam Moore, Georgiann Puckett, Thomas Sha, Matt Sweeney, and Nicholas Zakas, we hope you enjoy this release. We’re excited to turn our attention to 2.4.0, due before the end of the year, with a couple of nice additions to round out YUI’s feature set. In the meantime, we look forward to your feedback on 2.3.1.

By Eric MiragliaSeptember 19th, 2007

The Bubbling Technique & Custom Event, YUI’s Secret Weapon by Caridy Patiño Mayea

Caridy Patiño Mayea

Caridy, a leading and always-helpful contributor to the YUI mailing list, has been working in front of a PC since the nineties. For the past eight years he’s been a professional programmer developing LAMP applications for the University of Las Villas where he received his B.S. in Computer Science in 2003, and for several companies around the world. He left his university job in August to pursue an independent consulting career and to follow his passion for open source solutions and agile development.

For the last two years he’s been focused on JavaScript as a development platform. Early this year he decided to create an easy-to-adopt YUI extension called “Bubbling Library” as a side project.

There have been many influential articles about event-driven programming within the web browser, and developers are increasingly using this technique. But there is room to push the approach even further, and with it the capabilities of our web applications. In this article I’ll share my experiences in this space and show how my Bubbling Library, combined with YUI’s Custom Event capabilities, can create an unobtrusive behavioral layer suitable for powerful web applications.

(more…)

By Caridy PatinoSeptember 13th, 2007

Working with the YUI DataTable Control, Part 1: Getting Started

Don’t miss Part Two of this series, in which Satyam explores methods for changing data within the YUI DataTable Control.

Daniel Barreiro (Satyam)About the Author: Daniel Barreiro (screen name Satyam) has been around for quite some time. The ENIAC was turned off the day before he was born, so he missed that — but he hasn’t missed much since. He’s had a chance to punch cards, program 6502 chips (remember the Apple II?), own a TRS-80 and see some fantastic pieces of operating equipment in his native Argentina which might have been in museums elsewhere. When globalization opened the doors to the world, his then barely usable English (plus an Electrical Engineering degree) put him on the career path which ended in a 5-year job in the Bay Area back in the days of NCSA Mosaic. Totally intrigued by the funny squiggles a friend of his wrote in his plain text editor, full of <’s and >’s, he ended up learning quite a lot about the world of frontend engineering. It’s been a long journey since COBOL and Fortran. Now he lives quite happily semi-retired in the Mediterranean coast close to Barcelona, Spain.

When he’s not basking in the Mediterranean sun, Saytam can be found among the most prolific and knowledgable participants in the YUI community on the YDN-JavaScript developer forum.

YUI’s DataTable Control has many options, more than any single application will use. Unless you want to improvise something different for each and every page, chances are you will be using a subset of those options. As most often is the case, whatever worked your first time, that’s what you will use in the rest of the pages, usually copying it over and then modifying it for each page. Then, in the second or third page, you notice that clicking on a column heading does reorder the data but not in the way you expected; so, you research a little more and find out that the code you so happily copied all over needs some retouching. Given the complexity of the component and the problems you will address with it, planning a little bit in advance is a good idea.

This article aims to share with you some lessons from my own implementations of DataTable and from the questions I’ve seen posted on YDN-JavaScript related to this component. DataTable will continue to evolve, and some of the issues addressed here may change in nature over time, but I hope to help shorten your path to a smooth deployment of DataTable based on the 2.3.x release.

(more…)

By SatyamSeptember 12th, 2007

New pattern (Vote to Promote), new navigation

thumbnail of a Digg page, the canonical example of the Vote to Promote patternThings have been quiet recently in Yahoo’s open pattern library, but behind the scenes we’ve been working on some cool stuff. First of all, we’ve reorganized the navigation for Yahoo!’s internal library and have now updated the navigation of the public library to match.

We’ve done away with the first-order distinction of “User needs to” and “Application needs to.” In the interests of fostering a user-centered (or, if you prefer, customer-centric) design perspective, we have reclassified all of the patterns in terms of a set of high-level user needs, because we feel that even things the application (or designer) “needs” to do must be driven ultimately by satisfying the need of an end-user.

Currently, the top-level categories in the new organizational scheme include Search, Navigate, Read, Select, Interact, Give Feedback, and Customize. A few more will probably appear as we roll out additional patterns.

Speaking of which, we are publishing a new pattern today, Vote to Promote, which is our interpretation of the best way to incorporate a scheme to allow your users to vote up content, whether content native to your application or identified elsewhere (as with Digg and Reddit).

Vote to Promote was written by Bryce Glass, a senior interaction designer on our community platform team. It’s the first in a series of “social media” patterns we’ve been working on now for much of this year, and you can expect a bunch more to appear over the next few months.

Vote to Promote is also the first pattern to include a “pattern gallery.” One bit of feedback we hear a lot – from you and from designers inside Yahoo! – is that more illustrations are better. This may sometimes show up in the form of diagrams, schematics, and templates. But each new pattern we release from now on will also feature a set of example images captured from across the Internet and displayed via Flickr. Check out the Vote to Promote pattern gallery and feel free to suggest additional examples.

Let us know what you think of the new navigation scheme and the latest addition to the library. Thanks!

By Christian CrumlishSeptember 5th, 2007

YUI Theater — Steve Souders: “High Performance Web Sites: 14 Rules For Faster Pages”

Steve's book, with forward by YUI engineer Nate Koechley, is due out soon from O'Reilly.Steve Souders is Yahoo’s chief guru in the art and science of web performance and the author of the YSlow plugin for Firebug; he is the author of High Performance Web Sites, a forthcoming title from O’Reilly (bonus points if you can guess which animal O’Reilly’s editors chose for the cover of this one without looking at the picture to the right…). For the past three years, Steve has led a team investigating the root causes of poor page performance and applying the lessons learned to Yahoo!’s high-traffic, media-rich properties.

Over the past year, Steve has worked with Tenni Theurer (author of a four-part YUIBlog series on performance: part one | part two | part three | part four) and their Exceptional Performance team to hone the message. Last week, Steve reprised at Yahoo his recent OSCON talk which is derived from the past three years of research.

The details of this research are documented in Tenni’s articles (linked above) and in the Exceptional Performance section of the Yahoo! Developer Network website, so I won’t reiterate those here. Many thanks to Steve for his continuing advocacy on this subject and for allowing us to sharing his talk on YUI Theater.

This video is available in Flash format on Yahoo! Video and as an MPEG-4, iPod-compatible (and iPhone-compatible!) download (change the extension from .m4v to .mp4 if your video software doesn’t recognize the extension).

In Case You Missed…

Some other recent videos from the YUI Theater series:

  • Joseph Smarr: "High-Performance JavaScript: Why Everything You’ve Been Taught is Wrong" (Yahoo! Video | .m4v download)
  • Matt Mlinac: “The YUI ImageLoader Utility” (Yahoo! Video | .m4v download)
  • Shawn Lawton Henry: "Web Content Accessibility Guidelines Update" (Yahoo! Video | .mp4 download)
  • Joe Hewitt: “An Introduction to iUI” (Yahoo! Video | .m4v download)
By Eric MiragliaSeptember 4th, 2007
« Older Entries

Pages

  • About
  • Contribute
  • YUI Jobs

Recent Posts

  • YUI Weekly for May 17th, 2013
  • Yahoo’s International Team Is Hiring!
  • YUICompressor 2.4.8 Released
  • YUI 3.10.1 Released to Fix SWF Vulnerability
  • YUI Weekly for May 10th, 2013

Archives

Categories

  • Accessibility (25)
  • CSS 101 (6)
  • Design (51)
  • Development (590)
  • Frontend Jobs at Yahoo (13)
  • Graded Browser Support (8)
  • In the Wild (63)
  • Miscellany (11)
  • Open Hours (44)
  • Performance (23)
  • Releases (25)
  • Target Environments (11)
  • Yeti (3)
  • YUI 3 Gallery (29)
  • YUI Events (45)
  • YUI Implementations (55)
  • YUI Theater (146)
  • YUI Weekly (37)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
© 2013 YUI Blog