News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

William Durand:
REST APIs with Symfony2 The Right Way
August 02, 2012 @ 12:03:24

In this new post to his site William Durand looks at creating a RESTful API with the help of the Symfony2 framework.

Designing a REST API is not easy. No, really! If you want to design an API the right way, you have to think a lot about everything, and either to be pragmatic or to be an API terrorist. It's not just about GET, POST, PUT, and DELETE. In real life, you have relations between resources, the need to move a resource somewhere else (think about a tree), or you may want to set a specific value to a resource. This article will sum up everything I learnt by building different APIs, and how I used Symfony2, the FOSRestBundle, the NelmioApiDocBundle, and Propel.

It's a long post and covers things very completely with plenty of code samples and descriptions showing you how to use these pieces to make the API. He covers the major HTTP verbs (GET, POST, PUT & DELETE) as well as one of the lesser used ones - PATCH. He also looks at the HATEOAS documentation method and a brief look at using a simple client to do some testing.

0 comments voice your opinion now!
symfony2 api rest tutorial bundle patch


blog comments powered by Disqus

Similar Posts

Phil Sturgeon's Blog: Composer with CodeIgniter

Gonzalo Ayuso's Blog: Watermarks in our images with PHP and mod_rewrite

PHPit.net: An Introduction to the Winbinder Library (Part 1)

NetTuts.com: Building With the Twitter API: Using Real-Time Streams

HowToForge: How To Install a Complete LEMP on Ubuntu/Debian


Community Events

Don't see your event here?
Let us know!


podcast opinion laravel5 series wordpress conference framework interview release voicesoftheelephpant introduction community laravel development language api psr7 extension unittest library

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework