Tag Archives: mobl

Mobl: a new language for mobile applications, with Eclipse integration

It has gradually dawned on me that, contrary to first appearances, the Apple iPhone and iPad do come with a capable application runtime for those who would rather not tangle with Objective C; and one on which you can run applications without the hassle of negotiating the App Store. This runtime is the WebKit-based browser and JavaScript engine. This is for web apps of course; but as noted in my look at NS App Studio last week, you can blur the boundaries between web and local by creating a local shortcut and designing your app to work offline. Here is the Apple documentation, which notes:

Offline application support is available in iOS 2.1 and later and in Safari 4.0 and later

So you can do offline. There is also a local database, based on SQLite, documented by Apple here – putting iOS ahead of Windows Phone 7, which has no built-in relational database for Silverlight applications. Another plus is that other WebKit-based mobile browsers should work as well, including the one in Android devices.

It is possible to create application frameworks that wrap these features into a single development platform that compiles to JavaScript, HTML and CSS. PhoneGap is one example, and NS App Studio another; but today Reddit alerted me to another, Mobl, which has a modern feel and benefits from Eclipse integration. It is also free and open source, and with the right community momentum looks like it could be interesting.

Mobl is a statically-typed language with a syntax similar to Javascript – there is a guide and language reference here. The goal is to create a complete DSL (Domain Specific Language) for mobile development, which according to the web site:

Integrates all aspects of a mobile web application into a single language: data modeling, user interfaces, application logic, styling and web services.

The main author is Zef Hemel, from the Delft University of Technology in the Netherlands. Mobl makes use of Stratego/XT, which is a language and toolset for program transformation, and SDF  (Modular Syntax Definition Formalism), a language for defining syntax.

Mobl includes data modelling which handles object persistence and a concise language for defining user interfaces. AJAX support is built-in and there is integrated support for RESTful web services and for JSON (JavaScript Object Notation). The Eclipse add-in includes syntax highlighting, inline error reporting, code completion, and reference resolving.

All rather impressive for a project that has just burst onto the scene. I installed the Eclipse add-on and enjoyed its simple license:

image

“This software is distributed in the hope that it will be useful.” – though I have not found time yet to try creating an application.

There is more information on the nicely-designed website and blog and in the Google Group.

Update: thanks to @FransBouma for the link to the Mobl guide.