With node.js you only need to choose one framework. For frameworks some popular ones are
- connect A middleware component for managing HTTP requests
- express A view engine & router build on connect.
- SocketStream A fast real-time web framework for Node.js
- zappa Not your mom's node framework
- grasshopper a MVC framework
- geddy a Web framework
- spludo Another MVC framework
I've only used express
and I can vouch it is fantastic. It has a great community and fantastic support. It's also the only library I know that just works and that says a lot.
Apart from that the node community uses optimized modules that solve one problem, when they need that problem solved. Frameworks should handle the minimal problems of handling HTTP request and express
solves that.
Below is an except from package.json file.
"dependencies": {
// my framework, used to handle HTTP
"express": "2.4.4",
// a very specific validation module used for input validation
"validator": "0.2.7",
// dust a templating engine
"dust": "0.3.0",
// a uuid factory
"node-uuid": "1.2.0",
// a markdown parser
"marked": "0.0.4",
// a HTTP request library
"request": "2.0.3",
// a traits (OOP) library
"traits": "0.4.0",
// a file tree watcher
"watch": "0.3.2",
// a CSS abstraction
"less": "1.1.4",
// a flow control library
"after": "0.1.0",
// a utility to extend Buffer
"buffertools": "1.0.3"
},
"devDependencies": {
// a unit testing library
"vows-fluent": "0.1.0",
// a unit testing utility
"should": "0.2.1",
// hot code reloading
"nodemon": "0.5.3",
// debugger
"node-inspector": "0.1.9"
}
As you can see, I use one framework and a whole range of hand chosen utility libraries that solve one task. For the other tasks I roll out my own (a few of the libraries listed above are my own).
For example I used to recommend backbone
as a solid MVC library but it just doesn't work with node. So I rolled out my own MVC abstraction. I also used to recommend cradle
as a solid CouchDB abstraction but it leaked, so I stepped down and wrote my own database access code using request
to talk to CouchDB.