Version 0.4.2 of mobl has been released. Mobl is a language for rapid development of mobile web applications using HTML5 technologies. Programs written in the mobl language are compiled to a combination of HTML, Javascript and CSS and can run on any webkit browser, specifically those on iOS and Android devices.

New in this version since 0.4.1:

  • Various bug fixes
  • Support for non-Latin characters in string literals and comments. So you can now use Chinese or Japanese in string literals, e.g. "汉语". Finally!
  • Some support for the browser’s back button. This is extremely naive at this point and will likely improve in the future. User complained that if they accidentally pressed the browser’s back button, they would leave the application. With a clever hack, using the back button (but in fact, in many cases the “forward” button as well) now actually calls screen return on your current screen.
  • Improved code completion for functions and controls. The old code completion would automatically include all optional arguments as well, which was messy. Now you have two options, a version with only required arguments and one with all arguments. Activated through Ctrl+space, as always.
  • Static function support for entities and types. Mobl already supported entity and type instance functions, now it also supports static function, i.e. functions called on the type itself. For instance:

    entity Task {
      name : String
      done : Bool
      // Instance method/function
      function toString() : String {
        return this.name;
      }
      // Static method/function
      static function create() : Task {
        return Task(name="Unnamed", done=false);
      }
    }
    // use:
    var newTask = Task.create()
    label(newTask.toString())
    
  • New httpRequest function in mobl that performs a HTTP request, very similar to services, but with less syntactic overhead, but less declarative too. Considering the option to deprecate service definitions in favor of regular types with static functions that perform httpRequests. The advantage would be that it would be one less language construct to learn (= simpler language). Any opinions on this?

Full list of changes

Note: After upgrading, rebuild your project (Transform > Rebuild project).

To install, follow these instructions. To upgrade, simply upgrade from the update site (Via Help > Install new software). To use the mobl compiler from the command line follow these instructions. Problems? Ask for support and report bugs on our bug tracker.