State of the art in MVC frameworks for node.js?
I'd very much like to have some idea of the state of the art of MVC frameworks for node.js. Specifically, current commercial practice of the art, not research开发者_Go百科, with frameworks for front-end web apps. As a PHP programmer might choose Yii Framework—what are the options for node.js programmers and what are the pros and cons for the main contenders?
Update:
Searched http://search.npmjs.org and https://github.com/joyent/node/wiki/modules for MVC frameworks and noted last commit/followers. As you can see express
is the most popular and with a reason if you ask me.
https://github.com/visionmedia/express
last commit: about an hour ago
followers: 3115
https://github.com/tuxychandru/grasshopper
last commit: about 23 hours ago
followers: 130
https://github.com/mde/geddy
last commit: June 18, 2011
followers: 491
https://github.com/DracoBlue/spludo
last commit: 47
followers:
https://github.com/chetan51/ni
last commit: May 07, 2011
followers: 55
https://github.com/1602/express-on-railway
last commit: 5 days ago
followers: 153
https://github.com/fakewaffle/piejs
last commit: June 22, 2011
followers: 9
https://github.com/DracoBlue/spludo
last commit: 23 hours ago
followers: 47
https://github.com/xenophy/NextJS
last commit: February 15, 2011
followers: 18
The best/only(I think so..) option is http://expressjs.com/. This is the most popular "High performance, high class web development for Node.js". I also advice you to have a look at Learnboost's Jade's "high performance template engine"(view). Also socket.io is very interesting if you "aim to make realtime apps possible in every browser and mobile device, blurring the differences between the different transport mechanisms. It's care-free realtime 100% in JavaScript."
We've been using our MVC framework, Sails, in a production environment for several of our clients since March. It's built on Express, Socket.io, and Sequelize. The main distinction is that it routes realtime Socket.io requests the same way as standard HTTP requests: using Express routes.
Hope that helps!
As requested, I'm putting my comment in an answer.
I found http://nodebeginner.org to be a great read. It fleshes out the basics of a framework and might be a good place to start if you end up rolling your own.
But I'm happy with Express and wouldn't want to write it myself.
I also use Backbone.js for all of my client-side MVC and routing.
I just did a search on twitter for nodejs and mvc - and it pointed to something called matador - https://github.com/Obvious/matador. I haven't used it, but would like to see a comparison before I pick one...
This hand Hand-picked registry of Node.js frameworks may be useful:
http://nodeframework.com/index.html
精彩评论