11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.it-ebooks.infoC H A P T E R 20• • •Web ServicesModern websites rarely work in isolation, instead often relying upon the data, capabilities, storagecapacity, and even computational power of third parties in order to create new and unique services.Websites such as Walk Jog Run (www.walkjogrun.<strong>net</strong>) and Woozor (www.woozor.com) are obviousexamples of this practice, relying notably on the Google Maps API and other third-party data sources toproduce compelling online tools. Millions of other websites similarly depend upon third parties.Sometimes this reliance isn’t always so obvious, as when sites use Amazon’s CloudFront service to hostwebsite images and other static files. Still others use these third-party services to seamlessly calculateshipping costs (see the United States Postal Service address and shipping tools atwww.usps.com/webtools) and fulfill orders (see Amazon FWS at http://aws.amazon.com/fws).These third-party solutions are collectively referred to as web services. This chapter introduces thetechnical underpinnings which make web services possible and shows you how to use <strong>PHP</strong> to startincorporating them into your development strategy right now. Specifically, the following topics arediscussed:Why Web Services? If you are new to the topic, this section briefly touches uponthe reasons for all of the work behind web services and how they are changing theWeb’s landscape.Really Simple Syndication: The originators of the World Wide Web had little ideathat their accomplishments in this area would lead to what is certainly one of thegreatest technological leaps in the history of humankind. However, theextraordinary popularity of the medium caused the capabilities of the originalmechanisms to be stretched in ways never intended by their creators. As a result,new methods for publishing information over the Web have emerged and arestarting to have as great an impact on the way we retrieve and review data as didtheir predecessors. One such technology is known as Really Simple Syndication, orRSS. This section introduces RSS and demonstrates how you can incorporate RSSfeeds using a great tool called MagpieRSS.SimpleXML: <strong>PHP</strong>’s SimpleXML extension offers a new and highly practicalmethodology for parsing XML. This section introduces this new feature and offersseveral examples demonstrating its powerful and intuitive capabilities.Why Web Services?Although the typical developer generally adheres to a loosely defined set of practices and tools, much asan artist generally works with a particular medium and style, he tends to create software in the way hesees most fit. As such, it doesn’t come as a surprise that although many programs resemble one anotherin look and behavior, the similarities largely stop there. Numerous deficiencies arise as a result of this411

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!