• 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 July, 2009

Implementation Focus: Short Reckonings

After having been VP Technology of Webmotion, a Canadian-based Internet services company, for 12 years, Mikaël is currently volunteering for an IT project in Cambodia where he helps with the startup of a Software Engineering and Telecommunications school targeting poor students of the countryside.

Mikaël has worked in software development for the past 15 years. While he has worked on projects of various kinds and magnitudes, he has always been obsessed by user interface aspects and is a strong advocate of Web-based software.

Mikaël had the idea of ShortReckonings.com when he was a student and was often sharing expenses with friends. Having such a tool at the time would have been great but this was before the Web. With the YUI Library, he has found the framework he needed to make this happen. He considers Short Reckonings as both a lab to experiment with the latest Web technologies and his attempt to create the smoothest user experience possible. He was also seduced by YUI because of the support that comes with it.

Please tell us a little about your project.

http://shortreckonings.com is a free YUI-based Web tool that helps tracking and evening out group expenses. Its light user interface is ideal for coworkers, roommates, travel buddies or family members.

Screenshot of Squarespace home page.

Which components of the YUI Library are used on your site?

Short Reckonings uses the following YUI components: Lang, Dom, Connection, Event & CustomEvent, Overlay & Dialog, TabView, DataTable, Calendar, AutoComplete, JSON. The AutoComplete control allows for faster input of expense descriptions for example. Custom events are used intensively to make the different elements of the application communicate together.

What have been your recent successes?

1.5 years after its beta launch — which was covered on the YDN Blog — Short Reckonings has reached a momentum with its adoption by users from many countries. Today, I am pleased to announce that Short Reckonings is no longer in beta. Since its beta launch, a lot of new features and user interface improvements have been made. Among the most significant
ones:

  • Support for non-even splits and formulas;
  • Rich widgets such as calendar and autocomplete;
  • Content can be in any language (utf8);
  • Print & export to Excel;
  • Sign in with your Facebook account.

Screenshot of Squarespace workflow page.

Congrats! What about any challenges you’ve faced recently?

A recent challenge has been the integration with Facebook Connect JS API. Because FB Connect is a young library and is not very stable, using YUI Custom Events to build a YUI layer above it has been the key to make it usable in production environment.

What do you see for the road ahead?

With my current stay in Cambodia, I have become very concerned about making software usable in slow connection environments and offline. The next version of Short Reckonings will support offline usage (with Google Gears or HTML5 offline storage). Once back in Canada, I also would like to release an iPhone version. And of course migrating to YUI 3 will be an exciting experience!

By Jenny DonnellyJuly 31st, 2009

In the Wild for July 17, 2009

News and notes from the past few weeks. Let us know what we missed!

  • Michael Cramer’s Sparkline Widget (in Canvas): Michael Cramer has created  a Sparkline Widget for YUI that uses Canvas to generate Tufte-esque sparklines; check out his introduction to the widget on his blog and a demo page here.
  • YUI Menus, Overlays and More on Sigalert.com: Traffic site Sigalert makes excellent use of Todd Kloots’s YUI Menu Control, as well as a host of other YUI utilities and widgets.
  • Job Site The Ladders Using YUI AutoComplete and More: The Ladders (theladders.com) is a high-end jobs site featuring positions paying $100,000 or more.  You’ll find a variety of YUI 2.7.0 components on the site, including a fantastic implementation of Jenny Han Donnelly’s YUI AutoComplete Control on the site’s main job search control.
  • Podcast: Jonathan LeBlanc on YUI 3: YUIBlog contributor Jonathan LeBlanc, a technical evangelist on the Yahoo Developer Network team, was in South Carolina and did a series of podcasts with Period Three.  One of these was on YUI 3, which went into official beta recently.  Click through for the video. You can read more about YUI 3 on the Yahoo Developer Network site.
  • 15 Really Useful Web-based HTML Editors: Dav Glass’s YUI Rich Text Editor is among the editors featured in Webdesignbooth’s 15 Really Useful Web-based HTML Editors.  Writes the author: “The Rich Text Editor is part of the Yahoo YUI library and users can easily extend the features via creating plugins for it.”  Check out Dav’s documentation and examples for more.
  • Christian Heilmann’s GeoMaker, Featuring YUI DataTable and Yahoo! Placemaker: Christian Heilmann, technical evangelist for the Yahoo! Developer Network, has coded up GeoMaker, a nice interface on top of the fabulous Yahoo! Placemaker API. Christian’s UI leverages Todd Kloots’s YUI Button Control and Jenny Han Donnelly’s YUI DataTable Control. Check out the blog post here; a screencast follows below.

  • YUI Components with DWR — DWRDataSource: Vijay Dendukuri writes on his JavaChap blog: “I’m working on project which uses YUI and DWR. The hardest part is intergrating these two. I googled on how people integrated YUI and DWR, found this and this. But these solutions will only work with earlier versions of YUI. I’m using YUI 2.7. So i ended up writing my own DWRDataSource. Might be useful for guys who want to integrate DWR and YUI 2.7.” (Original source.)
By Eric MiragliaJuly 17th, 2009

July 27 Bayjax Meeting at Yahoo: Speakers Include Douglas Crockford, Nicole Sullivan, Satyen Desai and Jonathan LeBlanc

Visit the Bayjax site for event registration information.

Yahoo! will be hosting the Monday, July 27 meeting of the JavaScript meetup group Bayjax. We have four terrific speakers lined up — Douglas Crockford, Nicole Sullivan, Satyen Desai, and Jonathan LeBlanc.

Attendance is free, but seating is limited. To RSVP for the event, head over to the Bayjax site.

Thanks to Yahoo!’s Gonzalo Cordero and the Bayjax team for bringing the event to Yahoo! and for lining up a fantastic group of speakers.

July Bayjax @ Yahoo!

Nicole Sullivan — “Object Oriented CSS”

Nicole SullivanHow do you scale CSS for millions of visitors or thousands of pages? What happens to the size of your CSS file as more pages and modules are added? The answer, for most sites, is that it grows out of control and becomes an unmaintainable tangle of spaghetti code. Perhaps more importantly, our sites are too brittle and require guru-level abilities to make even simple changes.

CSS is a powerful, beautiful, and expressive language, but deeply misunderstood and often poorly written. Now is exactly the right moment for it to get a dose of software engineering best practices. Object Oriented CSS allows you to write fast, maintainable, standards-based front-end code. It adds much needed predictability to CSS so that even beginners can create beautiful websites. OOCSS is not a framework or a tool (though in this session Nicole will demo both), it is a better, saner way to write and maintain style sheets.

Satyen Desai — “YUI 3: Design Goals and Archtecture”

Satyen Desai is one of the principle designers of YUI’s next-generation codeline. In this talk, Satyen describes the key design challenges that the YUI engineering team faced in building the new codeline and the design that emerged from those challenges.

Satyen Desai, Sr. Engineer, YUI Team

Douglas Crockford — “The JSON Saga”

JSONJSON is a simple data interchange format. It is rare among standards in that minimalism was one of the principle goals of its design. Radical minimalism made it possible for JSON to compete successfully against entrenched, maximal standards.

Jonathan Leblanc — “Building scalable YQL Widgets with JavaScript”

The Yahoo! Query Language provides a rich and dynamic method for obtaining and manipulating data from any source or api on the internet – with YQL the internet becomes your database. Coupling the data backend of YQL with the extensive data visualization and flow techniques of JavaScript through libraries such as YUI, a developer can build powerful widget and data systems using a simplified SQL syntax that YQL is based in. The marriage of YQL and JavaScript brings a robust MVC interface to the browser.

By Eric MiragliaJuly 13th, 2009

Date Formatting with YUI – Part IV

In Part I of this series, we introduced date formatting with the YUI Date utility and integrated it with the DataTable control in Part II and the Charts control in Part III. In this final part, we’ll look at date localisation with YUI.

To recap, we can format dates using YUI using the YAHOO.util.Date class, which is currently distributed as part of the DataSource utility. Any valid strftime format specifier is supported, so for example, YAHOO.util.Date.format(new Date(), { format: "%Y-%b-%d"}); would return the date as <four digit year>-<short month name>-<two digit day of month>.

The Date utility accepts an optional third parameter, which specifies the locale to use when formatting a date. If not specified, this defaults to "en". The locale is a string that may be the two-letter ISO-639-1 language code, optionally followed by a hyphen and a two-letter ISO-3166-1 country code. For example, fr is used for French, while fr-CA is used for the dialect of French spoken in Canada, and fr-CH is used for the dialect of French spoken in Switzerland. de-CH, on the other hand, is the dialect of German spoken in Switzerland.

Examples of valid locale codes
Locale Code Language
en English (default)
fr French
fr-CA French dialect spoken in Canada
fr-CH French dialect spoken in Switzerland
de German
de-DE German dialect spoken in Germany

The locale code impacts only the following format specifiers:

%a
abbreviated weekday name according to the current locale
%A
full weekday name according to the current locale
%b
abbreviated month name according to the current locale
%B
full month name according to the current locale
%c
preferred date and time representation for the current locale
%h
same as %b
%p
either “AM” or “PM” according to the given time value, or the corresponding strings for the current locale
%P
like %p, but lower case
%r
time in AM and PM notation equal to %I:%M:%S %p
%x
preferred date representation for the current locale without the time
%X
preferred time representation for the current locale without the date

Built-in locales

Let’s start off by looking at the built-in locales. The Date utility includes the following locales by default:

  • en – English (the default)
  • en-US – US English
  • en-GB – British English
  • en-AU – Australian English (identical to British English)

In the following example, we’ll print out the locale-specific date format using the built-in locales:

var d = new Date();
var f = { format: "%x%n" };
var s = "%x:\n";
s += "  Default:\t" + YAHOO.util.Date.format(d, f);
s += "  en-US:\t" + YAHOO.util.Date.format(d, f, "en-US");
s += "  en-GB:\t" + YAHOO.util.Date.format(d, f, "en-GB");

alert(s);

See a working example. Note the different output for en-US and en-GB. Similar differences between these two locales can be seen for %r, %c, and %X.

Supporting other languages

Now, there are many languages other than English, and many web applications that cater to speakers of these languages which the date formatter should support. While these aren’t provided by YUI itself, it is fairly easy to add your own locale patch. Let’s create one now for French. We do this by mixing in the YAHOO.util.DateLocale class with our locale definitions using the YAHOO.lang.merge method:

YAHOO.util.DateLocale["fr"] = YAHOO.lang.merge(YAHOO.util.DateLocale, {
	a: ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"],
	A: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
	b: ["jan", "fév", "mar", "avr", "mai", "jun", "jui", "aoû", "sep", "oct", "nov", "déc"],
	B: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
	c: "%a %d %b %Y %T %Z",
	p: ["", ""],
	P: ["", ""],
	x: "%d.%m.%Y",
	X: "%T"
});

var d = new Date();
var f = { format: "%c%n" };
var s = "%c:\n";
s += "  Default:\t" + YAHOO.util.Date.format(d, f);
s += "  fr:   \t" + YAHOO.util.Date.format(d, f, "fr");

alert(s);

Try it out.

Similarly, we can create one for Canadian French by using the French locale as a base. The only difference is in the locale-specific date format %x:

YAHOO.util.DateLocale["fr-CA"] = YAHOO.lang.merge(YAHOO.util.DateLocale["fr"], {
	x: "%Y-%m-%d"
});

var d = new Date();
var f = { format: "%A, %x%n" };
var s = "%A, %x:\n";
s += "  Default:\t" + YAHOO.util.Date.format(d, f);
s += "  fr:   \t" + YAHOO.util.Date.format(d, f, "fr");
s += "  fr-CA:\t" + YAHOO.util.Date.format(d, f, "fr-CA");
s += "  fr-CH:\t" + YAHOO.util.Date.format(d, f, "fr-CH");
s += "  de-CH:\t" + YAHOO.util.Date.format(d, f, "de-CH");

alert(s);

Try it out.

Notice that we also try to access fr-CH and de-CH which haven’t been defined. In this case, the Date utility falls back to a less specific locale and tries fr and de instead. Since de hasn’t been defined either, it falls back to en, which is built in.

I’ve included definitions for a few locales as examples. If you’d like to use these locales, it may make more sense to just include the code directly in your HTML pages, or copy the files to your own servers.

  • fr – French, Canadian French and Swiss French
  • de – German, and Swiss German
  • hi – Hindi
  • ko – Korean
By Philip TellisJuly 6th, 2009

Graded Browser Support Update: Q3 2009

This post announces an update to Graded Browser Support. The GBS page on the YUI site always has the most current information. This post includes a list of changes, the updated chart of browsers that receive A-grade support, and our GBS forecast. The discussion section breaks out some of the strategy behind the current GBS update.

GBS Changes for Q3 2009

This GBS update adds A-grade support for Firefox 3.5 and for Safari 4.0. A-grade support is discontinued for Firefox 2, Opera on Mac OS X, and IE6 on Windows 2000. With this update, Windows 2000 drops from the A-Grade testing matrix and the testing surface is reduced to 14 browsers on 4 OS platforms (down from 15 browsers on 5 platforms).

  • Initiated A-grade support for Firefox 3.5, Windows XP
  • Initiated A-grade support for Firefox 3.5, Windows Vista
  • Initiated A-grade support for Safari 4.0, Mac OS 10.4
  • Initiated A-grade support for Safari 4.0, Mac OS 10.5

  • Discontinued A-grade support for IE6, Windows 2000

  • Discontinued A-grade support for Firefox 3.0, Windows Vista
  • Discontinued A-grade support for Firefox 2.0, Mac OS 10.5
  • Discontinued A-grade support for Firefox 2.0, Windows XP
  • Discontinued A-grade support for Opera 9.6, Mac OS 10.5
Win XP Win Vista Mac 10.4.† Mac 10.5.†
Firefox 3.0.† A-grade A-grade
Firefox 3.5.† A-grade A-grade A-grade
Opera 9.6.† A-grade
IE 8.0 A-grade A-grade
IE 7.0 A-grade A-grade
IE 6.0 A-grade
Safari 3.2.† A-grade
Safari 4.0.† A-grade A-grade

Notes:

  • The dagger symbol (as in “Firefox 3.5.†”) indicates that the most-current non-beta version at that branch level receives support.
  • Code that may be used on pages with unknown doctypes should be tested in IE7 quirks mode.
  • Code that may appear in IE8′s “compatibility mode,” which emulates but is not identical to IE7, should be tested explicitly in compatibility mode.

GBS Forecast

We expect to make the following changes in the Q4 2009 GBS update:

  • Discontinue A-grade support for Firefox 3.0.x across all OSs.
  • Discontinue A-grade support for Safari 3.2.x on Mac OS 10.5.
  • Begin publication of A-grade matrix for smartphones
  • Re-evaluate status of Google Chrome

Discussion

  1. Opera's marketshare in eastern Europe.Opera: Opera continues to be an important independent browser manufacturer, but its sub-1% global marketshare is now superseded by other browsers whose user base is growing more rapidly (including Safari on Apple’s iPhone OS and Google’s Chrome on Windows). In many ways, the X-grade browser class, which is full of excellent small-marketshare browsers, is the right category for Opera at this point. However, for developers of global products, Opera’s strong position in Russia and eastern Europe (source: StatCounter) argues persuasively for its continued inclusion in the A-grade. Hence, our advice remains that you continue to test your applications in the latest version of Opera on Windows XP. We’ve dropped A-grade support for Opera on Mac OS 10.x to reduce the testing surface and accommodate future inclusion of browsers with rapidly growing marketshare.
  2. Chrome: One of the most common questions we get about GBS today is: “What about Google Chrome?” It’s a fair question. Chrome is an excellent, innovative browser that adheres to web standards, and it has a rapidly expanding marketshare. Chrome remains an X-grade browser today because its marketshare is still very small on a relative basis. If Chrome maintains its current marketshare growth, it will be reclassified as A-grade within one or two quarters. Note that Google’s developer page for Chrome suggests that “if you’ve tested your website with Safari 3.1 then your site should already work well on Google Chrome.” This is good advice.
  3. Yahoo! Search running on the iPhone OS version of Safari.Safari on the iPhone OS: The OS that drives Apple’s iPhone and iPod Touch devices is another ascendant category of browser traffic. Is Safari for the iPhone OS an A-grade browser? Our answer: No, but that doesn’t mean you can ignore it in your product planning and testing. We regard the emerging class of full-featured browsers on handheld devices to be a category that requires its own GBS matrix. Such a matrix should include testing advice for browsers including Safari on iPhone as well as the browsers that ship with Google’s Android OS and Palm’s Pre OS. Treating these browsers as X-grade today is the right decision based on their marketshare — remember, X-grade browsers are expected to support current web standards and to perform well in browsing well developed sites. But the rapid growth of web traffic coming through these browsers, their unique form factors (much smaller screens), and their new interaction paradigms (including touch-screen gestures) argue for an intentional and sometimes differentiated approach to web-application design and implementation. While most content should “just work” and work well, these devices need to be considered at the product-design stage. Providing an “A-grade” experience for your application may not be a question of whether your app runs in the browser but whether your app’s usability on a small touchscreen retains its usability. With this in mind, we’ll begin delivering a smartphone GBS matrix beginning in Q4 2009.

We’d love to hear your take on these issues and others in the comments section.

The GBS Archive

  • GBS Update, 2009-01-28
  • GBS Update, 2008-07-03
  • GBS Update, 2008-02-19
By Eric MiragliaJuly 2nd, 2009

Pages

  • About
  • Contribute
  • YUI Jobs

Recent Posts

  • Yeti 0.2.23 Released
  • 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

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 (26)
  • Target Environments (11)
  • Yeti (4)
  • 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