views:

751

answers:

5

Is it possible to create a complete client side application using HTML 5 (it will embed chat clients, stock ticker) + JavaScript, and then bundle is with underlining Firefox 3.5 engine, so that user can install it as a desktop app on Linux, and then it runs in its own window using firefox 3.5 engine. The app will store everything in local storage - like url, usernames etc, and will not interact with any local server.

It would pure HTML5 + JavaScript based client web app which would be packaged, and can be installed or launched from startup scripts.

Or instead of using firefox 3.5 engine, we can use Mozilla Prism to convert it to web app, and then bundle it.

A: 

It sounds like what you're trying to do can be done with Adobe AIR (though there is no HTML5 support yet). Adobe AIR apps can be written with just HTML and JavaScript, though AIR uses the WebKit engine, not FireFox's.

jimyi
A: 

The app part is surely doable (and will work just about everywhere, not just Linux), the bundling appears to be the more problematic part -- not every distro of Linux will like the specific way you built the bundled Firefox, not to mention that you're cutting yourself off from just about any non-Linux box on the planet (and every linux box with a non-x86 compatible processor, etc, etc)... all for the sake of that bundling. Can't you stop at the prism aka webrunner part, without bundling?

Alex Martelli
its for specific version of Linux. Do you want to say, we just create a prism app and bundle it, whoever wants to run it - she/he has to have Firefox 3.5 and prism installed?
A: 

I'm almost sure I've seen something like this done with Qt Webkit. It was only a few lines of C++ to create the window with the web browser control and load a local page. The page created the UI of the application. I can't find the link though.

+2  A: 

Well, you should take a look at xulrunner (https://developer.mozilla.org/En/XULRunner). This is an engine to build portable applications... like firefox. You are getting full Gecko engine + full access to the environment, like a plain application. (XUL is something similar to HTML -- it is still XML-based UI description -- but it is better suited to develop desktop applications -- using native/almost native UI).

liori
Would like to take advantage of html5 offline capability + real time integration with web sockets, also want to use localstorage database to store user selected layout/colors/perfereneces etc.
I'd summarize it this way: firefox is a XULRunner application (highly customized, but you can do that too). You can do everything firefox can do. And XULRunner provides you with full Gecko/Javascript engine. So yes, you can do offline storage. I don't know how the "web sockets" work, but if you can do that on a plain website, it surely can be done using XULRunner.
liori
A: 

I second what liori said about using XULRunner. You can deploy your HTML application easily, and, more importantly, when you run into limitations of HTML 5 or its level of support in Gecko, you can work around it by using XUL APIs.

(AFAIK, Firefox 3.5 doesn't support any socket APIs in HTML content, and it doesn't support offline storage in web apps, only the localStorage part).

Nickolay
i am just trying to make it work with firefox 3.5 as first step, but my app uses google ajax api, can we make google api (javascripts) in offline mode using manifest. Also we run via: file:///C:/Projects/ui/html/index.htm, it does not save anything, does it check that it should start from http://
You should have said that! Yes, file:// documents can't access http:// (since they can access some other file:// URL). You have a number of options for fixing this, but it's a different question, which should be asked separately.
Nickolay