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:

  1. is approach sensible?
  2. are there frameworks me this?
  3. how handle authentication?
  4. does have affect on scalability?

the answers questions -

  1. yes possible , in fact makes perfect sense me.
  2. yep. using django web , djano-rest-framework rest api. both in same project , share same model , querysets. web url normal , api url starts /api
  3. for web use normal session based authentication, rest api use token authentication
  4. so far no. both web , api works me. deployed in 3 production environment.

links -

django

django-rest-framework


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -