Hi all!

I know there already a lot of mini and almost full future frameworks for 
Node.js but anyway i build my own.

There are few reasons why i'm doing this:
1. Learn more about node and its modules
2. Build a intuitive, easy to use and fast development framework
3. I dont like the way of routing is done in Express and taken by other 
frameworks. I want classical routing on regexp like in CodeIgniter 
framework from php or other, which help much more easier maintainance.
URI will be parsed by default as:
http://host/controller/action/arg1/.../argn

and a few more, doesn't matter...

So i develop a MVC/HMVC framework called *Katana *
(https://github.com/Shogun147/Katana)

Install from npm: 
*npm install -g katana*

Generate application with katana executable:
*katana create [path]*

and ready to start: node app

*Features:*
* Environment based configuration
* Classical routing and re-routing for mvc modules
* Basic mvc + mvc modules which could be used as widgets maybe or just as 
work modules
* Cookies, Sessions, form data and upload parser(formidable)
* ...

Basic home controller looks like: 

[code=javascript]
var App = require('katana');

require('joose');

Class('Home_Controller', {
  isa: App.Controller,

  methods: {
    index: function(Response, Request) {
      // Response.render('index', { title: 'Hello Katana!' });
 
      Response.send('Hello Katana!');
    }
  }
});

module.exports = new Home_Controller;
[/code]

Also modules can be used as middleware or something like this:
Auth module maybe
[code=javascript]
var App = require('katana');
var User = App.Model('auth:user');

App.on('request', function(Request, Response, callback){
  Request.user = new User(Request.session);

  callback();
});
[/code]

and then in controlller you can get user:
[code=javascript]
Class('Home_Controller', {
  isa: App.Controller,

  methods: {
    index: function(Response, Request) {
      var User = Request.user;

      // use User model ...
    }
  }
});
[/code]

Anyone interested or who like the framework idea can contribute by sending 
new ideas, issues or pull requests. Any contribution is welcomed.

Have any questions? Please contact me or write in this topic and i'll 
answer.

Hope with your help first release will come soon as possible.

Thanks.

sorry for my english...

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to