Hard Prerequisites |
IMPORTANT: Please review these prerequisites, they include important information that will help you with this content. |
|
Django is great and all but the frontend it renders using views and templates is a little bit limited.
Imagine our airbnb clone becomes super duper popular and there is a business decision to invest in different kinds of frontends.
For example maybe the decision is made to use Ionic to build a cross-platform hybrid frontend. Or maybe React will be used to make a pwa. Or any number of other things.
By exposing nice clean APIs, we “decouple” our django app from the frontend. That gives us a lot of freedom in the tools we use.
Can you think of other situations where exposing APIs would add flexibility to our application?
We have 2 main kinds of users. Supply users and Demand users. On the supply side we have people who own property and try get it rented out. On the demand side there are people who need a place to stay.
We’re going to focus on the demand side now. The reasons for this are:
Expose a bunch of apis in order to allow travelers to do everything they need to do. This includes: