Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django vs Node(Express) vs Flask for RESTful API with high security and real-time

I have a few questions regarding some popular web frameworks. I can find pros and cons about all the frameworks, but which fits best regarding theese criteria:

The website needs to be as secure as possible. It will need a lot of real-time feautures, an own mobile app (native or hybrid, with notifications) and the application will also run a lot of background processes.

Django has some nice security features included, but suits bad for mobile development. The solution is then probably making a completely RESTful API tougheter with Angular and Ionic, but doesn't you loose most of Django's built in security solutions? Will it then be just as safe using a Node framework like Express, and manually escape user input, and manually prevent database injection? Will a good user authentication system then be equal as much work?

In addition, will it be painful to mix synchronous and asynchronous programing using Django channels to implement websockets and real-time features. I don't have any experience using Django channels, but I really likes the simplicity of Socket IO together with Express. Even if it can be challenging to program asynchronous in a Node environment, will it be just as hard using Django channels at the end? And since Django is a full framework, will you after a while have to rewrite a lot of the inbuilt classes and functions? Is it still easier than using Flask with Flask SocketIo? Will it be a good idea to use Python for background jobs beside the Node environment?

I know there already exists enough framework vs framework questions, but i would appreciate any advice and experiences.

like image 290
J.Doe.Doe Avatar asked Jul 06 '19 05:07

J.Doe.Doe


People also ask

Which is more secure Django or Flask?

Flask relies on third-party extensions, giving developers the freedom to set up their own security protocols. Flask-Security library provides the same protections as Django, but it isn't standard to the framework, meaning more work for the developers who set it up. → Django vs. Flask for security: Django wins.

Should I use Flask or Django FOR REST API?

If the application is simple such as less endpoint or simple logic, I'd suggest Flask. But what you're building is quite a large system that contains many logics and a lot of models. So I'd suggest you with Django and Django REST framework. Django ORM is also one of the best ORM in the world as well.

Is Django more secure than node JS?

Node. js is less secure than the Django framework because it needs a manual operation in the system to administer security flaws. Django is being used in a lot of companies like Youtube, Disqus, Instagram, etc. Node.

Which is better Django or Flask?

Flask is considered more “Pythonic” than Django is basically since Flask web application code is, in most cases, more unequivocal. Flask is the choice of most tenderfoots due to the need of barricades to getting a basic app up and running.


1 Answers

Just go ahead and use the socketio in node or flask it is much more adviceable than using the socketio libary in Django.

like image 174
chidalu okechukwu Avatar answered Oct 27 '22 01:10

chidalu okechukwu