Saturday , 29 April 2017
Home / Programming / JavaScript / Node.js / Web Frameworks – Node.js Tutorial for Beginners
Web Frameworks
Web Frameworks

Web Frameworks – Node.js Tutorial for Beginners

Before we begin, let’s talk a little about web frameworks. There are a lot of web frameworks out there. Each framework has some pro and cons. Right now, there is no “best” framework as every framework has it’s own purpose.

Express

Currently, the most popular framework is express. Express has been around since the beginning. So, it has a huge community and a lot of support. Every online tutorial or book teaches express for its simplicity. Express makes developing web applications easy and faster. It provides a handful of features out of the box and it’s very flexible.

While Express is great, you still have to write a lot of code and you have to write and test most of the end points. Most people find Express perfect for most of their needs. For this tutorial series, we’re going to stray away from the norm. We won’t be using Express. I believe there are more simpler frameworks out there that can give you more out of the box while still giving you flexibility.

Meteor

Meteor is a full stack framework and probably the easiest framework you will ever find. Meteor really tries reinventing the wheel and allows you to write synchronous code. WAIT WHAT? Isn’t node.js asynchronous? Yep, but like I said, Meteor doesn’t force you to write asynchronous code.

Meteor is still pretty young. The community is growing and I encourage you to check it out. It’s really a great and innovative framework. We won’t be using Meteor because we want to focus on server side and not client side. Meteor provides both. While it’s great, you won’t learn Node.js as much and you’ll probably be confused by what Meteor is doing behind the scenes.

Hapi

Hapi is very lightweight and really fast. It focuses on configuration instead of code. Which is really great because you get to focus more on your web application. I find Hapijs the perfect framework for any beginner as it can get you up and running very fast. It provides a lot out of the box such as input validation, caching, routing, and authentication. It’s very flexible as well.

We will be using hapi and I’m sure you’ll fall in love with this framework once we start using it. By the end of this tutorial series, we’ll build a fully functional blog web application. You’ll be able to create posts, edit posts, login, register and comment on posts. We’ll also learn about handling uploads, templates and we’ll use an actual database instead of one in memory.

Conclusion

We learned a lot about the various web frameworks out there. As I stated before, there is no perfect web framework. Every framework has it’s pros and cons. If you would like to view every framework available, then I suggest you check out http://nodeframework.com/.

About Jasko Koyn

Check Also

Asynchronous

Asynchronous – Node.js Tutorial for Beginners

Before we continue onto our blog web site. I would like to talk about asynchronous …

Leave a Reply

Your email address will not be published. Required fields are marked *