The balance between client and server functionality

Posted by Eugen Martynov on Programmers See other posts from Programmers or by Eugen Martynov
Published on 2013-10-22T11:02:57Z Indexed on 2013/10/22 16:02 UTC
Read the original article Hit count: 213

I want to bring the discussion that started in our teams and get your opinion about it.

Assume we have an user account which could have different credentials for authentication and associated email to recover. An user has possibility to do signup with an email or use his social profile to complete signup process.

As an Rest API from the backend to client looks like:

  1. Create account
  2. Authorise
  3. Update user data
  4. Link social account
  5. Register email
  6. Verify email

In addition our BE is distributed and divided between several services/servers/clusters. So different calls are related to different end points.

In case of the social sign up some of steps should be skipped or simplified. For example, with Facebook signup we could already skip email registration and verification step (we ask email permission form user), linking the social account and pre-fill user displayed name. So we proposed to have another end point which will hide/combine different calls on BE and return whole process result to the clients.

The pros for this approach:

  1. No more duplication of functionality between clients
  2. Speed up the networking and user experience

The cons for this approach:

  1. Additional work for backend
  2. Probably most complex scenarios in future updates

I would like to get your opinion or experience with this situation. Especially if you already experienced point #2 from against reasons.

© Programmers or respective owner

Related posts about design

Related posts about architecture