views:

341

answers:

9

The goal is to build tools and applications that have both web-based and standalone versions for multiple OS's (*nix, Mac, Win, etc.).

I've got a general idea of how to architect software that is flexible enough to accomplish this, but ...

Is there a language or framework that's designed for or uniquely suited to this task?

EDIT:

Thanks all for your answers, but I wasn't specific enough in my question.

To make things a bit more complicated (and more useful for my purposes),

  • The OS-specific distributions need to have minimal dependencies, and
  • the standalone versions are truly "offline".

"This application requires X library to run" is unacceptable, because non-technical people need to be able to download and run without much trouble. Java is out, unless a full JVM with libraries can be packaged-in and distributed for a few extra megabytes for most platforms (is that possible?).

I do not know how robust Python's py2exe and py2app are, but I was headed in that general direction.

+1  A: 

As far as a language, Java sounds well-suited to fulfill the standalone and web-based requirement. A framework within Java would depend on what the tools would do.

Tom Ritter
A: 

Java or Python should be good options.

Chochos
A: 

You need a middleware software platform.

Java is designed for exactly that. So is flash, javascript, and most other web-browser based technologies. The browser is the platform in that instance. Google Gears is an example of using offline/online abstraction for browser based software.

Mozilla platform / xul runner allow you to write more fully featured applications that function in multiple host environments.

davenpcj
A: 

I develop web applications on and offline in Java. Using Sun's NetBeans IDE, Glassfish application server, and Derby database server, I can work on my laptop anywhere any time.

The final deployment for my application is not in the same set of technologies. I stick to the Java EE 5 spec and the application should deploy on a variety of application servers and database servers (Oracle and MS SQL being the two big targets)

Hugh Buchanan
A: 

Java truly wins in the realm of platform agnostic software; It's mature, has great libraries, and can run on pretty much any platform.

Java sound like it would fit the bill, having both a powerful web framework, and has many great frameworks for standalone applications (Swing, SWT, Eclipse RCP).

I would recommend taking a look into SWT for the desktop portion.

Also, you may want to look into a Flex / Air combination...I have yet to work in Air, but flex has some really great tools...

mmattax
A: 

You could among other things:

  • make cross-platform programs using java that can function both as standalone applications and as java applets.

  • make all your application logic as web services and then use those services to power gui clients and web sites using whatever technology is suitable/available for these different parts.

Toni Ruža
A: 

You might want to check out Haxe. It's a modern object oriented language which has similar syntax to ActionScript, Java et al but with more consistency and some more powerful language constructs.

The compiler has backends that compile Haxe to JavaScript, PHP or Neko (Neko is a low level language for the NekoVM - a modern portable virtual machine). So you could share code between your client side webapp (compiled to JavaScript), you webapp backend (compiled to PHP or to Neko) and make a standalone desktop app by compiling to an executable.

The language and associated runtime libraries were specifically designed with this usecase in mind. You can compile Haxe code to an executable with minimal dependencies.

Simon Collins
A: 

Java is GPL now, so there should be an appropriate embeddable version for almost any platform.

Tim Howland
+4  A: 

You might want to check out Tcl/Tk. It has a deployment mechanism second to none. Using built-in virtual filesystem capabilities you can either a) create a single file platform-specific executable that contains the application, any support files (images, dynamic libraries, etc) and runtime environment), or b) create a single file platform-specific runtime and a platform-neutral application file.

A complete application, runtime, images and application files wrapped into a single executable can easily be less than 3 megabytes. For novice users, installation is nothing more than "copy this file wherever you want", and uninstallation means "just delete that one file".

Tcl is truly a modern, actively maintained, dynamic language with a robust GUI language used by many other dynamic languages, with native widget support in Windows and the Mac. It has full, virtually transparent unicode support (for far longer than most (all?) other dynamic languages), integrates very nicely with sqlite for client-side, portable data storage and so on. And because it is available under a BSD license it's truly free.

The words to google for more information are tclkit (platform specific single-file runtime), starkit (portable virtual file system in a single file), and starpack (combination of the two into a single file). ActiveState does a nice job packaging up a standard distribution of Tcl and many extensions if you're not into building your own from source.

Bryan Oakley