NYCPHP Meetup

NYPHP.org

[nycphp-talk] RESTful PHP Frameworks/Libs

Ben Sgro (ProjectSkyLine) ben at projectskyline.com
Wed Nov 28 20:25:57 EST 2007


All, 

Let me be more vague. I'm looking for php code for routing, request handling, 
response generation that I can use to see how others have done REST in php.

Something, somewhere in the app I'm working on has to route incomming requests
to the appropriate place. I've seen sample code in ruby and java. Its not complicated,
but I want to see how others have done it in PHP and also the verbage and directory
structures they are using. And just overal architecural guidelines to construcing RESTful
applications.

I just finished the ORLY REST book and I've read a bunch of other REST papers.
I just started fieldings' disseration as well.

I will checkout Zend's REST. Thanks.

Side note: I'm pretty sure that sessions break RESTfulness.

- Ben
  ----- Original Message ----- 
  From: Rob Marscher 
  To: NYPHP Talk 
  Sent: Wednesday, November 28, 2007 4:54 PM
  Subject: Re: [nycphp-talk] RESTful PHP Frameworks/Libs


  On Nov 28, 2007, at 4:32 PM, Ben Sgro (ProjectSkyLine) wrote:
    I'm going to be building a RESTful php application and wanted to know if anyone
    has done so and what frameworks or library's they have used. This is purely a web
    service, no UI at all, so I don't think a full blown framework w/views is necessary.

    A nice REST library for handling HTTP request's and responses is what I'm looking
    for.


  The webserver handles implementing most of what's required for a RESTful interface.  So... you don't exactly need a framework.  Just do the appropriate thing on GET/POST/PUT/DELETE requests (which you can determine from php's $_SERVER array).  


  However, you could check out Zend/Rest/Server.php in the Zend_Framework.  I haven't used it... but I just glanced through the doc and it looks pretty nice:
  http://framework.zend.com/manual/en/zend.rest.server.html


  It doesn't provide a framework for authentication or data persistence via a token or anything (like the way the Amazon API works, for example).  Not sure if you need that.  It's kind of questionable whether or not it's still a RESTful service in that case (as Rusty would be sure to point out, I'm sure given that previous discussion about sessions).


  -Rob


------------------------------------------------------------------------------


  _______________________________________________
  New York PHP Community Talk Mailing List
  http://lists.nyphp.org/mailman/listinfo/talk

  NYPHPCon 2006 Presentations Online
  http://www.nyphpcon.com

  Show Your Participation in New York PHP
  http://www.nyphp.org/show_participation.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071128/2f721c2a/attachment.html>


More information about the talk mailing list