3.6.2 • Published 9 years ago

fist v3.6.2

Weekly downloads
9
License
MIT
Repository
github
Last release
9 years ago

fist the framework Build Status

Fist is a nodejs framework designed to help create scalable server applications.

##What do I get?

#####Plugin system Modular application structure. Automatic project files loading.

fist_plugins/
    models/
        user.info.js
        news.list.js
        news.available_list.js
    controllers/
        news_page.js

#####Loosely coupled architecture Focus on unit development. Encapsulated business logic.

app.unit({
    name: 'news.available_list',
    deps: ['news.list', 'user.info'],

#####Data models Simple and intuitive data structures. Unobtrusive data typing.

{
    errors: {},
    result: {
        news: {
            available_list: [
                {
                    type: "post",
                    visibility: "all",

#####Thin controllers Just check that your models are valid.

app.unit({
    name: 'news_page',
    deps: ['news.available_list'],
    main: function (track, context) {
        if (context.e('news.available_list')) {
            track.status(500).send();

#####Built-in logging tools Always clear what happening and where. More reliability.

app.unit({
    name: 'user.info',
    main: function (track, context) {
        context.logger.debug('Checking user by sessid\n"%s"', track.cookie('sessid'));

#####Built-in cache Just specify what parts of your program can be cached. Less loading. More responsiveness.

app.unit({
    name: 'news.list',
    maxAge: 5000,

##Hello, world!

$ npm install fist

app.js:

var fist = require('fist');
var app = fist();
app.listen(1337);

fist_plugins/routes.js:

module.exports = function (app) {
    app.route('GET /hello/(<name>/)', 'hello_page');
};

fist_plugins/controllers/hello_page.js:

module.exports = function (app) {
    app.unit({
        name: 'hello_page',
        deps: ['greeting_data'],
        main: function (track, context) {
            track.send(context.r('greeting_data.helloText'));
        }
    });
};

fist_plugins/models/greeting_data.js:

module.exports = function (app) {
    app.unit({
        name: 'greeting_data',
        main: function (track, context) {
            return {
                helloText: 'Hello, ' + context.p('name')
            };
        },
        params: {
            name: 'what is your name?'
        }
    });
};
$ node app.js

See the full example code

###Quick start

##Docs


LICENSE MIT

3.6.2

9 years ago

3.6.1

10 years ago

3.6.0

10 years ago

3.5.1

10 years ago

3.5.0

10 years ago

3.4.0

10 years ago

3.3.3

10 years ago

3.3.2

10 years ago

3.3.1

10 years ago

3.3.0

10 years ago

3.2.1

10 years ago

3.2.0

10 years ago

3.1.1

10 years ago

3.1.0

10 years ago

3.0.2

10 years ago

3.0.1

10 years ago

3.0.0

10 years ago

3.0.0-debug0

10 years ago

2.0.4

10 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.5.0

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

11 years ago

1.1.1

11 years ago

1.1.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago

0.0.1-rc4

11 years ago

0.0.1-rc3

11 years ago

0.0.1-rc2

11 years ago

0.0.1-rc1

11 years ago

0.0.1-pre8

11 years ago

0.0.1-pre7

11 years ago

0.0.1-pre6

11 years ago

0.0.1-pre5

11 years ago

0.0.1-pre4

11 years ago

0.0.1-pre3

11 years ago

0.0.1-pre2

11 years ago

0.0.1-pre1

11 years ago

0.0.1-pre0

11 years ago

0.0.0

11 years ago