Sweet! Thanks! On Sat, Jun 9, 2012 at 8:25 PM, Shogun <[email protected]> wrote:
> Hi EllisGL, sorry for the late response. > > So i updated readme with this https://github.com/Shogun147/Katana#sessionsand > pushed few updates. Hopes this will be enough for now, but ask if > something is not clear. > > Also this days i'll end write a todo application which use auth module and > mongoose. > > Also i created Katana group > https://groups.google.com/forum/?fromgroups#!forum/katana-js for > particular problems and things like this. > > > суббота, 9 июня 2012 г., 2:44:24 UTC+3 пользователь EllisGL написал: >> >> Shogun, >> >> Wondering how you use the session plugin? I'm hoping to use sessions with >> the MVC part and socket.io part. >> >> On Tuesday, May 8, 2012 5:17:24 PM UTC-5, Shogun wrote: >>> >>> 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<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<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 > -- Kenneth Ellis McCall -- 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
