Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node-PerfectAPI vs Restify.js vs ExpressJS vs Node-APIServer [closed]

I'm new to ExpressJS. I want to create API's for my service which will be consumed directly by other servers and also a part of it by mobile apps/browsers. I just discovered Restify, Node-PerfectAPI, Node-APIServer and I don't know what the differences are.

Can someone kindly elaborate on the differences of each framework and the advantages/disadvantages.

Why would one choose Express/NodeJS vs. Other Frameworks for creating API'S?

like image 230
Nick Avatar asked May 06 '12 05:05

Nick


People also ask

What is the difference between node JS and Express?

NodeJS is an event-driven, non-blocking I/O model using JavaScript as its main language. It helps to build scalable network applications. Express is a minimal and flexible Node. js web application framework that provides a robust set of features for web and mobile applications.

Is ExpressJS outdated?

It is unmaintainedExpress has not been updated for years, and its next version has been in alpha for 6 years. People may think it is not updated because the API is stable and does not need change.

What is Restify in node JS?

restify is a node. js module purpose built to create REST web services in Node. restify makes lots of the hard problems of building such a service, like versioning, error handling and content-negotiation easier.


3 Answers

Disclaimer: I am the author of node-perfectapi.

The focus of perfectapi is to make it simple for the developer to go from start to production-ready. It is more abstracted than node-restify. The impact of that is you have less flexibility in the design of your API, but at the same time, you should be able to get something production-ready much quicker, with less expertise.

Both restify and perfectapi have comparable performance.

The links in this answer go to pages that highlight the benefits of each solution.

like image 136
Steve Campbell Avatar answered Nov 14 '22 10:11

Steve Campbell


I'm also working on a similar issue. One of the main difference that may interest you is the performance. I just found a blog post from the developer of "perfect-api" comparing his framework to the 2 others. http://blog.perfectapi.com/2012/benchmarking-apis-using-perfectapi-vs-express.js-vs-restify.js/

A comment states that Restify is doing much better now.

From my (limited) experience, I would say that express.js is easier to use than Restify and provides some nice tools as connect.js which is exposed. For example, this will avoid you the pain of writing a static file server even thought Connect can still be integrated with Restify.

On the other hand, Restify will make some common API tasks much easier. For example, it provides a throttle engine along with an API conversioning system which is really necessary in an environment where you deal with clients you do not control.

like image 38
yadutaf Avatar answered Nov 14 '22 10:11

yadutaf


You should also consider https://npmjs.org/package/hapi

It looks very promising. There's a talk about the framework in https://www.youtube.com/watch?v=Recv7vR8ZlA where the main contributor to hapi talks about what makes an API framework tick.

like image 27
surui Avatar answered Nov 14 '22 10:11

surui