Question

I have been discussing a project with a client and they want to use a single language to deploy to as many platforms as possible.

(I am not sure that it's such a good idea, because each platform offers a different user experience and UI metaphor. In some cases, screen sizes vary as well. Also, iPhone is out of the running no matter what language we use. But, I digress...)

The project is going to display an arbitrary block of text each day and will track if the user has "read" it. Some other features on the table are "nags" and the ability to go to another days' text.

I know Flash from the CS3 days, and I think that translates into AIR, but I dont know if AIR can do what we want.

On the other hand, I have (a) little experience with Java or Python, but those seem like good contenders also.

Which language should I use here? Why?

Edit:

This is going to run on desktop platforms too.

Was it helpful?

Solution

ActionScript 3 is the language. It runs on wide variety of platforms. In browser (flash player), on desktop (AIR), on mobile devices in browsers (Android) and also as native applications (Android and iOS both). Forget about flashlite.

OTHER TIPS

These are languages that have a very good deployment factors:

Javascript.

Why? It runs on browser, and most platforms you'd care about have a browser. Though, some lower end mobile phones may have severely stripped browser (or Opera Mini, which supports Javascript only on the proxy-side, and very limited client-side Javascript).

JVM

Java Virtual Machine is ubiquitous in nearly every mobile phone, desktop, or server computer. All other things being equal, perhaps it's the best platform if you want easy portability. Nearly every mobile phone, old and new, supports JVM, the only major exception is iPhone.

Python

Python is very ubiquitous in Linux and Unix world; and the language has a very consistent behavior across different platforms, you almost need no additional work to write a cross-platform program in python. However, most Windows doesn't ship with Python by default, and most mobile phone doesn't support Python. OTOH Jython, compiles Python code to JVM; this combines the consistency and ease of use of Python with the ubiquity of JVM platform.

If you don't need to care about iPhone, then JVM development is the way to go. If you hate Java's language syntax, then Jython is a nicer alternative. If you need the most portability though, Javascript is probably the way to go; however writing anything in Javascript is painful.

C

You can find a version of gcc for any platform you can dream of, from the tiniest microcontroller to the hugest supercomputer, and if you don't find one you can just build a toolchain of your own.

Free Pascal

Free Pascal (aka FPK Pascal) is an Open Source 32 and 64 bit professional Pascal compiler. It is available for different processors:

  • Intel x86
  • Amd64/x86_64
  • PowerPC
  • PowerPC64
  • Sparc
  • ARM

The following operating systems are currently supported:

  • Linux
  • FreeBSD
  • Haiku
  • Mac OS X/Darwin
  • DOS
  • Win32
  • Win64
  • WinCE
  • OS/2
  • Netware (libc and classic)
  • MorphOS

The discontinued 1.0 version also supports the Motorola 680x0.

Lazarus is an open source cross-platform IDE which provides a Delphi-mimic development experience for Pascal and Object Pascal developers. It is developed for and supported by the Free Pascal compiler. Lazarus is available for Microsoft Windows, several Linux distributions, FreeBSD, as well as Mac OS X.

Lazarus

With .NET, Mono, GTK#, MonoTouch and Mono for Android you can reach the large majority of platforms with any .NET language and have a native looking UI on each.

  • .NET will get you
    • ASP.NET for the Web
    • Silverlight for the Web on Windows and Mac (Moonlight from Mono gets you on Linux too!)
    • Silverlight for Windows Phone 7
  • Mono with GTK# will get you
    • Mac OSX
    • Linux
    • Others perhaps, but less native looking. I hear some have gotten on the Wii with Mono . . .
  • MonoTouch for the iPhone, iPad, etc.
  • MonoDroid for the Android
  • BlackBerry .NET - first I heard of it, but they say .NET on the BlackBerry, I am assuming with QT.

Can't think of any other major platforms you are missing there. You? Of course this points out frameworks that you can use to target all these platforms. I'll let you choose the language. C#, Oxygene or VB.NET are the most popular on .NET. Oxygene (included in Delphi Prism) has the added benefit of being partially compatible with Delphi native for native Windows development, but if you want to use IronRuby or F# we won't stop you.

You might want to take a look at http://www.phonegap.com/

The application you're detailing sounds very simple, and personally i'm not a fan of layers that sit above the native platform, however this may be perfect for you.

Edit: it seems like the nature of the question has changed somewhat.

It sounds like this is for mobile platforms correct? In that case you're pretty much out of luck as there's no language to rule them all. There are products that will cross-compile a solution to another (such as http://www.xmlvm.org/android/) but apart from that you'll have to use the native language/environment.

uhm, how about haXe? You can target a lot of platforms by now and should you learn OCaml you're free to write a new backend for whatever you fancy.

I recently read how Netflix deploys to over 400 platforms using HTML5. It is definitely worth a read.

In general, I wouldn't try to commit to one language. At the company I work at we utilize various languages and technologies. It is about using the right language for the right job just like you use the right tool for the job. I wouldn't use a screw driver to hammer a nail just as I wouldn't use a hammer to change my car's lug nuts.

LiveCode / Runtime Revolution

deploys on Mac, Windows and Linux and makes standalone software for all sorts of other platforms as well.

With C# .NET you can deploy to any major mobile platform natively (big difference from HTML 5 platforms like PhoneGap which are basically hybrid web apps) utilizing Mono (for Android), MonoTouch (for Apple), and BlackBerry.NET.

The language and platform is well supported by MicroSoft with many employers looking for that skill set. If your not completely sold, just go to your favorite tech job website and start plugging in different languages/platforms in the search box. You will get an idea of which direction you want to take.

Adobe Flash/Flex

(not sure if that was being ruled out in your question)

Runs in nearly all browsers, most mobile platforms and with AIR, most desktop platforms.

Read: http://business2press.com/2010/09/11/adobe-reversi-allows-developers-to-make-single-app-for-different-platforms/

Watch: http://www.youtube.com/watch?v=22vicDlzmkI&feature=player_embedded

Licensed under: CC-BY-SA with attribution
scroll top