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.

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.
If this question can be reworded to fit the rules in the help center, please edit the question.

Just the other day, I was looking through a bunch of trade rags in a colleague's office and noticed an article called One Language to Bind Them All from the March 1, 2006 edition of SD Times. The first page of the article (PDF, reg. required, p. 27) has a big gold ring on it that says C#. I guess this question will be brought up for as long as code exists.
–
Ben McCormackOct 5 '10 at 17:08

12 Answers
12

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.

Of course. You just need to use the flex framework which makes life more easier. That's all.
–
kadajOct 7 '10 at 3:32

Jase21 - can you provide some references for using flex and flash in tandem to work on database stuff? Also, will the db stuff work on iOS?
–
MosheOct 10 '10 at 20:40

Adobe is planning to release a server-side version of actionscipt. With that you can program both the client-side and server-side using actionscript. You can cross compile programs written in actionscript to native iOS application. If you are too hesitant to use actionscript then you can use open-web technology like javascript on (on client side as well as on the server side using node.js).
–
kadajOct 14 '10 at 3:52

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.

What's the UI framework that would make Python have "very consistent behavior across platforms?"
–
YarOct 26 '10 at 20:02

@Yar: Tkinter (from the standard library) is very consistent across many platforms (and with Ttk (Themed Tk), it is no longer the ugly toolkit it used to be two hundred years ago). All other third party UI toolkits are also reasonably consistent: PyGTK, PyQt, WxPython, many more can be found in wiki.python.org/moin/GuiProgramming
–
Lie RyanOct 27 '10 at 9:16

Thanks @Lie Ryan: any examples of apps done with any of these? If you said, "show me an example of an SWT app," I'd say Eclipse. Mono and I'd say MonoDev... etc.
–
YarOct 27 '10 at 14:09

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.

Didn't know about MonoDroid or BlackBerry .NET. Red Five Labs used to make a .NET runtime for Symbian called Net60, but they went out of business. Also, don't forget the .NET Compact Framework for Windows Mobile devices, the .NET Micro Framework for embedded devices, and XNA for Windows Phone 7, Xbox 360 and Zune. EDIT: Silverlight appears to be supported on Symbian S60v5 too.
–
Allon GuralnekOct 7 '10 at 13:01

Ordinarily I would question the use of Mono, due to the fact that its not complete, but this project seems simple enough to put onto any of those platforms.
–
Morgan HerlockerApr 28 '11 at 15:55

@Prof Plum: Mono is surprisingly complete and in wide spread use. It may not be 100% compatible with the latest .NET, but if you test against the compiler then you will know it works - only use the features that are supported in Mono, which is enough to get were you want to go.
–
Jim McKeethApr 28 '11 at 19:06

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.

@Xepoch Completely missed your question, sorry about that. There are a few reasons tbh, and i'm sure not everyone will agree: When a vendor like Apple or Google push out large updates and new frameworks you're in a position to take advantage instantly. It's fair to say that the native platform is the most common; it makes fixing bugs easier, asking questions and onboarding new devs to a project. In my experience layers typically compromise the look, feel and experience in some way. Also, no guarantees that the company producing said API/layer will do so in future - and so on.
–
dannywartnabyOct 7 '10 at 12:31

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.

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.

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.