Framework for (HTML + JS) Desktop Client
Asked Answered
F

3

8

I plan to write a Desktop Client for Windows and Mac. It will be powered by web techniques (HTML + JS). Therefore it shall run on a WebKit engine on the user's desktop.

Recently, I saw an interesting approach for this issue: Appcelerator I love its basic concept, but I don't want be dependent on their services. Instead I want to have full control on the WebKit program, which loads my app.

Are there any decent open source WebKit frameworks for building desktop apps? Desktop integration features, such as Growl-support and stuff are appreciated.

Regards,

Stefan


Update: I'm not searching for Adobe Air ;-)

Fortification answered 9/8, 2009 at 22:33 Comment(0)
K
11

Besides Appcelerator, I'm aware of two desktop gui frameworks that have a browser component that wraps webkit: GTK+ and Qt. You can make the browser component fill your application's window and write most (or all) of the application in HTML+CSS. If you like the Python language or it's very significant standard library, you can use the python bindings pyQt or pyGTK.

A more "beefy" alternative to Prism, if you're willing to go with the Gecko engine, is XULRunner (https://developer.mozilla.org/En/XULRunner). While Prism is a set of lightweight bindings to the desktop for a web app, XULRunner allows you to build a complete app like Firefox itself or Thunderbird, etc. While many XULRunner applications are written with XUL, it is easy to write the whole app using HTML/CSS inside a single XUL WebBrowser component - and your javascript still has all the power of a native desktop application.

I have written a couple desktop applications using XULRunner. Almost all of the applications' code is HTML/CSS/Javascript, but I have included the Python framework (via pyXPCOM and pyXPCOMext) and have written a thin layer that exposes some Python functionality to the Javascript. The Mozilla components that come with XULRunner gives you a decent amount of functionality for free, but if you find yourself in need of more functionality or a full-featured programming library, Python will do the trick. There are also bindings to Java. Or, if you want to use C or C++ libraries, you can build XULRunner from scratch.

Update: A few things have changed since I originally wrote the above in 2009. For one, the Prism project was dropped from Mozilla Labs and subsequently discontinued altogether in late 2011 (http://www.salsitasoft.com/2011/09/08/discontinuing-webrunner/). One alternative worth looking at is https://github.com/rogerwang/node-webkit.

Dec 2014 Update: Another recent option is GitHub's Atom Shell. It uses Chromium's "content" module, just like node-webkit and Chromium Embedded Framework (and publishes it as a standalone lib: https://github.com/brightray/libchromiumcontent). One major difference from node-webkit is that instead of merging node's event loop with Chromium's event loop, Atom launches them both in separate processes and uses a mixture of sync and async inter-process messages to communicate between them.

If you're interested in embedding Chromium in a C++ or .Net app, there's also Awesomium.

Kerguelen answered 22/10, 2009 at 17:13 Comment(1)
Wow good call on XULRunner. It might be worth pointing out that since Firefox 3, XULRunner comes with Firefox! Just make a script that uses the Firefox executable to launch your XUL app: path/to/firefox -app path/to/application.ini.Marine
S
3

The Appcelerator platform is open source, so you're not dependent on the company - you could always hack the code around yourself if you wanted. If you want more control you could always just hook directly into WebKit. The Gecko equivalent to AIR/Appcelerator Joel refers to is probably Mozilla Prism.

Socket answered 10/8, 2009 at 0:23 Comment(0)
F
1

If you're not absolutely committed to webkit, I recall something about a project to allow you do something similar with the Firefox engine. Basically a minimalist window around the gecko renderer plus Gears and desktop shortcut for your app. Can't find a link at the moment, though.

Fdic answered 10/8, 2009 at 0:9 Comment(1)
Are you writing about prism.mozilla.com ? I tested it some months ago, but it feels too much like a browser to me. Hm, maybe I should build something custom.Fortification

© 2022 - 2024 — McMap. All rights reserved.