Dec 2 2013 · Application Design
Goodbye Adobe Air
Despite positive first impressions with Adobe Air, I began avoiding it a while ago for a few reason:
- Air’s focus was very much geared towards Flash development, not HTML/CSS/JS, and I had no interest in Flash development
- A lot of interesting web technologies never manifested within Air (SVG, WebGL) and it looked doubtful that Adobe cared to add anything that might challenge Flash
- Linux support was dropped – a platform dropping OS support is not a good sign
- Native interaction support, a feature in Air 2 which I was excited about, didn’t impress me in its implementation and it was very much geared towards Flash/ActionScript development
- Adobe’s push for Air became more a platform for mobile development rather than desktop development, to the extent that desktop development was pushed far into the background
With all of the negatives above, coupled with the propriety, vendor lock-in, nature of Air, I really didn’t feel like using it for development of anything.
XULRunner / XPCOM
I was still optimistic and interested in web technologies (HTML/CSS/JS) for layout and styling in desktop applications. As I stated previous:
Looking into cross-platform GUI frameworks, I’ve played around with WinForms (cross platform with Mono), Qt, Gtk, and wxWidgets. I’ve been disappointed to various degrees with all of them. It hit me that the most flexible and powerful cross-platform layout and styling framework out there is the HTML/CSS combo. It’s not perfect (e.g. floats, vertical centering) but it’s pretty damn good.
The Socket Bridge
An HTTP server could take the place of the SocketBridge server, but I felt that was overkill, less flexible, and added an additional layer of complexity as the server then needed to be connected to the application code.
As a proof-of-concept, I began working on Trilite, a simple HTTP profiling tool, with the application logic done in C#, that would send a number of HTTP requests to a server, capture the time it took to get a response, and calculate some simple stats about the results. A pretty simple application but something pretty handy for optimization work.
I’m pretty happy with the results thus far, particularly with regards to having a consistent, stable, and cross-platform UI.
You can find the current code in the Trilite repository.
There is no bootstrap to launch the Socket Bridge server and XULRunner app, they need to be executed manually for the application to launch:
- Launch the server by running /trilite.public/app-server/trilite/trilite/bin/Debug/trilite.exe
- Launch XULRunner, in /trilite.public/xulrunner, with the application.ini file in the root directory. For Windows, you can also run the trilite shortcut in the root directory.
A few screenshots under Windows:
And here’s Trilite running under Ubuntu:
This post should, hopefully, provide a top-level overview of the application architecture. I’ll be writing more about XUL, XPCOM, the Socket Bridge, and Trilite in subsequent posts, providing more details and code.