Building the URL

Communication with servers is done via requests. A request encapsulates information about the interaction between the application and the server, and its most important piece of information is the destination URL.

In this section, you will build up the URL for retrieving interesting photos from the Flickr web service. The application will be built with an eye to best practices. For example, each type that you create will encapsulate a single responsibility. This will make your types robust and flexible and your application easier to reason about. To be a good iOS developer, you need to not only get the job done but also get it done thoughtfully and with foresight.

Formatting URLs and requests

The format of ...

Get iOS Programming: The Big Nerd Ranch Guide, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.