Search code examples
djangovue.jsdjango-rest-framework

Should I use Django or Django Rest Framework, if I want to create a frontend in Vue.js?


If I want to create a web app using Vue.js for frontend, what should I use, Django or Django Rest Framework?


Solution

  • I think you should use Django

    Django is a web framework, where Django REST Framework is a Django library which can be used to build REST API on top of Django quickly, securely and easily.

    You can't compare Django to Django-Rest-Framework any more than you can compare Windows to Oracle for Windows.

    Django Rest Framework requires Django as a dependency. Further, Django can do everything that Django Rest Framework can do, you'd just have to write a lot of code to replicate the functionality of Django Rest Framework. DRF gives you a lot of convenience, like authentication modules, json serializers/deserializers, API routing and documentation, etc., etc.

    But if you only need APIs for your app backend then DRF is your choice.

    Credit and further reads :

    https://www.quora.com/What-is-the-difference-between-the-Django-and-Django-REST-frameworks

    https://www.reddit.com/r/django/comments/354yqt/django_regular_vs_django_rest_framework/