2012-07-13

JavaScript As Cross Platform GUI

I’ve been thinking about GUI toolkits the past couple of days. It’s been annoying to realize that the even with the 3 major cross-platform toolkits (Qt, Wx and Tk) you can really only target the major desktop OSes (Windows, OS X, Linux). There’s no way to apply that learning to any of the mobile space.

To my mind JavaScript/HTML/CSS is really the only technology where what you learn in one environment would really transfer to all of the other environments readily.

However, that leads to the question of how you actually do desktop apps in JavaScript/HTML/CSS. Currently I’m thinking that you start a lightweight web server and the use that as the application engine.

If you are interested in being able to deploy the app then it’s important that the webserver be self contained. It also needs to be written in a language that has the libraries / capabilities to interact with whatever host systems you need to connect to (filesystem, database, etc).

The architecture that makes the most sense to me currently is to write a webserver where urls are mapped to functions rather than files, so that each function you need the interface to support is simply a separate url for an http call.

Then the HTML page in the browser just makes an http call for each user action that requires activity from the engine.

Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s