Quantcast
Channel: Web services API architecture - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Web services API architecture

$
0
0

I've recently programmed a REST web service API that allows another website to sign-up for my website remotely.

I've programmed all the necessary validation and filtering in to the API.

My question is, should I now ensure that my own registration form uses the web service API when handling user registration?

The form itself already has the very same validation, but it would seem to be that it would be best if there is only one method that is ultimately responsible for validation/filtering.

That solution doesn't seem to be the best, either, though because I am now making a REST client to touch my own web services API from the exact same website.

The last solution that comes to mind is to put the validation on my user model, and throw an exception up the web services API when validation is triggered. Are there any downsides to this solution?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>