DEV Community

Arif reza
Arif reza

Posted on

Express & CRUD

Express

1. What is Express?
Ans:

Express is the most popular Node framework, and this is the underlying library for a number of other popular Node frameworks. It provides mechanisms to:

  1. Write handlers for requests with different HTTP verbs at different URL paths.
  2. By inserting data into templates, integrate with view rendering engines in order to generate responses.
  3. Set common web application settings like the port to use for connecting, and the location of templates that are used for rendering the response.
  4. Add additional request and processing "middleware" at any point within the request handling pipeline.

When Express is fairly minimalist, developers has created compatible middleware packages to address any web development problem.
There are libraries to work with user logins, cookies, sessions, POST data, URL parameters and many more.

2. Where did Express come from?
Ans:

Express was released in November 2010 and it is currently on version 4.17.1.
For need, you can check out changes in the current release, and GitHub for more detailed historical release notes.

3. Is Express opinionated?
Ans:

Web frameworks themselves as "opinionated" or "unopinionated".

Opinionated frameworks are those with opinions about the "right way" to handle any particular task.
They support rapid development in a particular domain because the right way to do anything is usually well-understand and well-document.

Unopinionated frameworks, by contrast, have far fewer restrictions on the best way to glue components together to achieve goal, and whice components should be used.
They make it easier to developers to use the most suitable tools to complete particular task.

Express is unopinionated. You can insert any compatible middleware into the request handling chain.

CRUD

What is CRUD?
Ans:

The four basic concepts are Create, Read, Update, and Delete (CRUD) that should be able to do.

Create:

To create resources in a REST environment. Most commonly use the HTTP POST method. POST creates a new resource of the specified resource type.

Read:

To read resources in a REST environment, we use the "GET" method. Reading a resource should never change any information.

Update:

To update resources in the REST environment, we use "PUT" which is the HTTP method.

Delete:

To Delete resources in the REST environment, we use the "DELETE" method.

Top comments (0)