You're probably somewhat partial towards Hapi, having written books about it, but what do you think of the comparisons between Hapi and Express? What I took away from those is that Hapi works on a somewhat higher level of abstraction, at the cost of a somewhat lower performance in high load situations. What's your take on that?
That's a good question.
When making a choice for learning a new language, I suggest a framework that has a good to grasp learning curve.
When making a choice for an application, the performance of a framework is definitely a factor. Hapi would pass the test if your queries are well structured. I haven't noted a great fall in performance per say. Sometimes, the nature of the apps that you want is also a factor. The apps that I have worked on using hapi, used customer queries of a max 50,000 at the same instance. And it was good enough as per our client's expectations.
Personally, I come from a JAVA background, and unless a framework has a guided approach to solving problems, I don't prefer it. I don't let developers in a large team use Express, because of the way they can handle the same thing in so many different ways.
Note that Node.js is better in performance any day, but if you have to consider a framework at all, you'd consider the community behind it, the stability of its versions and the out of the box features provided by the framework. Choosing a framework in any language though is a matter of disucssion and requires context.
Both Express and Hapi aim to be highly flexible, simple, and extensible. This similarity means that both have easy-to-use APIs, they're highly modular, and can support your application as it grows potentially very large.
The learning curve for these frameworks, since they are quite straightforward, is low, unlike a more opinionated framework like Meteor. If you are coming from using Express you should be able to quickly pick up Hapi, and vice versa.
There are, however, some philosophical differences between the two frameworks, which we'll describe throughout this article.
Hapi.js includes more "batteries" by default than Express does. For instance, when parsing payload from forms to via "POST" requests, with Express, you have to include the body-parser middleware. You then use that to parse the POST payload and use the data from the user. On the other hand, with Hapi, you need no middleware. The payload is parsed for you by the framework itself, and you can access the payload directly on the request object. Little conveniences like that are replete in Hapi.
.NET Developer at iFour Technolab Pvt LTd
You can't have everything. Where would you put it?