Forgot your password?
typodupeerror
Android Iphone Programming Games Linux Technology

Multi-Platform App Created Using Single Code Base 296

Posted by kdawson
from the earth-water-fire dept.
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.
This discussion has been archived. No new comments can be posted.

Multi-Platform App Created Using Single Code Base

Comments Filter:
  • by Anonymous Coward on Sunday April 04, 2010 @02:49PM (#31725960)

    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.

  • by Jurily (900488) <jurily AT gmail DOT com> on Sunday April 04, 2010 @02:57PM (#31726020)

    No, they said it's completely unchanged across platforms. Wanna guess how it looks on Windows?

    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.

    These guys obviously never heard of Unix before.

  • by Manip (656104) on Sunday April 04, 2010 @02:58PM (#31726030)

    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.

  • by ciroknight (601098) on Sunday April 04, 2010 @03:08PM (#31726134)
    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???"
  • Two points (Score:5, Interesting)

    by Blakey Rat (99501) on Sunday April 04, 2010 @03:14PM (#31726180)

    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.)

  • by forkazoo (138186) <.moc.liamg. .ta. .snarcesorw.> on Sunday April 04, 2010 @03:38PM (#31726354) Homepage

    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.

  • by MacDork (560499) on Sunday April 04, 2010 @05:49PM (#31727276) Journal

    Apple would like to see Java die and is doing it's best to kill it

    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?

  • by skids (119237) on Sunday April 04, 2010 @07:07PM (#31727816) Homepage

    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.

  • by DeionXxX (261398) on Monday April 05, 2010 @12:10AM (#31730058)

    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.

Never trust a computer you can't repair yourself.

Working...