I am trying to create a API based service using Symfony2 which is the main framework our company tends to work on. I am told to research the best way to create a web service, i.e: REST, SOAP, etc. I am not a very experienced programmer. I am just trying to research the subject matter.
What we basically need is a system that would provide and API to make other apps on any platform or device. For example: I can use the Twitter API to post/fetch tweets. In the same way we are trying to create a E-comm product that would help other users to build sites and apps above the platform regardless of the programming language, device or OS.
We are trying to convert our product into an API based service from a pure "MVC application".
There are many great frameworks that can help you build REST APIs quickly. Laravel/Lumen and Symfony's API platform are the most often used examples in the PHP ecosystem. They provide great tools to process requests and generate JSON responses with the correct HTTP status codes.
What is Symfony? Symfony is a PHP framework used to develop web application, APIs, microservices and web services. Symfony is one of the leading PHP framework for creating websites and web application.
Check the this article REST APIs with Symfony2: The Right Way by William Durand about Designing a REST API.
I think the best repo you could look at is at:
https://github.com/lsmith77/symfony-rest-edition
this is a tutorial
http://welcometothebundle.com/symfony2-rest-api-the-best-2013-way/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With