Download OJ

ojoj.min.js (0.3.4)oj.js (0.3.4)docs

Download Plugins



All examples are included in the oj-examples project. To take a look at them clone the repository with git:

git clone [email protected]:ojjs/oj-examples.git

Or just go there directly:

View all examples

The goal of these is to get you started as fast as possible. If these don't work immediately let me know and I'll fix them so they are even more clear.

Client-side Hello World

Getting started with OJ is as simple as including oj.js and executing code. Here is Hello World in JSFiddle:

View source (

View example (

Client-side with Backbone

To get started with model binding with Backbone check out this example:

View source (

View example (

Server-side Commandline

View source (

View example (

Server-side Commandline (in CoffeeScript)

View source (

View example (

Server-side with Express

Important: Express support isn't implemented yet. This is my #1 priority after this documentation push.

For those wondering why it doesn't exist yet: the challenge is that serious caching is necessary for minification and require traversal. A simple "one function" approach would be pretty trivial. It is just getting support the command-line tool's file unification and minification that is hard.

If you are an expert on Express middleware integration, please feel free to reach out.