This course has been updated! We now recommend you take the AWS for Front-End Engineers (ft. S3, Cloudfront & Route 53) course.
Transcript from the "Alternatives to Express" Lesson
[00:00:00]
>> [MUSIC]
[00:00:03]
>> Kevin Whinnery: What we are going to do first is actually look at a few things that you could use other than Express. And over the next couple days, as we introduce technology in this stack, I'll try to talk about some of the other choices that are out there. Because again, I think one of the strengths of the Node ecosystem is there are a million ways to do everything.
[00:00:23] While at the same time, a weakness of the Node ecosystem is that there are a million ways to do everything. So I will try to cover some of the other things that you can use. Hapi is another framework which is focused on creating a server-side APIs. Although it can do server-side HTML rendering just like any other framework out there.
[00:00:46] It's used in a lot of popular Node web applications. It has a lot more features than Express, a lot more behavior out of the box. Which can be a good or a bad thing, depending on how you look at it. But it's another mature, robust framework out there that's definitely worth your consideration.
[00:01:07] On the sort of the furthest end of the spectrum from Express is a framework called Sails. Which strives to be sort of a full stack framework in the tradition of Ruby on Rails. So it provides its own ORM, its own configuration system, and sort of tries to pack in all of the things that you probably need for a dynamic web application into the same package.
[00:01:34] And it's pretty okay, I know a few people who have used it. And if more of a full stack framework appeals to you, it's definitely worth checking out. The caveat that I'll put out there which is, again in my old age, the way I choose software is essentially, I'm like, how well it's documented.
[00:01:51] Like how much effort do I have to expend to do something useful with this piece of software? And Sails is documented okay, but the thing that's kind of a bummer is like you don't find a lot of resources for it. Like there aren't a lot of people writing Sails tutorials, or sample applications, and that sort of thing.
[00:02:10] So you'll find yourself in the wilderness quite a lot when you're using Sails. The other one that I would throw out there, which is sort of a forward-looking framework built by some of the same people who built Express, is called Koa. And Koa had, in the past, you created a generator-based API for serving HTTP requests.
[00:02:32] They're now moving towards like fully embracing promises and the new async/await syntax that's emerging in newer versions of JavaScript. But it's definitely a bleeding-edge-type thing. And again, cuz I'm a crusty old man like that, that bleeding-edge stuff gets old for me pretty fast. But it's definitely a cool one that's worth monitoring that.
[00:02:58] Could definitely pick up steam, so.