jasonette

Offline


Build Offline First Native Apps
with Nothing but a JSON Markup.


Powered by Jasonette
Go!
Jasonette lets you build iOS & Android native apps by writing a single JSON markup loaded over HTTP.


But what if, instead of loading it from the cloud, you could load everything from the device itself?

Meet Jasonette Offline.

What's New

  1. File
  2. Key-Value Database
  3. Distributed App

1. File

Store and serve your app from local JSON files and local images.

Load model from file and render:

{
  "$jason": {
    "head": {
      "actions": {
        "$load": {
          "type": "$require",
          "options": {
            "items": "file://data.json"
          },
          "success": {
            "type": "$render"
          }
        }
      }
    }
  }
}

Load view from file

{
  "$jason": {
    "body": {
      "@": "file://template.json"
    }
  }
}

Load controller (actions) from file

{
  "$jason": {
    "head": {
      "actions": {
        "$load": {
          "@": "file://initialize.json"
        }
      }
    }
  }
}

Display local images from file:

{
  "type": "image",
  "url": "file://avatar.png"
}

2. Global Key Value Store

The global key-value store is an app-wide key-value database.

Setting a global variable: Pass a key/value pair as options.

{
  "type": "$global.set",
  "options": {
    "name": "Ben"
  }
}

Getting a global variable: Use the $global.KEY_NAME template expression to retreive

{
  "type": "label",
  "text": "{{$global.name}}"
}

3. Distributed App

Sometimes it may make sense to store data on the cloud while storing the app logic on the device. Sometimes maybe the other way around. There are many combinations you can implement. For example:

With the new offline features, now you can:

  1. Split your apps into different modules via mixins.
  2. Store them in different places depending on your requirement
  3. And mix and match to construct the final app in realtime.

Learn More

Want to learn more?

  1. Read the blog post: https:[email protected]/jasonette-offline-7d6ed8d58edb
  2. Read the documentation: http://docs.jasonette.com/offline/