Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DjangoREST vs ExpressJS , which 1 should I choose to build REST API? [closed]

I want to build REST API (or GraphQL API) which I want to connect with Angular (2+) to build some nice web application. Which framework should I choose to get started with and why? DjangoREST or ExpressJS ? Which one of them is easier to get connected with front-end frameworks? I know python as well as JavaScript. I also have experience with django as well as some JavaScript front-end frameworks like Angular. So, it wouldn't be that difficult to get started with nodejs or either of them. Which of then is easier and better?

like image 930
Akshat Tamrakar Avatar asked Sep 15 '19 16:09

Akshat Tamrakar


People also ask

Should I use Express or Django?

In Django vs Express. js performance comparison, Express is much faster than Django. Django is generally considered a slow framework that can affect your website development phase. But performance issues can be easily negated by experienced developers.

Is Django GOOD FOR REST API?

Django REST framework (DRF) is a powerful and flexible toolkit for building Web APIs. Its main benefit is that it makes serialization much easier. Django REST framework is based on Django's class-based views, so it's an excellent option if you're familiar with Django.

Is Express GOOD FOR REST API?

Express is a perfect choice for a server when it comes to creating and exposing APIs (e.g. REST API) to communicate as a client with your server application.

Which is better for REST API Django or flask?

Flask is able to achieve generally faster performance than Django, generally due to the fact that Flask is much more minimal in design. While both of these frameworks can support several hundred queries per second without breaking a sweat, neither were designed with a priority on speed.


1 Answers

In short, Django for quick development and Express for full-stack, scalable solutions.

  1. Django provides better, easier security without as much experience. In the case of Express, it takes so much experience and confidence to get the same security from Node.JS
  2. Django uses the MVT (Model View Template) design pattern and Express uses event-driven programming in which the entire architecture is driven by “events” or user choices. MVT is excellent for server-side development, on the other hand, event-driven programming is rather than separating client and server sides.
  3. Django uses an in-house template system, so you won't hang to choosing the right one. With Express, a fully open system you may spend a lot amount of time to choose the perfect one for you.
  4. Django is more structured to work around. It tells you how to do whereas express gives you the flexibility to do it in your way. For example, you need to use Django's ORM to interact with the database, but in the case of Express, you can choose any tool you like.
  5. Express gives you freedom. So, if you’re experienced, there is a space to create whatever you want from scratch. Django gives you a lot of solutions with a vast template and library system, which is great for productivity but not enough for the vision.
like image 149
Fatema Tuz Zuhora Avatar answered Oct 04 '22 22:10

Fatema Tuz Zuhora