About the project
Jasonette is a different way of making native apps.
Instead of programming an app on the device, you simply write a JSON file hosted on a server, and the Jasonette apps fetch and use it to build themselves on-demand whenever you open the app.
Before we jump in, here's where you can stay in touch with the project community:
■ Follow the project
Follow on Medium
|Github iOS||Github Android||Github Web|
|A Web implementation,
■ Ask the community
For code related questions, ask on the forum to get more comprehensive answers.
For quick chats, use the Slack channel.
Ask questions and share tips.
1. Download Jasonette for iOS or Android
2. Write and host a JSON recipe that defines your app
3. Add the JSON URL to Jasonette to turn it into your app
Step 1. Download
Go download and come back, we'll wait.
Step 2. Learn
Watch the 2 videos below and you'll have learned everything you need to know to get started.
The videos were shot using an iPhone, but it works exactly the same for Android.
A. Do you know JSON?
Before we dive in, do you know JSON? If not, just check out this tutorial, takes 2 minutes.
B. Get a JSON server
You'll be serving your entire app from a server, so you will need somewhere to host JSON, just like you need somewhere to host websites. There are many ways to do this:
Has all the useful features such as folders, markdown-based readme, bookmarking, version control, realtime editing, etc. Write and share as much JSON as you want. It's FREE.
(Note: You DON'T need to use Jasonette Web to use Jasonette. This service is provided for free to help you get started quickly without having to set up your own JSON server. After all, all you need is JSON and the whole point of the framework is the portability of JSON)
2. Code hosting or pastebin sitesYou can also use Github or Pastebin. Not really recommended for development because these sites are NOT built for this type of usage. They actually discourage you from using them as API endpoint. Furthermore, their content is cached so you'll often keep getting old responses whenever you update your JSON content, which is a pain. However, you can use them AFTER you've finished editing, or use it for open sourcing though. Here's an example.
3. Quick Local PrototypingYou can also use Jasonette-Web along with simple instant open source HTTP servers like the http-server project to roll your own Jasonette Web.
4. Plug into your existing serverYou can skip all this and set up your own web app with a JSON endpoint, or just plug into your existing web app.
C. Learn the basics
This video walks you through the basics of Jasonette, such as how it works, how to get started, etc. It was shot using iOS but it basically works the same for Android.
D. Learn JASON syntax
This video teaches you how to actually write a JSON markup to build sophisticated interactive layouts.
Step 3. Learn more (Reference)
Anatomy of a Jason view
Learn the basic structure of a JASON view
Just like HTML has basic tags such as body, div, span, li, etc, Jasonette has JSON based tags to describe the structure of a view.
Learn component syntax
Components are the most basic units of user interface, such as image, label, textarea, button, slider, etc.
In many cases we combine multiple components to construct a unit. We use layouts to do this.
Link multiple views
Above three sections are all you need to know to display content in a view. But what if we want multiple views? We can link them using
Actions define a task or a sequence of tasks you wish to run, such as network request, audio play, camera access, geolocation, displaying banners, etc.
You can use templates to dynamically render data, such as remote network content, local data, and user input.
Here are some in-depth articles
- (Intro) How to build cross-platform mobile apps using nothing more than a JSON markup
- Jasonette Offline: Using offline features with Jasonette
- Building a SlackBot remote control app with Jasonette
- TabBar: How the bottom tab bar works
- Functional Programming in JSON: How Jasonette implements function call stacks purely in JSON, and how to use it
- Require: How $require action works
- Mixins: 2-part series.
- Web Container: Introduction to Web Container
Actual JSON examples you can try out with Jasonette: