Giter Site home page Giter Site logo

node-frameworks's Introduction

A comparison of server-side node frameworks. This may include frameworks with a browser-side component.

Frameworks

Only frameworks with over 1,000 stars are currently added. Feel free to add your own. The frameworks are listed by number of watchers, descending.

Framework Sponsor(s) / Author(s) Watchers Stars
Meteor Meteor Development Group 973 11,687
Express TJ Holowaychuk 828 12,824
Sails Mike McNeil 481 5,546
Koa TJ Holowaychuk 232 3,160
Derby Nate Smith Brian Noguchi 213 3,079
Kraken PayPal 210 2,424
Hapi Walmart Labs 204 1,981
Connect Sencha Labs 202 4,180
Restify Mark Cavage 122 2,001
Geddy Matthew Eernisse 101 1,703
CompoundJS Anatoliy Chakkaev 91 1,542
Flatiron Nodejitsu 75 1,146

Stack Integration

Traditionally, frameworks are explicitly server-side. However, there are now frameworks that are vertically integrated, i.e. integrate the client with the server.

Framework Server-side Client-side
Meteor
Express
Sails
Koa
Derby
Kraken
Hapi
Connect
Restify
Geddy
CompoundJS
Flatiron

Dependencies

Some frameworks are built upon other frameworks.

Framework Dependencies
Meteor
Express Connect for < 4.0.0
Sails Express
Koa
Derby
Kraken Express
Hapi
Connect
Restify
Geddy
CompoundJS
Flatiron

Source Lines of Code

This is the lines of code a framework uses, not including comments. This is used to gauge complexity and modularity of a framework.

Framework Source Lines of Code Version
Meteor
Express 1,150 4.0.0-rc3
Sails 5,350 0.10.0-rc4
Koa 550 0.5.1
Derby 1,450 0.6.0-alpha3
Kraken 680 0.7.
Hapi 4,750 3.0.0
Connect 120 3.0.0-rc1
Restify 3,970 2.6.3
Geddy 5,660 0.12.4
CompoundJS 3,010 1.1.13-1
Flatiron 581 0.3.11

Note: sloc is used to calculate the SLOC. Most are simply counted by running sloc lib and lines of source code is used.

Middleware/Plugin Signature

Different frameworks use plugins and middleware differently. Some use objects, others use functions. Some work with node's req and res objects, whereas many others do not. A framework is considered node-compatible if each middleware uses node's req and res objects.

Framework Signature Node-Compatible
Meteor ×
Express app.use(function (req, res, next) {})
Sails
Koa app.use(function* (next) {}) ×
Derby
Kraken app.use(function (req, res, next) {})
Hapi ×
Connect app.use(function (req, res, next) {})
Restify app.use(function (req, res, next) {})
Geddy this.before(function (req, res) {})
CompoundJS
Flatiron

Control Flow

Most frameworks use only node's traditional callbacks for control. As we move towards ES6, we will see frameworks that use generators and promises to avoid callback hell. Any framework without a control flow is assumed to use callbacks unless otherwise specified.

Framework Control Flow
Meteor fibers
Express
Sails
Koa generators - co
Derby
Kraken
Hapi
Connect
Restify
Geddy
CompoundJS
Flatiron

Included Features

If a feature is not included, there is a very good possibility that it can be used via middleware or plugin. Which features a framework includes or does not include is unimportant - its philosophy is.

Framework Content Negotiation Cookie Management Routing View System Body Parsing Multipart Parsing
Meteor
Express
Sails
Koa
Derby
Kraken
Hapi
Connect
Restify
Geddy
CompoundJS
Flatiron
Framework Session Management CSRF Protection Compression File Uploads Basic Authentication
Meteor
Express
Sails
Koa
Derby
Kraken
Hapi
Connect
Restify
Geddy
CompoundJS
Flatiron
  • Content Negotiation - ability to negotiation server response types and the request's acceptable types.
  • Cookie Management - ability to parse cookies as well as set cookies
  • Routing -
  • View System - ability to choose a templating system and render templates by their name
  • Body Parsing - ability to parse urlencoded and json request bodies
  • Multipart Parsing - ability to part multipart request bodies
  • Session Management - ability to provide non-authenticated cookie-based sessions
  • CSRF Protection - built in CSRF protection
  • Compression - built-in gzip and deflate response compression
  • File Uploads - built-in ability to send local files to the client
  • Basic Authentication

Database

Framework Database
Meteor MongoDB
Express
Sails
Koa
Derby
Kraken
Hapi
Connect
Restify
Geddy MongoDB, LevelDB, Riak, Postgres, SQLite, MySQL
CompoundJS
Flatiron

Templating

Framework Templating System
Meteor handlebars
Express
Sails
Koa
Derby handlebars-like
Kraken dustjs (not required)
Hapi
Connect
Restify
Geddy handlebars, EJS, Jade, Swig
CompoundJS
Flatiron

Contributing

When adding a new framework, you must add the simplest metadata such as links, SLOC, stack, and dependencies. Frameworks without a decent amount of stars are not welcomed. Do not spam your brand new framework.

Performance comparisons are not welcomed.

Metadata should be updated for the latest stable versions, including release candidates, but not including alpha or beta versions.

License

The MIT License (MIT)

Copyright (c) 2014 Jonathan Ong [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

node-frameworks's People

Contributors

jonathanong avatar pechitook avatar techwraith avatar xieren58 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.