Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should my web based app be a consumer of my api?

Tags:

django

I will be developing a mobile app (iPhone) and a web based app (Django) soon. For the mobile app I will be creating a REST api (most likely using Django) to send data back and forth from phone to server.

When I comes time to create the web based version does it make sense to just create it as any other client of the api. In other words both the mobile app and the web app will get there data from an external API over HTTP. Or should the web based app have direct access to the database that the api is using and just get its data that way?

like image 358
seanbrant Avatar asked Dec 03 '25 19:12

seanbrant


1 Answers

Break it into three "sections". The first uses a Python API to manipulate the database. The second interfaces your REST API with your Python API. The third talks web and uses the Python API.

like image 136
Ignacio Vazquez-Abrams Avatar answered Dec 06 '25 08:12

Ignacio Vazquez-Abrams



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!