Are you sirius?

Sirius.js a light weight javascript MVC framework, written with coffeescript. It's give a simple integration with current javascript frameworks.

Features

Install

npm install sirius

or download manually sirius.min.js and jquery_adapter.min.js or prototype_js_adapter.min.js from repo.

Usage

1. Define controllers

MyController = 
  action: (param) ->
    # ...

  run: () ->
    # ...
  after_run: () ->
    # run after `run` method

  guard_event: (event) ->
    if condition
      true
    else
      false

  event_action: (event, id) ->
    # ...

2. Define routes

routes = {
  "application:run"   : controller: MyController, action: "action"
  "#/:title"          : controller: MyController, action: "run"
  "click #my-element" : controller: MyController, action: "event_action", guard: "guard_event", data: "id"
  }

3. Define models

class Person extends Sirius.BaseModel
  @attrs: ["id", "name", {"age": 21}]
  @guid_for: "id"
  @form_name: "#my-person-form"

4. Run Application

Sirius.Application({routes: routes})

5. Enjoy

More

I am Sirius