Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lemol/nzilajs

A lightweight and very simple (but powerful) client side javascript MVC framework.
https://github.com/lemol/nzilajs

Last synced: about 6 hours ago
JSON representation

A lightweight and very simple (but powerful) client side javascript MVC framework.

Awesome Lists containing this project

README

        

nzila.js
========

A lightweight and very simple (but powerful) client side javascript MVC framework.

##Examples

Consider the html:

```html
Hello world! |
Hello me (put your name on the url)
```

1. With simple actions:

```javascript
var app = new nzila.App();

app.route("hello/world/", function() {
alert("Hello world!");
});
app.route("hello/me/:name", function(name) {
alert("Hello " + name + "!");
});

app.start();
```

2. With controller:

```javascript
function Hello() {
}
Hello.prototype = {
world: function() {
alert("Hello world!");
},
me: function(name) {
alert("Hello " + name + "!");
}
};

var app = new nzila.App();
app.route("hello", nzila.Controller(Hello));
app.start();
```

by **[Leza Morais Lutonda](http://github.com/lemol)** (*[Lemol-C Software](http://lemolsoft.webs.com)*)