This new tutorial from the Developer.com website talks about integrating a Zend Framework application with the Amazon Web Services (by Jason Gilmore).
In this tutorial, I'll show you how to use the Zend Framework's Zend_Service_Amazon component to retrieve product data from Amazon.com's product database. Although the focus of the tutorial will be video games, you can easily adapt what you learn here to any of the dozens of other product categories, whether it's gourmet food, tools, toys, or books!
You'll need to already have a Amazon web services account as well as an installed and working Zend Framework distribution to be able to follow along. He shows how to search by ASIN, title and how to query using the alternative Query API to pull the item information (including images).
Dave Marshall, a developer from Hull, England, has posted a few recommendations he thinks could help you land that next PHP job.
After reading this thread, I thought I'd spend some time writing about what I feel are some measures you can take to landing a job in PHP. This first part is going to concentrate on the kind of technical matters I think any PHP developer should at least have knowledge of, if not some kind of experience.
He suggests: as much programming experience as possible, experience with the full development lifecycle, knowing how to work with external libraries and frameworks, being able to adapt to development tools, knowing web application security, and some work with web services and a touch of system administration. He's not saying that you have to have all of these - just that the more you know, the better off you could be.
On the Ibuildings blog today Lorenzo Albertontakes a look at the Zend Framework, specifically as to how it can mimic regular HTTP calls with the built-in components.
One of the unit testing best practices suggests to break dependencies, so you can test each component separately. The first problem that arises when you want to test controllers might be having a tighter control over the HTTP Request and Response objects.
This problem is overcome with the Zend_Test_PHPUnit_ControllerTestCase. The second problem it with calls to external resources (like models/databases or web services). This is the prime focus of the post and seceral blocks of code are included to make a class to emulate the HTTP responses you might get back from the service.
Douglas Brown has put together an announcement for a web service he's come up with (and made available for download) to make a tag cloud out of the top keywords from your twitter feed.
The problem I was having was actually judging whether or not it would be worth my time following their tweets. I mean, I follow someone that is really respected in a certain field, only to find out that they tweet about their new puppy they just got more than anything. So I made a PHP script that generates a "Twitter Tag Cloud." Using this, you can generate your own Twitter tag cloud to put on your personal site to display the top keywords that you have been tweeting about.
You can either check out an example of the cloud through the form in the post, use his REST service to get the keywords for a user or you can download his code and try it out for yourself.
For a recent REST web service project, Lorna Mitchell had to put together a server for the remote clients to use. She started with a GET request then moved to handling a POST request then to a PUT request - that's where the difficulty came in:
PHP doesn't have a built-in way to do this, and at first I was a little confused as to how I could reach this information. It turns out that this can be read from the incoming stream to PHP, php://input.
Pulling from that stream gave her the raw data she needed (nicely urlencoded too) that she could parse out and use. She includes a simple example that has a check for the REQUEST_TYPE in the _SERVER superglobal to see how the request should be handled (PUT versus GET).
This new post on the PHP::Impact blog talks about the enterprise level web service framework for PHP, an implementation of WS02 for PHP - WS02 WSF/PHP.
It is the only PHP extension that supports a wide range of WS-* specifications. With the framework enabling the use of PHP in SOA implementations, WSO2 WSF/PHP is the ideal extension for integrating PHP legacy systems into enterprise SOA.
Federico notes some of the features of the framework including secure services/clients, binary attachments, automatic WSDL generation and interoperability with .NET and J2EE. You can find more information on the project at its page on the ws02.org site.
On the C7Y website, a new tutorial has been posted from Nate Abele (following his previous CakePHP-related article) covering the use of the framework to create a REST web service and manage resources inside of it.
We're going to take these concepts [from the previous article] further and add a new one: REST. In the course of this series so far, we've only been discussing how to use the Router to examine and act on different parts of a URL.
He gives a list of possible headers that could come from a client (like Accept-Charset or Content-Type) and how these can be directly pulled in to the CakePHP routing system. A few extra bits of code later and your app can be mapping requests directly to the controllers for the actions the user's requesting. All that's left is to serialize the results back into XML to echo out.
The IBM developerWorks website has a new tutorial posted showing how to create a web service with the combination of PHP and the Eclipse IDE.
Learn how to build Web services in PHP using the PHP Development Tools plug-in in Eclipse Europa. Become familiar with the PDT project, and learn how to create and deploy useful PHP projects, learn about the philosophy behind contract-first development, and understand the basic parts that make up a Web Services Description Language (WSDL) file.
You'll have to register/sign in to get to it. They give an introduction to the PHP Development Tools for Eclipse, creating a WSDL file visually in the IDE and integrating it all to work with your Eclipse front-end.
Whether you're an enterprise developer working in a large shop or setting up a blog for yourself, you've almost certainly been tasked with keeping your development code in sync with some type of stable release. Whether a project is big or small, you still need to ensure that the core code you work with remains consistent.
The tutorial walks you through the setup of a basic AIR application, how to pull the configuration XML into it and parsing it to use in the interface. The next step is the sync, grabbing your config and pushing it out to other multiple configs across your sites (via a REST service).
Korynn Bohn has posted a new tutorial/article on the Zend Developer Zone website that talks about (and advocates for) web services.
Web services are the coolest technology I know of that ends up turning everyone off. I don't know about you, but when I go to a lecture on Web services, invariably tons of acronyms come out [...] and then I start to nod off and dream about a land where free Krispy Kreme donuts grow on trees.
He reframes the web services world away from the acronyms and strict standards to more towards using it as a method of communication between apps, letting them engage in some friendly conversation. He uses the rest of the tutorial showing how to create an RSS reader of sorts using dashes of PEAR, XML, C#, XSLT, Ajax and Flex.