Monday, June 17, 2013

JikamuJS is being develop using Coffeescript, and requires jQuery and jQuery.address for the URL Routing.

The main inspiration of this simple application is DavisJS which currently support HTML5 browsers. DavisJS is a router application that use HTML5 history.pushState.

With the help of jQuery.address url routing api, JikamuJS will target not only new browser but also older browsers(I'm talking to you Internet Explorer).

JikamuJS' Goal

JikamuJS was built with the help of great JS and Jquery plugins like jQuery Address and DavisJS.


So what's the puss with this very simple js app?

Well if your familiar with Backbone then go Backbone. JikamuJS is not built to replace those capable JS framework but this simple app is capable of building simple apps to a bigger one and it will support IE6 up to latest.

Requirements

JikamuJS requires jQuery 1.7.2+ and the latest jQuery Address. You can download the latest JikamuJS here at github.

Usage

Using JikamuJS is very simple , pull out the Route class and supply URL Path, Controller Before Load and After load callbacks.

Adding a new Route with your page

new Jikamu.Route()
    .urlpath('/blog')
    .page(
        {
            page_name: "Blog Page",
            controller: function(){
                $("#container").html('Blog Page');
            },
            before_load:function(){
                console.log('Before loading Blog page');
            },
            after_load:function(){
                console.log('After loading blog page');
            }
        }
    )
    .save();

Starting your App


new Jikamu();

Accessing URL parameters


Checkout jQuery Address API and references here http://www.asual.com/jquery/address/

Future Plans

Unit tests
Separate files and classes
Documentation
Add more features

0 comments:

Post a Comment