20

Node.js is a javascript environment

Express is a framework

What is a software framework? for Node.js?

Why and when is it useful to use Express framework over Node.js standalone?

What I mean is that, is this framework just a set of ready functions and modules that makes it easier to write codes from scratch?

I'm asking this because I found lots of tutorials and guides on NodeJS with Express, but just a few on standalone NodeJs.

AndrewL64
  • 15,794
  • 8
  • 47
  • 79
Mitro
  • 1,230
  • 8
  • 32
  • 61
  • 5
    Really Node.js is a JavaScript environment, not a programming language. JavaScript is a programming language. – Pointy Jan 07 '15 at 17:18

2 Answers2

18

As you suspect, Express.js just makes it easier to write a Node.js webapp. You could build anything you could with Express.js without it.

Many factors go into whether to use a given framework or not, such as available support, documentation, future development, does it fit needs of project, etc. Express.js is the most popular Node.js web application framework, but that doesn't mean it should automatically be your choice. Here's a link to an article which you may find interesting, and contains alternatives to Express.js which may be worth exploring - https://scotch.io/bar-talk/the-future-of-expressjs-and-alternatives

You can also check out this tutorial on writing a Node.js application without a framework - http://www.nodebeginner.org/

frajk
  • 853
  • 6
  • 14
  • That was the book that I used to start with Node.js, really good in my opinion, do you know others where node is explained standalone? – Mitro Jan 07 '15 at 22:32
8

The reason it is famous because Easy learning curve.There are lot of inbuilt, third-party middleware compatible with it. It overall provides complete structure in clean syntax. And yes you are right ,it is just a set of ready functions and modules that can be used easier than writing code from 0. It saves time. There lot of resources on nodejs with express.

But The same functionality can be done without expressjs which requires research.

NeiL
  • 791
  • 8
  • 35