Hello all! I am a recent college grad looking to learn more about Modern REST API Architecture outside of work and I would love to hear the thoughts of this community! I am going to design and build a very simple application in order to learn. I am thinking that it would be cool to have a basic web interface (probably a simple React app), a database, and then a simple API endpoint (probably utilizing the Django Rest Framework). The app will obviously have the ability to persist data to the database and also run some sort of simple task utilizing the data. My current understanding is that there are two approaches.

Option 1: You lump it into one REST API Framework that handles all of this through various endpoints. Some endpoints can manipulate the database, others to run calculations, etc. My thought is that this is the “quick and dirty” way of doing it. One pro I see though is that the API is connected to the database and can easily get data for the user.

Option 2: You have two REST APIs. One to manage the DB, and the other to run calculations. I imagine this is the best for scaling and it will be better in the long run in a more realistic situation. It seems to rely more on the web interface for passing data around which also has its pros and cons. Do you allow the two APIs to communicate or does this get tricky with user handling?

I am very interested in everyone’s opinions! Please feel free to share any resources you have personally found useful!

Thank you!

submitted by /u/Magoots
[link] [comments]