Graphics Programs Reference
In-Depth Information
Web Services
Your handy web browser uses the HTTP protocol to communicate with a web server. In the
simplest interaction, the browser sends a request to the server specifying a URL. The server
responds by sending back the requested page (typically HTML and images), which the
browser formats and displays.
In more complex interactions, browser requests include other parameters, like form data.
The server processes these parameters and returns a customized, or dynamic, web page.
Web browsers are widely used and have been around for a long time. So the technologies
surrounding HTTP are stable and well-developed: HTTP traffic passes neatly through most
firewalls, web servers are very secure and have great performance, and web application de-
velopment tools have become easy to use.
You can write a client application for iOS that leverages the HTTP infrastructure to talk to
a web-enabled server. The server side of this application is a web service . Your client ap-
plication and the web service can exchange requests and responses via HTTP.
Because the HTTP protocol doesn't care what data it transports, these exchanges can con-
tain complex data. This data is typically in XML or JSON (JavaScript Object Notation)
format. If you control the web server as well as the client, you can use any format you like;
if not, you have to build your application to use whatever the server supports.
In this chapter, you will create a client application that will make a request to the smart-
feed web service hosted at http://forums.bignerdranch.com . You will pass a
number of arguments to this service that determine the format of the data that is returned.
This data will be XML that describes the most recent posts at our developer forums.
Starting the Nerdfeed application
Create a new Empty Application for the iPad Device Family. Name this application Nerd-
feed , as shown in Figure 25.3 . (If you don't have an iPad to deploy to, use the iPad simulat-
or.)
Figure 25.3 Creating an iPad Empty Application
 
Search WWH ::




Custom Search