Posts Tagged rest

AMF,XMLRPC,JSON,REST Zend Web Services Tutorial

I’ve been using the Zend for the last few months and I’m loving it. Here at work we were having a discussion about implementing some web services in the future so I decided to see what it takes to create some web services in PHP using Zend. I was pleasantly surprise (well not really surprised) that it was extremely quick and easy to get things up and running.

In this post, I’m going to explain how to create web services that can be accessed via AMF, XMLRPC, JSON, and REST using the Zend Framework. Hopefully these should cover most uses out there. I left SOAP out since I don’t really see myself using it any time soon. I will be communicating with a database as well to make the tutorial more informative. The db will consist of one table with information about courses such as mathematics courses.

I’m going to show you the final product first, hopefully to catch your attention so you’ll read the rest :). This is what the final product will look like. If you look at the following links in Chrome, do a view source to see the formatted response.

XMLRPC

One course:  http://www.joeyrivera.com/ZendWebServices/xml-rpc/course-info/abbr/math101/
All courses:  http://www.joeyrivera.com/ZendWebServices/xml-rpc/courses-info/

JSON

One course:  http://www.joeyrivera.com/ZendWebServices/json/course-info/abbr/math101/
All courses: http://www.joeyrivera.com/ZendWebServices/json/courses-info/

REST

One course:  http://www.joeyrivera.com/ZendWebServices/rest/course-info/?method=getCourseInfo&abbr=math102
All courses:  http://www.joeyrivera.com/ZendWebServices/rest/courses-info/?method=getCoursesInfo

AMF

One course:  http://www.joeyrivera.com/ZendWebServices/amf/course-info/abbr/math101
All courses:  http://www.joeyrivera.com/ZendWebServices/amf/courses-info/ Read the rest of this entry »

Tags: , , , , , , ,

Atlanta PHP User Group – 11/06/2008

So I attended my first Atlanta PHP user group thanks to Moses nagging me about going :p. I’m glad I went, I had a great time. I really enjoyed being there listening and even sharing a little. The things I took with me that I’m going to mention are:

Atlanta Startup Weekend
During the meeting I found out about this really neat event. The objective of the Atlanta Startup Weekend is to get a bunch of people together, divide them into groups (developers, marketing people, business people, etc) and in one weekend finalize a product from a concept. Tickets are already sold out so I’ll have to try for next year. I’m sure I could learn a lot.

PHP Wiki
I didn’t know about this page: http://wiki.php.net/. You can get lots of neat information from the PHP group. The rfc (request for comments) section is also very informative. You can see what requests have been made, which request are going to be implemented and which have already been implemented. It’s a good way to stay ahead of the curve since you would know what’s coming out before it’s out.

REST
Don’t quote me on any of this, this is just bits and pieces that I think I gathered from listening to others talk. If I understand correctly, REST is a standard for creating RESTful url/url/web services that are efficient and scalable… maybe? I heard REST mentioned a lot during the <head> conference a couple weekends ago and I heard it mentioned a few times last night during this meeting. So, now I need to go do some more research and figure out what this REST thing is all about. Seems like it’s something worth knowing about and maybe even following? If you have any info or resources you can recommend please do.

Tags: , , , , ,