About the Author: Chad Auld is a Front-end Engineer working with the Yahoo! Buzz Marketing team. A long-time open-source contributor, he recently helped start the MiaCMS project, a next-generation fork of Mambo built using YUI. In this article, he walks us through the process of developing a desktop application with YUI on the Adobe Air platform.
Ever wonder what people are saying right now about your company, brand, service, product, etc? Sideline, inspired by a recent internal hack project at Yahoo!, goes beyond the standard customer survey process to let you listen in real-time to people talking about your products and then use that feedback to enhance your service or help users with their problems.
Briefly stated, the goals of our project were to
Our team of front-end engineers are experts in JavaScript, CSS, HTML, and PHP but didn’t have a great deal of experience developing desktop applications. So the question became, how to maximize our existing skill-sets for desktop development? The answer for us was to utilize the Adobe AIR platform, which “lets developers use proven web technologies to build rich Internet applications that run outside the browser on multiple operating systems”. Since AIR supports HTML/JavaScript development (in addition to Flex and Flash), we could build our application on traditional web technologies, on top of YUI, and have it run on the three main desktop operating systems.
Sideline contains an extensive implementation of the YUI Library. It should hopefully serve as a great example for other developers interested in experimenting with YUI and Adobe AIR. The application’s layout is constructed using YUI Grids and even makes use of the recently added ARIA Landmark Roles. Grids worked very well in the AIR environment and made redesigns that occurred mid-development easy to implement with minimal code changes. Just like in the standard browser environment, YUI Grids can serve as a great foundation for an AIR application even if the developer decides against using the rest of the JavaScript library and opted for another framework instead.
In addition to Grids, Sideline also utilizes the Dom, Event, Drag and Drop, JSON, Selector, Container, Button, Menu, Slider, and TabView components. I am happy to report that all the YUI components performed extremely well in the AIR environment and required no modifications. Sideline does implement a fairly customized design and thus some customized skinning of the YUI components was required, but no core modifications. Most AIR applications tend to have a rich desktop application feel to them. For this level of customization, the YUI skinning article is a great reference to get started.
A major enhancement of the Adobe AIR platform over the traditional web environment is access to a local SQLite database and the user’s file system. Local database access is becoming more available in traditional web environments through technology such as Gears and HTML 5 client side storage, but for now these solutions are not ubiquitous. For those interested in AIR development, Sideline has tackled many of the common tasks that a typical AIR application might require, e.g., fetching external data, handling application updates, interacting with the local database, working with the local filesystem, launching native browser windows, displaying desktop notifications, etc. It should prove to be a useful reference in that respect.
-webkit-border-radius makes rounded corners a breeze), but use them sparingly and document them so they are easy to spot later.The beta version of Sideline can be installed at http://sideline.yahoo.com. The code is open source under the terms of the BSD license and hosted on GitHub. We welcome contributions, feedback, and/or suggestions. Also, in the spirit of keeping things as open as possible and supporting emerging technology we will likely port Sideline to Titanium in the near future. Some initial work has already been done on the port and will continue over the coming weeks. It is also quite possible that Sideline will end up implementing a JavaScript ORM such as JazzRecord to ease database interactions across platforms. If anyone has additional tips for supporting multiple platforms we’d love to hear them.
Now go forth and fork it!
March 31, 2009 at 12:06 pm
Any chance we can get a language filter included in the Advanced Search options?!?!?
Pretty Please!!!
March 31, 2009 at 1:50 pm
Very nice! May I suggest one thing though: Please make the URLs in tweets clickable :)
March 31, 2009 at 3:04 pm
Ryan – Good suggestion. We should be able to add a “language filter” to advanced search. I’ve put it on the todo list.
Marco – The tweet links are not underlined, but they should be clickable. Unless of course you’ve encountered a bug.
March 31, 2009 at 3:09 pm
@marco – the URLs are clickable, they just look like normal text. Hovering will give you the normal hand cursor and clicking will launch the URL like you’d expect.
March 31, 2009 at 7:15 pm
It seems SOME urls are clickable indeed, but a lot of them aren’t. At least not for me.
April 1, 2009 at 9:45 am
i’m not a big twitter user but from a technical standpoint this is really cool. i love the usage of javascript rather than flash in an AIR app, mainly because there aren’t many JS based AIR apps.
April 1, 2009 at 10:26 am
Does the app really need to have “Unrestricted System Access”?
April 3, 2009 at 1:01 am
Seems like this would have been a good XulRunner project, not AIR or Titanium (who?). At least XulRunner is open source and can run anywhere Firefox can run (in fact firefox -app is basically xulrunner -app with wider distribution).
April 3, 2009 at 12:29 pm
@James, interested to know where Firefox can run that AIR can’t?
April 4, 2009 at 5:26 pm
hmm..im using sideline now.. thank you for the developers..
April 6, 2009 at 10:37 pm
@James – good thing the code is open source. Go forth and make XulRunner a reality…
July 13, 2009 at 9:25 am
[...] Here are Yahoo’s goals for the app: [...]
November 20, 2009 at 12:27 pm
[...] Chad Auld is the author of Yahoo!’s Sideline AIR app for Twitter (built with YUI), and he’s driven the open-source release of the YUI PHP [...]