About Jasonette

Jasonette is a development system that lets you create small to medium-sized native mobile applications for both iOS and Android simultaneously. You write a description file of the app using a simple notation language called JSON and point to it from your runtime.

Pros and Cons of Jasonette apps

If you're trying to decide whether or not you'd like to build your app using Jasonette, the Jasonette home page does a great job selling it. Here are a few more points to consider.

Jasonette Pros

  • Update code on the fly without having to update on the app store! Jasonette can load your app from the Web (or keep a local copy for offline purposes) so you can do bug fixes without having to go through app store approval.
  • Jasonette is free to use commercially You get the whole development system for free, all source code included. There are no license fees of any kind and it's all redistributable freely, but you don't have to release your source code thanks to their permissive MIT license
  • Incredibly fast turnaround time There's no compilation or build step. Just write your JSON file and it's done.
  • No additional hosting charges You will have host your Jasonette source code somewhere just as you would any other website, but the Jasonette people don't impose any rental charges of any kind. Many iOS development platforms look free until you find out you have to host where the developer tells you--for a price
  • Same source for iOS and Android The runtime has an identical API on both mobile platforms, so your source for both lives in a single file (unless you need to write extensions)
  • Mass produce apps! Because of the nonexistent build system (an app is a single JSON file), you can easily build simple variations fast. For example, making compelling and beautiful brochure sites for local businesses could automated completely

Jasonette Cons

  • Jasonette is declarative, more like Lisp or CSS than Python or Java Jasonette's most interesting feature-that apps are written completely in JSON-is sometimes its Achilles heel. Expressing braching program logic in JSON feels more like Lisp than imperative languages like Python, C, or Java.
  • No desktop solution yet Jasonette is currently limited to iOS and Android apps, although a desktop version is in the works
  • Not a good fit for complex apps Jasonette is not a programming language in the traditional sense. It is Turing-complete and could conceivably be used for big applications, but JSON limitations make development cumbersome and hard to read
  • Limited debugging. There is no traditional debugger, though there are a few logging options

Writing Jasonette apps

Here's how you write Jasonette apps:

  • You download a relatively small app called Jason that serves as a runtime (currently under 20MB) to your phone
  • Write the source code and save as a JSON file.
  • Store that description either locally on your device, or on a web server somewhere (like the free Jasonbase site
  • Point to the description file from the Jason runtime. The runtime finds that file on launch and builds the app on the fly.

Deploying a Jasonette app

To deploy your app to the Apple or Android stores, you'll need to adapt the source code for the Jason app slightly by pointing it to the web location of your JSON source, or embed it directly into the app, or use a combination of these methods.

hello, world: A simple Jasonette program

  • Create an account on Jasonbase

  • TODO: Document how to download zip file, unzip, load into Xcode

The simplest app

A Jasonette file consists of at least the root "$jason" node and two children nodes: "head", with a required "title" attribute, and "body".

  • Create this file on Jasonbase:
 "$jason": {
    "head": {
      "title": "hello",
      "actions": {
        "$foreground": {
          "type": "$reload"
        }
      }
    },
    "body": {
      "header": {
        "title": "hello, world."
      }
    }
  }
}

Load it into the settings.plist

Click settings.plist

  • Double-click settings.plist and find Root key, then the url key under that.
  • Double-click the url key and change its value to the Jasonbase URL you were given when you saved your file. For example, https://jasonbase.com/things/AYVL:

  • From the Product menu, choose Run or use the Command+R keyboard shortcut:

After a few moments the iPhone simulator appears with a Jasonette app icon.

  • Double-click the Jasonette app and you'll see your masterpiece:

A minimal complete Jasonette app

Add a background attribute to the body


{
  "$jason": {
    "head": {
      "title": "hello",
      "actions": {
        "$foreground": {
          "type": "$reload"
        }
      }
    },
    "body": {
      "header": {
        "title": "hello, world."
      },
      "style": {
        "background": "#d3d3d3"
      }
    }
  }
}

results matching ""

    No results matching ""