Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am developing an app in Android, i need get information from a external database in mysql and i read about Rest..

REST is using HTTP verbs GET, POST, PUT, DELETE to respectively get, insert, update, delete resources on a server. E.g. GET with url: controller/customer/{id}

But why not use a simple Php ? is really necessary to use REST?

i dont understand why i must use Rest if a simple PHP will do the same.

Rest with php is a RESTFul?

share|improve this question

closed as unclear what you're asking by gnat, Bart van Ingen Schenau, GlenH7, Robert Harvey, Glenn Nelson Dec 13 '13 at 14:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

I dont think you understand the terminologies correctly. PHP is a programming language. REST is a method of interacting with remote servers. You cant replace REST with PHP because they are two different things. Are you really asking why REST vs a plain HTTP request? –  GrandmasterB Dec 6 '13 at 19:00
"Rest with php is a RESTFul?" This question made me laugh. –  stimpy77 Dec 6 '13 at 19:04
@stimpy77: I never found working in PHP restful. It usually made me wish I could take a break and rest... ;) –  FrustratedWithFormsDesigner Dec 6 '13 at 19:12
Are you asking this because you think REST is a programming language like PHP or are you asking because you can't see why you would want to GET /customer/{ID} instead of using CGI arguments like /customer.php?id={ID} ? –  Sean McSomething Dec 6 '13 at 19:12
probably he means a simple php request to a url. in the real world most of webservice does not implement rest as it was concepted. just see google api's. –  albanx Dec 4 at 23:43

1 Answer 1

PHP is a programming language.

REST refers to architectural guides for building web services.

The decision to use PHP and the decision to create a REST-based web service are completely independent of each other. RESTful services can be implemented in Java, C#, PHP, Ruby, any language you can run on a server. PHP can be used to write a program that calls RESTful services developed by other people - if someone else chooses to build a service that you need to use and it is RESTful, you may not have much choice in how you interact with it, even if you personally don't like REST.

For more about REST vs. SOAP, see here http://searchsoa.techtarget.com/tip/REST-vs-SOAP-How-to-choose-the-best-Web-service

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.