Retrospection: Cross-Platform Mobile Development at EclipseCon

Yesterday, Peter and I talked about “Cross-Platform Mobile Development with Eclipse” at EclipseCon in Santa Clara. After some conceptual slides telling about the difficulties one face when targeting different platforms (in our case iPhone, Android, Windows Phone 7 and minimalistic, mobile web), we went over to some live-hacking.

Slides of our Talk

You can find the few slides we presented before and after the live-coding on Slideshare

First, we presented a domain-specific language for data-driven mobile applications. Our goal was to build an application similar to the official EclipseCon conference apps during the show. The application listed every speaker with a picture, bio and a list of talks. Also, a schedule for every day could be browsed where details of both speakers and sessions were revealed once you clicked on an item of the list.

As you might know, there are quite a few options to produce cross-platform native (and look-alikes) mobile applications from a single source. As itemis is specializing in model-driven approaches, we picked a domain-specific language to describe the application together with a code generator that produces the appropriate source code of the different platforms.

Screencast of an earlier version of the DSL and generator

For the iPhone, we started by adding a “News”-Tab listing recent blog posts written by employees of itemis. The code generator produced Objective-C code as expected and we had the first native application right on the screen.

On Android, we enhanced the application a bit further. Based on the names of the blog authors we built a mash-up and integrated each blog entry with the related speaker’s profile of the existing conference app. The generator produced the needed Java code and we happily deployed it on the “gorgeous” (as Peter said) Android Emulator.

Yet another set of generator templates produced a Python/Django web application we pushed to the cloud as we went on. It was running on the Google App Engine and represented what I am recommending to most of today’s mobile endeavors: “Have at least a minimalistic mobile web site that runs on any phone”. One of the attendees brought a BlackBerry Bold on stage to proof everything worked out fine – thanks for that!

Windows Phone 7

Different result from the same input: Windows Phone 7 displays a Pivot Control instead of a tab bar

Now, the tricky part began. One of our iPhones served as an external camera and “Lazy Peter” used GitHub to push some generated C#-code from his MacBook to an instance of Visual Studio running inside of a VMWare virtual machine (the reason being that accessing code on a networked drive is being considered harmful by Visual Studio). From there, Peter deployed this automatically produced app to a phone running Windows Phone 7.

For the grand finale, we put all of our phones (iPhone, Android, Windows Phone 7) plus two of the attendees’ BlackBerry devices running the mobile web app on a table and put this lineup on the two big screns with our iPhone camera to show how we used one single model to generate native apps for the various platforms while taking advantage of their respective UI paradigms (such as Pivot Controls on WP7).

For Peter and me, it was great fun to see what one can accomplish within half an hour of live-hacking on stage. Unfortunately, we couldn’t talk to everyone who came to the front after the show but we’d love to answer every question you’ve got. At EclipseCon, you can find us at the Xtext booth on the first floor, or at the bar later at night. Also, please feel free to follow us on Twitter (@HBehrens and @peterfriese) or drop us a mail.

We will both attend the Xtext tutorial tomorrow morning

and start polishing what we presented. Later, we will publish it on GitHub. I will provide a link here, as soon as we are done. Please, stay tuned.

Links

Support my Work

Writing an article like the one you have just read takes me quite an amount of my personal time. Way too often, I invest this time in different interests and decide against another blog post. On the other hand, you can motivate me with your feedback, your thoughts and your ideas. Please leave a comment below or flattr this post if you think it's worth it.

Comments

  1. [...] So, if you are interested in cross-platform mobile development, make sure to visit those. Also, my colleague Peter Friese will be on-site throughout the whole conference and would be happy to answer any of your questions about MDSD for mobile devices. [...]

  2. Thanks for this nice blog there is lots of stuff in it to read, it gives great knowledge about the official EclipseCon conference apps, really great:)

  3. Very interesting material. I am a computer science student and currently doing my internship at a company that develops a cross-platorm solution (falling in the ‘Interpreted Apps’ category). I am exploring the possibilities of a DSL for User Interface declaration. I will most certainly have a look at Applause and xtext. Is the version that can be found on Google Code (http://code.google.com/p/applause/) the same as the one you used in your presentation? Thanks.

  4. Hey Thomas, you will find the latest version on GitHub. I updated the google code page accordingly.

  5. Achille says:

    Hi Heiko, I was at your presentation at EclipseCon, I was very impressed by applause, now I’d like to try it but I have a question. Who make the connection? I mean In the example there are a static xml that’s is presented by UI, but what if I want to retrieve data from a server like EclipseCon app?

    is it possible with applause or I have to write code for this for all platform?

    thanks in advance

  6. Hey Achille,

    from the client’s perspective (here: the mobile) it doesn’t matter of the data it receives at a given URL changes over time. Since you can pass parameters to a content provider to construct a URL you can attach to dynamic URLs, too. Have a look at the branch https://github.com/applause/applause/tree/migrationToLiveData to see an WIP application attached to a backend provided by itemis.

    Hope that helps,
    Heiko

  7. Achille says:

    Thank you very much Heiko,
    now I understand more…and I got my answer…I’ve seen that you fetch xml from an url then you have utilities class in the generated projects for every OS, so connection is deegated to these classes.

    Very, very interesting…now I’m trying to build a little app based on your sample!!!

  8. Feel free to file an issue on GitHub if you ancounter any problem.

Leave a Reply