Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

andylim writes in with news of a reasonably impressive demonstration of the multi-platform capabilities of Adobe AIR. "Christian Cantrell, a technical product manager at Adobe, has created an app for multiple platforms including OS X, Windows 7, Ubuntu, Android, iPhone OS, and iPad OS. What's amazing is that all the platforms use the same code base. 'The application is called iReverse, and it's a fully functional Reversi game (complete with a pretty decent AI). Although iReverse is fun to play, the most amazing thing about the project is the fact that it runs in all these different environments completely unchanged. In other words, the exact same code base is used to build versions for five different environments. There's no other platform in the world that can boast this level of flexibility — not even close.'" Cantrell says he will open-source the code for iReverse and document how he pulled this off.

There's no other platform in the world that can boast this level of flexibility — not even close.

Adobe AIR is to applications like Flash is to webpages. Ludicrous resource usage and awkward non-native GUI elements. When I tried TweetDeck, it would run 20% CPU when idle - and would have a footprint approaching 1GB if left running over night. It doesn't install on 64-bit Linux very well, either.

While interesting it has been done before and to be honest these "portable platforms" all suffer from the same flaw: the applications they produce aren't native to ANY platform. What I mean is that while they run fine in terms of functionality they all look ugly compared to the environment and don't support typical OS features like hotkeys.

Look at GTK+. The applications work fine on Windows and OS X but you can tell within a second that they aren't native applications, they're badly ported Linux applications.

Sure it's completely "unchanged" on every platform. That doesn't mean that it doesn't have a million lines of ifdef'd code. It's just the code doesn't do anything on the platforms where it's not needed. There are vast number of portable libraries and a somewhat smaller number of applications that do just this, having platform specific code conditionally compiled in.

Anyways, I fully suspect this guy's "solution" will be something like "We just used Flash and embedded it into these application 'runtime' thingablobs and then it was simply a matter of loading up the platform agnostic swf file." "Wait, what about the source code?" "Here's the source to the Reversi game. ahahaha did you seriously think we'd open source a runtime that'd put half of us out of a job???"

First of all, Air is broken for GUI apps (on Windows and OS X at least.) It gets many, many basic details of how widgets are supposed to work completely wrong. And, shock and amazement, most of the wrongness is the exact same wrongness that Flash widgets have-- gee! You'd almost think it's just a crummy Flash runtime!

Secondly, RealBasic can target three platforms from a single codebase (Mac, Linux, Windows) and gets two of them completely right. (Linux may be right, but I don't know enough about it to really verify it.) So this is nothing new-- that capability has been in RealBasic for at least 4 years now.

I love these breathless excited summaries. The only real point to take from this is Christian Cantrell is completely ignorant of Flash's competitors in this space. (And kdawson loves hype, the hype-ier the better.)

Java? It's really sluggish and non-elegant compared to AIR. I'm still not sure how the Java interpreter performs so badly on UI elements. While technically probably OK (it's been losing to.NET though), the mere fact that all Java apps feel sluggish creates a bad image for Java. That combined with the fact that.NET has been constantly instructing new features and tens of languages support it (C#, Basic, Object Pascal, ASP..)

Java does bad on GUI's. It's true. OTOH, it doesn't actually do that badly on graphics. It has OpenGL bindings, so for things like making games, it actually does just fine. I'm not personally a big fan of Java, but normal "businessy" GUI apps are really the only are where Java really falls down on performance. And, even then, it's nowhere near as bad as the Java reputation would suggest.

All of their major online properties run on Java. iTMS, Apple store, Mobile Me... Seems like odd behavior if the company wants to 'see Java die.' Besides, how else are they going to sell 11 million songs a day? Rails? PHP?.Net?

You can indeed support platform-specific features in an abstracted UI. You just have to abstract the features, and demand that developers check for them, turn them on, and provide alternative behaviors when they are not available. I know, why bother, that's the same as #ifdeffing around with OS APIs... well, it can work out when a subset of OSes have the same features. The application only has to deal with the features it wants (and their absense) and not each OS which has that feature.

There are a lot of good attempts at reusable portability libraries, but few projects use them and instead opt to re-invent the wheel. It's a shame, actually, many of them are not very onerous and are a great place for code sharing to reach a wide user base.

There are no GUI widgets in Flash / AS3. Everything is actually drawn on screen using vector or bitmap graphics. There are components that you can use that emulate widgets (drop downs, date pickers, etc) but those are not native. This means that they will work consistently across all platforms.

This demo is perfect because it shows a Flash / AS3 developer what they need to do to make sure their app works well across devices.

1. Figure out how your app elements might reposition themselves depending on screen dimensions.2. Figure out how to scale your application and elements so things are usable.3. Use interactions that work on press and not on MouseOver.

The rest doesn't matter. As long as the framework can draw graphics to the system consistently across devices, nothing else really matters. Flash is become the ultimate platform for GUI development.