php - Creating a centric REST API for a mobile and website application -
my next project requires me develop both mobile , website application. avoid duplicating code, i'm thinking creating api both of these applications use.
my questions regarding are:
- is approach sensible?
- are there frameworks me this?
- how handle authentication?
- does have affect on scalability?
the answers questions -
- yes possible , in fact makes perfect sense me.
- yep. using
django
web ,djano-rest-framework
rest api. both in same project , share samemodel
,querysets
. web url normal , api url starts/api
- for web use normal session based authentication, rest api use token authentication
- so far no. both web , api works me. deployed in 3 production environment.
links -
Comments
Post a Comment