News Feed
Sections




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

Raphael Stolt's Blog:
Teaching the Zend REST server to talk JSON
June 04, 2007 @ 07:55:00

Raphael Stolt has posted a guide for those developers using the REST component of the Zend Framework to get it up and running, but transmitting JSON messages instead.

As I was unhappy that the Zend Framework REST server per default only responds in POX(Plain old XML), a bend over from XML to the 'fat-free' JSON format was favoured to reduce the client sided parsing effort. The first part of this article will guide you through the creation of the responsive part of a RESTful public API and continue to travel the path to achieve the articles purpose.

He starts with a brief overview of what a RESTful resource would look like and a sample structure before getting into the code. Then, it's on to the structure of the service, including the config file settings. Next comes to logic behind the service - in this case it's a service to get the list of albums from a "shelf". The response from this is an XML document (from the Zend_Service component) that he pushes through a custom JSON package to output a fully formatted JSON message of the same information.

0 comments voice your opinion now!
json rest server webservice zendframework component json rest server webservice zendframework component


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: PHP Abstract Podcast Episode 12: Introduction to Service Component Architecture

PHPImpact Blog: Dependency Injection in Zend Framework

Gonzalo Ayuso: Working with AngularJS and Silex as Resource provider

Padraic Brady's Blog: The Zend Framework and Microformats: Zend_Microformat Proposed

CakeBaker: Use components from the Zend Framework with CakePHP


Community Events

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


podcast application conference example community interview release composer laravel series symfony2 configure voicesoftheelephpant framework api performance part2 php7 introduction opinion

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