Zend certified PHP/Magento developer

Are Rest API’s built separately or simultaneously with the program?

This isn’t specific to any application but a general question. I am learning about API’s.

Say I’ve to build an app that has many CRUD operations. I build the entire thing using PHP and it works fine on a web browser.

Now this very program has to built as an Android app.

Does the Rest API that is required to build the Android app need to written separately or should it done when the web version was being built?

Or to frame it another way. Is the Rest API code completely different from the web version? As in there is no connection (apart from accessing the same database) between the two?

Another question,

Is there any boilerplate template that is used while building the Rest API or is everything written from scratch?

submitted by /u/fbenmart
[link] [comments]