Multi-Platform App Created Using Single Code Base
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.
combined with 350 million lines of #ifdef _LINUX_ or #ifdef _MACOS_ or #ifdef _UNICOS_.
Guy creates functionality I've been using in Java for 8 years; film at 11.
It must have been something you assimilated. . . .
holding different platform specific implementations: http://blogs.adobe.com/cantrell/images/ireverse/FB_projects.jpg
That's doesn't seem all that impressive...
It's not "one codebase for 5 environments", it's "one codebase for the AIR app, and multiple codebases for AIR itself that had to be ported to 5 different environments." There's nothing even remotely special about that, just empty hype.
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.
Wonder how long it will take Apple to sue because he dared use i as the first letter of his program name...
Seven Days with Ubuntu Unity
The current Java runtime makes Flash/AIR/.NET/Whatever look like a retarded snail trying to climb a salt hill. It's much faster than the competition, it even competes with statically compiled native code in terms of execution times. You rarely even use Java's interepter, the runtime compiles bytecode on the fly to native code and executes that.
Swing has traditionally sucked, which is why SWT was created.
Now tools for things like this are where Flash beats Java. Java really only has tools for programmers, not psuedo-programmer artist types who typically create cool things in Flash. Sun seems to have never gotten this aspect.
Mod me down, my New Earth Global Warmingist friends!
When the industry as a whole moved from C and C++ to Java in the late 1990s, one of our main problems was the bloat that Java brought to the table. Memory consumption was a real issue, as was its slow nature. Things have improved somewhat, mainly driven by vast hardware advances. 15 years on, Java is finally usable.
Now, when we moved from C and C++ to Java, we did get a huge productivity boost, even if our apps themselves were more bloated and ran slower. Apps that would've taken us a year to develop using C++ could be finished in a couple of months using Java. We could also develop much more complex software than we could using C++. So Java did offer some real benefits, and that's why it became popular.
We can't say the same for Flash and HTML5, however. They both suffer from far worse bloat than Java ever did. For instance, take watching videos on YouTube. I just did that using Firefox on Linux, and the Firefox process is now using 3966 MB of RAM. That's its resident usage, not virtual usage, as well. Its virtual usage is currently 4512 MB.
HTML5 isn't much better than Flash. I've tried some demos that cause similar memory usage problems, even in Chrome. And they run so fucking slowly, too.
So not only do Flash and HTML5 it offer a worse runtime experience for the user, but they're much more limited than Java, and much slower to develop with. They're failures all around. Unfortunately, a lot of former PHP developers from the 1990s and early 2000s (ie. idiots) have now become managers, and somehow think that web-based technologies are beneficial for users and developers. Clearly, they're not. They make everyone's lives more miserable.
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.)
Comment of the year
There's no other platform in the world that can boast this level of flexibility -- not even close
Qt will let you run a single code base on OS/X, Windows 7/etc, Linux and any platform that Qt/Embedded has been ported to. Not just trivial apps like Reversi, but also ones using multithreading, networking, etc. There's also a fair degree of cross-platform multimedia support too, although that's a work in progress. Personally I choose to use PortAudio for cross-platform audio aupport together with Qt.
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.
Off topic, but I couldn't help but read your sig. Apparently you and/or the person that wrote that list never spent more than 2 minutes in .NET because the majority of the reasons given are just plain false, and another large portion are poorly hidden marketing gimmicks.
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.
It's worth pointing out somewhere that the iReversi program in the article doesn't actually seem to touch the GUI at all. I see no menus, search boxes, scrollbars, etc, just whatever window decoration the OS has to offer. The game itself is only graphics, which you point out can make things a lot easier. Basically, this game seems at least on par with the least impressive demonstration of cross-platform code I can imagine. It might as well just be "Hello, World!". How about an office suite like OO.o, an image editor like GIMP, a chat client like Pidgin, or anything that requires actual use of a GUI that so complicates the cross-platform approach?
Don't show me something simple and tell me it's a demonstration of overcoming a complex and longstanding issue. I can write a web page that renders the same in Firefox 3.6 as it does in IE 5, but that doesn't mean I've created anything special; I just wrote something basic enough that avoids the big issues.
But not in its current form.
Sun never made native executables or a way to point and click on a java file and have it run without having to type java x. As a result desktop apps tended to ignore java. Sun gave away the JDK but had no tools for animation like Adobe. As a result JavaFX was too little too late. Netbeans is nice but I need to drag and drop to create animations and visual effects ... not type lines of code in with an ide.
Flash loads instantaneously while java applets have to launch a whole java runtime environment which annoys users loads.
I was thinking of creating some out of spare time but I do not have the mathmatical skills of learning graphical algorithms.
Sun has an addon for Adobe flash to create javafx applets but if yo uhave adobe flash then why bother making a javafx applet? Ugh
Since Java is now open sourced as Iced Tea I hope this will change. Java now has a very very bad rap as a 21st century Cobol for server apps and all verbose, dull, and boring with memorizing many layers.of.different,javax,apis.
So we need a free opensource animation tool and support for point and click java applications. After this Java may or may not take off. I really dispise Adobe. They are a threat to anyone who wants to do web development. Without adobe you can not get a job as a web developer anymore as its the defacto standard. Even html 5 is being undermined by it and silverlight.
http://saveie6.com/
Best. Comment. Ever. :)
Fixed that for you.
Really? Reason #4 is enterpise adoption rate. That's changed as .NET is growing.
#6 is an opinion with no factual basis backing it up. Having done both Java and .NET web development, I strongly disagree with it. But still, it was nothing more then an unproven assertion.
.NET
.NET development work in government Federal and State and local.
.NET land. Your claim that Java's are better is, shockingly, an unproven assertion.
#7 is false.
#8 is another unproven assertion.
#11 is another unproven assertion.
#14 is false.
#16 is complete garbage. Collections and true generics are superior in
#17 is unproven assertion.
#20 neglects
#21 unproven assertion.
#22 is crap. O/R mappers are huge in
#23 is an unproven assertion. And you're going against one of the best IDE's ever that many love in this one.
OK, I got bored and stopped. And most of the other ones on the list I think are crap to. You're talking about programming languages, why even tout such a superficial list that amounts of nothing but sticking out your tongue and going "na-na na-na"?
"There's no other platform in the world that can boast this level of flexibility — not even close" Harrumph. LabVIEW.
I think LINQ is a biggest game changer out there right now. It's the biggest thing I've seen in a while. Querying your own object collection is extremely powerful.
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.