Yahoo’s YUI Better at Touch Interface

Reverse engineering any kind of hardware or software can be difficult. Additionally, if new technology comes along and your product isn’t compatible, regardless of how great your service may be, the consumers will often pass you by.

Yahoo’s User Interface just got an upgrade that now improves interactivity through touch interfaces (mobile platforms and touchscreens)

excerpts from an article on Mobile Crunch by Greg Kumparak

Gather up a group of people who make their living through web design, and they’ll probably all agree on at least two things: A) touchscreens aren’t going anywhere, and B) designing web stuff for touchscreens sort of sucks. Native apps have, in a sense, spoiled users; with things like drag-and-drop and basic touch gesture recognition almost laughably simple to implement in native apps, web app developers are left to hack in such features themselves or risk having their app seem dated from the get-go.

Today Yahoo! is looking to make things a bit less painful with the latest release of their open-source User Interface library, YUI.

Here’s the problem: most of the web was built before touchscreens became popular, so it was up to touchscreen browser developers to ensure compatibility. Now, that may seem trivial; a mouse click and a touch screen tap are pretty much the same thing, right? Right — but they’re also totally different, for one important reason: mice are point-and-click, touchscreens are point-to-click. When you click down with a mouse, you generally click down on a specific element intentionally, expecting that element to react in some way. When you tap down on a touchscreen, you may be interacting with an element — or you might be panning around the page, trying to zoom out, or any one of a dozen behaviors that all look pretty damn similar to an input device.

Here’s how the touch browser guys solved it: rather than firing off a mouse-click event when a user taps their finger down on the screen, they fire it based on when they lift their finger up. That oh-so-seemingly-slight difference makes all the difference in the world, giving the system time to parse whether the user is panning, zooming, or actually trying to tap on the thing they tapped. Alas, it also makes doing things like drag-and-drop in Javascript quite a bit more intense. It’s by all means doable; it just generally means reinventing the wheel with a big ol’ nasty hack.

Along with a laundry list of other features (see below), today’s release of YUI 3.2.0 brings support for touch events — that is, code that knows to fire the very instant something is tapped (rather than when the finger is lifted), making things that support drag-and-drop, flicking, and sliding a whole lot less of a chore to build.

YUI 3.2.0′s other new tricks:

  • Capability-based Loading: Allows certain code to only be bundled/executed for certain browsers. Yes, IE6, everyone is glaring at you.
  • Support for the latest beta build of YUI CSS Grids, one of a number of projects aimed at making the process of building layouts in CSS suck a whole lot less.
  • Flash-based file uploader

YUI 3.2.0 has plenty of other tricks up its sleeve, but it’s not exactly bullet-point friendly stuff. They’re the sorts of things that you’d primarily be interested in knowing about if you were about to build something with it — and if that’s you, you probably already know where to find the details.

3 thoughts on “Yahoo’s YUI Better at Touch Interface

  1. I think youve created some actually interesting points. Not also many people would essentially think about this the way you just did. Im genuinely impressed that theres so considerably about this topic thats been uncovered and you did it so nicely, with so substantially class. Good 1 you, man! Actually terrific stuff right here.

  2. Terrific job here. I definitely enjoyed what you had to say. Keep heading because you certainly bring a new voice to this topic. Not many people would say what youve said and still make it interesting. Nicely, at least Im interested. Cant wait to see a lot more of this from you.

  3. First of all, allow my family appreciate a person’s command during this matter. Even though this is certainly brand new , nevertheless soon after registering your site, this intellect has exploded extensively. Allow all of us to take hold of one’s rss to help keep in touch with at all probable messages Sincere understand but will pass it on to help admirers and my particular are living members

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.