 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Joseph Crawford's Blog: ZF Creating RESTful Applications
by Chris Cornutt March 10, 2010 @ 08:50:25
Joseph Crawford has a new post to his blog today with a look at his use of the Zend_Rest_Controller and Zend_Rest_Route components of the Zend Framework to create a simple REST service.
You might be asking yourself why do I have to use both components, why is it not rolled into one nice component. The answer is really basic and if you look at the source code for the Zend_Rest_Controller you will see that it is solely an abstract class that defines the methods required for use with the Zend_Rest_Route.
He includes the code to add to your bootstrap file to get the routing working and a sample controller (MyController) that extends the Zend_Rest_Controller and sets up some basic actions - get, put, post and delete. He does mention one issue he's coming across in a feature he's wanting to add - putting the version number of the API in the URL for easier separation.
voice your opinion now!
rest application tutorial zendframework
Matthew Weier O'Phinney's Blog: Responding to Different Content Types in RESTful ZF Apps
by Chris Cornutt March 05, 2010 @ 12:20:22
Continuing on from his previous articles on working with REST in Zend Framework applications (and making the endpoints for a web service) Matthew Weier O'Phinney has a new tutorial with the next logical step in the series, automatically responding to different content types in your application based on the content-type the client sends.
There's no reason you can't re-use your RESTful web service to support multiple formats. Zend Framework and PHP have plenty of tools to assist you in responding to different format requests, so don't limit yourself. With a small amount of work, you can make your controllers format agnostic, and ensure that you respond appropriately to different requests.
He talks about concerns you'll have to worry about when developing your service - grabbing teh raw input instead of the POST values (since most requests will be rawly POSTed) and what to pass that message to to decode it properly. In his example the Zend_Json and Zend_Config_Xml components make it simpler to handle the info and some code to get the results back into your script.
There's also some code for the other side of things - building the response and pushing it out to the correct views depending on the request content type, action and information.
voice your opinion now!
zendframework rest webservice contenttype json xml tutorial
NETTUTS.com: Working with RESTful Services in CodeIgniter
by Chris Cornutt February 04, 2010 @ 13:03:58
Phil Sturgeon has posted a new tutorial over on the NETTUTS.com site about working with REST services in CodeIgniter. He shows both sides of things - using REST services and making them.
CodeIgniter is becoming well known for its power as a PHP based web application framework, but it's not often that we see examples of it being used for anything else. Today we'll learn how we can use CodeIgniter to create a RESTful API for your existing web applications, and demonstrate how to interact with your own API or other RESTful web-services, such as Facebook and Twitter.
He has the sample code hosted over on his github account where you can pull down the source and follow along from the beginning. His application is created to be flexible enough for multiple output formats (xml, json, html) and respond correctly to the HTTP request types like GET, POST, PUT, DELETE. On the other side he shows how to consume the services via different methods like file_get_contents and cURL.
voice your opinion now!
rest webservice codeigniter tutorial consume create
Zend Developer Zone: Integrating Flickr Photostreams with PHP
by Chris Cornutt February 04, 2010 @ 12:22:46
On the Zend Developer Zone there's a new tutorial showing you how to integrate your application with Flickr with some help from components in the Zend Framework.
Like many Web 2.0 applications, Flickr exposes its data to the public via a REST API, making it possible to develop customized applications that run on top of the base service. This REST API allows access to a number of important functions, including photo searching, tagging and uploading; photoset retrieval; contact retrieval; and panda recommendations.
The tutorial uses the Zend_Rest_Client component of the Zend Framework to make the actual request to the Flickr API and you'll need a API key/shared secret to be able to use it. The rest of the tutorial is code dedicated to helping you connect to the service, fetch data, search the API (and output the results), and looking at some of the "interestingness" magic Flickr has to share.
voice your opinion now!
flickr photostream api zendframework rest
Gonzalo Ayuso's Blog: Building a simple HTTP client with PHP. A REST client
by Chris Cornutt January 18, 2010 @ 10:18:20
Gonzalo Ayuso has posted a guide to creating a simple HTTP client, one that can work with REST-based interfaces.
There are several PHP libraries, even a nice PHP extension to work with CouchDB. I like Zend Framework's REST client but as exercise I will develop a HTTP client. My idea is to create a simple class that allows me to perform GET, POST and DELETE requests to a remote server.
He wants to be able to use the script in a fluent interface that would let him define the server, post and action all in one simple call. He includes the code to create a factory function he can get a new connection from, functions for each of the actions (get, post, delete) and the main function that handles all of the cURL connections (and a simple HttpExceptions class to handle any errors thrown).
voice your opinion now!
rest http client curl tutorial
TechChorus Blog: Create RESTful Applications Using The Zend Framework
by Chris Cornutt November 18, 2009 @ 11:09:32
New on the TechChorus blog there's a quick tutorial from Sudeer looking at making a RESTful web service with the Zend Framework.
The Zend Framework 1.9 release added a new feature - Zend_Rest_Controller. Zend_Rest_Controller and Zend_Rest_Route classes go hand in hand. In the previous versions of the Zend Framework, we have had the Zend_Rest_Server component. We still have. [...] In this article let us explore how to make use of Zend_Rest_Route and Zend_Rest_Controller to build a RESTful server application. Zend_Rest_Route routes the request to the appropriate module, controller and action depending on the HTTP request method and URI.
Written on the base of the quickstart project from the Zend Framework tutorial site, they create a simple REST service that handles the get, put, post and delete requests through a series of methods in the controller. A response is hard-coded for each and a few examples of how to call the service via curl commands.
voice your opinion now!
rest tutorial zendframework webservice
Matthew Weier O'Phinney's Blog: Building RESTful Services with Zend Framework
by Chris Cornutt November 09, 2009 @ 11:48:28
Matthew Weier O'Phinney has posted a "second part" of a group of articles he's doing on web services with the Zend Framework. In this new blog post he gets into more detail on setting up REST interfaces for your applications.
At its heart, REST simply dictates that a given resource have a unique address, and that you interact with that resource using HTTP verbs. [...] What the REST paradigm provides you is a simple, standard way to structure your CRUD (Create-Read-Update-Delete) applications. Due to the large number of REST clients available, it also means that if you follow the rules, you get a ton of interoperability with those clients.
He shows how to create a simple REST server with the Zend_Rest_Route package and touches briefly on the proper way for your script to respond to a request.
voice your opinion now!
rest webservice zendframework
Ibuildings techPortal: Grokking the REST Architecture
by Chris Cornutt September 15, 2009 @ 13:39:37
On the Ibuildings techPortal website today they've released the latest episode in their series of talks given at this year's Dutch PHP Conference. This episode is a talk from Ben Ramsey about REST architecture.
Forget what you thought you knew about REST. In this talk, Ben Ramsey reintroduces REST, placing it under a microscope, uncovering each constraint that forms REST's crucial principles. Ramsey explains how REST is a style for network-based software applications, emphasizing scalability and efficiency through separation of concerns and taking advantage of the Web as a platform for rich Internet applications.
You can listen via the in-page player (complete with the slides) or you can download the mp3 directly to listen to whenever you'd like.
voice your opinion now!
dcp09 podcast rest benramsey
Community News: Easyrest Freamwork 1.0 Released
by Chris Cornutt August 20, 2009 @ 12:02:07
According to this new entry to the devturk blog, the stable (1.0) version of the Easyrest framework has been released.
Easyrest is a REST framework that contains client and server implementations.It has a easy structural data transfer unlike XML-RPC.Easyrest use a lot of pear packages and it has got custom apikey functionality.I think using the pear libraries is not a disadvantage because of you don't have to install required pear libraries, easyrest can work from its own custom pear directory without any pear installation.
The framework has got a custom API key functionality.User can assign client ids and API keys. It send raw data for HTTP Requests so it makes request very fast. The post includes plenty of examples for use on both the client and server side (including output).
voice your opinion now!
easyrest rest client server
|
Community Events
Don't see your event here? Let us know!
|