IwkMail, mixing WebKit Gtk+, Camel and JQuery Mobile
In the last few weeks, as part of my work here at Igalia, I’ve been playing a bit with the concept of hybrid applications. In this case, I’ve created a basic prototype of a mail application, with its user interface completely written using JQuery Mobile, and with backend code in C and GObject. The result is iwkmail.
Though it’s a simple experiment, I’ve added some mail basic functionality, so I could try to catch as much as possible of real requirements for how we could improve the developers WebKit+GNOME experience creating hybrid applications.
My first conclusion is that it’s surprisingly easy and fast to develop such applications. Second, I could reuse tons of source code and modules from my old projects. This approach surely provides a way to create cool GNOME applications, using the most fashionable web client technologies.
So, you’ll get:
- Browsing messages
- Read/unread flags
- Deleting messages
- Creating and deleting mail accounts.
- Storage protocols supported: IMAP and POP.
- For sending mails, we support SMTP. There’s support for an outbox holding the messages to be sent.
- A plain text composer, allowing to add attachments.
The UI is completely written in Javascript + HTML, using JQuery Mobile.
The backend side is done using Camel library inside Evolution Data Server, so we rely on a library well tested for more than 10 years. All the code related to this is implemented in C+GObject, and I reused a good set of code from Modest, the default mail client for Nokia N810 and N900. I’ve got involved on its development for 3 years, so that’s a bunch of code I know well enough.
For communication, I use the AJAX-like JSONP protocol, and custom SoupRequest URI scheme handlers. Basically I expose some methods as iwk:addAcccount, iwk:getMessage, etc, and arguments are passed as usual in a web request. The result I obtain from this calls is a JSON object with the results of the call. Simple, and works very well.
I’ve pushed the work on github: https://github.com/jdapena/iwkmail. Feel free to try it!
Oh, I guess it’s very obvious that I did not spend too much time thinking on the project name… So, anyone proposing something that matches the IM acronym (I don’t want to rewrite the class names!) would deserve a beer.
Last, lots of thanks to Igalia for giving me the opportunity to do this experiment. As usual, fun stuff to work with.