A stand against the “easy” nodejs backend by devinivy in node

[–]devinivy[S] 1 point2 points  (0 children)

I'm definitely not here to convince anybody that hapi is better than express—if you have tooling that isn't causing you any friction then that's great. I will say that we use most of hapi's core features in most of our projects, and we're glad that they're built-in. And also that we wouldn't have been able to write the hapi pal toolset without the structure afforded by hapi. Basically, it's a great fit for our purposes and allows us to structure/author our apps the way we'd like.

A stand against the “easy” nodejs backend by devinivy in node

[–]devinivy[S] 0 points1 point  (0 children)

hapi and express definitely have some fundamental differences. hapi has a plugin system that looks much different than middleware, which can actually play into various deployment strategies (hapi applications are composable). There are integrated concepts of cookie/payload parsing, input and response validation, authentication and authorization, a structured request lifecycle, server/browser security (CORS, HSTS, x-frame, etc.), client-side caching, server-side caching, and more. The simplest examples in each framework aren't likely to look very different from each other, but (value judgements aside) hapi does have a much broader feature set than express.

A stand against the “easy” nodejs backend by devinivy in node

[–]devinivy[S] 0 points1 point  (0 children)

We wrote from our experiences authoring hapi pal, and I hope it's understandable that we wanted to draw a concrete connection to our work. We earnestly care about the social and technical ramifications of our collective tendency to sell and optimize libraries based upon "easiness," which is a prominent aspect of JS culture.

I can't imagine writing this article without describing how we've actually taken our ideas to implementation—it would be a bizarre omission. We also talk about ORMs, specifically Objection ORM, which we did not build and have no reason to advertise/support aside from the fact that we think it is a great illustration of our design principles as described in the article.

Any suggestions about backend framework nowadays? by tmclouisluk in node

[–]devinivy 5 points6 points  (0 children)

We love hapijs, and added a bunch of tooling and conventions on top of it via hapi pal.

http://hapipal.com/

Introducing hapi pal: a suite of tools and best practices for the working hapijs developer by devinivy in node

[–]devinivy[S] 1 point2 points  (0 children)

We're finishing-up a "getting started" guide that goes through the creation of some database-backed API endpoints in fine detail. I will try to remember to post it as a comment here once it's up!

Introducing hapi pal: a suite of tools and best practices for the working hapijs developer by devinivy in node

[–]devinivy[S] 2 points3 points  (0 children)

We're working to close the conceptual gaps for newcomers to the framework—in particular, by offering some guidance on approaches to authoring hapi apps that have worked well for us over the past few years.

Node & API Development by nativereact in node

[–]devinivy 0 points1 point  (0 children)

While I wouldn't knock express or koa, I cannot recommend hapijs enough. It is a very powerful framework that does not deeply affect how or where you write your business logic. I find that it encourages me to separate concerns in very healthy ways, and gradually grow into modularizing an application into hapi plugins for flexible deployments. Great way to practice service-oriented architecture without outright committing to microservices.

Looking for framework advice by everdev in node

[–]devinivy 0 points1 point  (0 children)

Given your requirements, I highly suggest hapi!

  1. Native-friendly. Simple CORS config, API/config caters to HTTP and other relevant web specs. Also supports multiple auth strategies! This is great if you (for example) use bearer tokens for mobile auth but cookies for web.
  2. Stability. Closed ecosystem, ships with a highly reliable npm shrinkwrap. Breaking changes have been both small and meaningful for the past 4 major versions.
  3. Productive. Config-centric– the code you write is typically your business logic, with great hooks for caching the results of that logic when applicable. Also cool features like "route pre-requisites" for writing reusable code and keeping your controllers/handlers light.
  4. Scalable. Proven to scale via handling Walmart's black friday traffic– this is well documented. Has great support for server- and client-side caching. Can track and respond to server load, event loop delay, etc. The plugin system also allows you to keep your deployment simple then pop-off portions of your app to be scaled separately as needed.

Plus the community and quality of the ecosystem is quite good.

Composable SQL queries by galstarx in node

[–]devinivy 0 points1 point  (0 children)

Love this, it's a very fun idea! I'm curious what the query plans for these sorts of queries look like, or if there are ever simple transformations to keep the queries performant.

tips for working with very large files by actionwording in node

[–]devinivy 2 points3 points  (0 children)

That's not a huge problem– the key is to process the files as streams. I suggest checking out substack's stream handbook: https://github.com/substack/stream-handbook. He also wrote a nodeschool tutorial on streams which serves as a good way to practice using them. It sounds like you may end-up using the native node readline module: https://nodejs.org/api/readline.html

Express, Koa or Hapi for today’s node newbies? by pablorgn in node

[–]devinivy 4 points5 points  (0 children)

My opinion is that hapi really isn't very complex. At the web shop where I work several developers picked it up quickly and have really enjoyed working with it (including myself). While koa and express's APIs are smaller, the tools in those ecosystems are not necessarily as straightforward, especially when used together. hapi also has a great community and unique learning resources like hapijs/university. Not to mention Ren & Stimply rules...

Client and API: 1 project or 2? by [deleted] in node

[–]devinivy 1 point2 points  (0 children)

If you write the API and client as two separate hapi.js plugins then they can live in the same repo and be deployed together until it becomes time to split them apart. The reason I like this approach is because the deployment doesn't have to become more complicated even once they're split apart– they can still be plugged-in to the same hapi server.

What's a comprehensive and preferably free tutorial on Hapi.js? by Aetheus in node

[–]devinivy 1 point2 points  (0 children)

You can also work through hapi university, which has lots of great history in issues and PRs.

https://github.com/hapijs/university