#14 Should you Web Designers REST on the job?
Sorry about not podcasting this. My microphone is in another office. Once I retrieve it, I will surely start the podcasts again, but for now, you can read my blog posts.
So, the question is: Should you web designers REST on the job? I think so, but I am not talking about the type of REST where you sleep.
REST (Representational State Transfer) is a very cool and easy to use technology and is used on Amazon’s affiliate program.
I was waiting for something like this, because in the old days, Amazon’s affiliate program was very clunky and full of flaws, but thanks to REST, the program has come a long way. When you added a book, you had to get all the garbage that came with it, all designed by Amazon. Each link resulted in an HTML <IFRAME> tag. Can you imagine little IFrames on a web page for each book? That is just ludicrous! That’s not at all what I wanted in an affiliate program. Plus, you had to add each one. That’s not good for SEO either.
Now, with REST, you simply throw over an URL, loaded with some GET name/value pairs and Amazon gives you back an XML file. This XML file contains all types of cool information about the books including cover images, reviews, retail price, and more. What you do with that XML is totally up to you.
I use PHP’s DOM methods at the Web Design Store to parse the XML, but you can use any language that you want. PHP has a cool function called GET_FILE_CONTENTS that will retrieve XML data from a URL.
Another REST application is Twitter’s API, You can visit my Twitter page at http://twitter.com/podcastwhoswho - With the Twitter API, you can send them a simple URL of the Twitter ID and they will send you back your comments…of course in XML, but hey, a little PHP or ASP or even XSLT can go a long way combined with SAX or DOM technologies.
Amazon’s web page has a great explanation of how to work with their REST API and they give you PHP examples as well. As a side note, if you are a SOAP whiz, then Amazon works with SOAP as well.
See you guys next time!
Bruce
Tags: amazon, html, Podcasts, rest, soap, web design, web services, web site design, xml, xslt
November 9, 2007 at 1:48 am
I am not a savvy web designer (I am a dreamweaver shop), but do you know if Dreamweaver supports this?
November 12, 2007 at 11:54 am
@Tricia - Dreaweaver will support it, because you can simply add a hyperlink to the URL. See Amazon and Twitter for the exact HTML that you need.
November 18, 2007 at 2:01 pm
Good article. That’s cool that Twitter offers it. Nice!
November 20, 2007 at 10:54 am
Good, bruce. I thought you were just telling us to rest on the job.
November 22, 2007 at 9:13 pm
I have been using the Amazon application where you give it a URL and it returns XML. I never knew this was called REST. Pretty Cool
November 23, 2007 at 3:25 am
@Moyulid Samtik - Yup, that’s what it is called.
November 23, 2007 at 3:25 am
@Michelle Griffen - I take it you are a Twitter user?
November 23, 2007 at 3:26 am
@Steven Haster - No way. We web designers never rest on the job.