Do we really need an UI for DRF?

105 views
Skip to first unread message

Ram

unread,
Aug 16, 2022, 12:19:57 AM8/16/22
to django-res...@googlegroups.com
Hi,

We have an ecommerce website which was developed using Django template based and the stack that we used:

1. Django ( no DRF ) 
2. Python
3. PostgreSql
4. HTML, CSS, Javascript, Jquery and partly Vue.js
Now we are trying to write REST APIs using DRF for the same website and we are using this stack:
5. Django with DRF
6. Python
7. PostgreSql
8. < Unknown yet? >

and we are running implementation challenges while adding REST APIs. Those are:

Q1. Do we need to use specific GUI front ends like (React/Vue.js/Angular and etc.)?

Q2. The reason for developing REST APIs now is to port a mobile app using Flutter. We thought we could get a json response from the REST API and use that in a mobile app. So we are wondering whether we really need a new UI for adding REST APIs? or can we use our existing UI (HTML, CSS, Javascript, Jquery) to serve our implementation use case. 

When we tried to add REST APIs for a couple of apps, we encountered that any REST API needs to have an UI, is this really true? 

So we are basically stuck on implementation currently and thought that we could get some help from this community to understand a sustainable solution for us. I would appreciate it if you have any advice for us.

Best regards,
~Ram


Wanderley S

unread,
Aug 16, 2022, 11:23:36 AM8/16/22
to django-res...@googlegroups.com
Hello.
Short answer is, NO, you don't need any UI (front end) for any REST API you build.
DRF has the browseable API and the recommendation is to disable it for production, you can use the browseable API for testing and help you during the development process, but for production you should disable it.

Once you have the REST API you can "consume it" from whatever client you want to build. Desktop, javascript, mobile, command line like CURL. That's what REST API's are for, to allow any type of client.
If you're developing the backend only (the REST API itself) it doesn't mean you have to build any client, that's what the browseable API is for, actually.



--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/CA%2BOi5F0AY7iszgfyf9p7HUjj8%3D2B9-_zEOsxVWp9Y8jNdXTxXw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages