Roll Your Own: Browsers, Maps, and Email

As you've seen, your app's talents should reflect an undistracted focus on its primary task, and you should bring a jaded eye to feature-creep additions that aren't strictly necessary to that mission. But don't allow tunnel vision to blind you to secondary features that are such natural extensions of your app's main gig that their absence grates. The usual suspects here are browsing the web, exploring maps, and sending email. When roundtrips to Safari, Maps, and Mail begin to pile up, it's best to bring those features in-house.

The main mission of a Twitter app, for example, is to let you read and post status updates, but those tasks don't alone describe the primary motivation for using Twitter. People use Twitter to keep up with and share what's happening, and that news often comes in the form of a web link. Browsing the web is an essential secondary task for browsing a Twitter stream, and launching Safari for every link would simply make a Twitter app feel broken. Similarly, the main job for apps that help you find nearby restaurants or drinking holes is to show you their names, addresses, and perhaps some brief descriptions or reviews. But the inevitable follow-on task is to see the best candidates on a map, or to email the info to friends you plan to meet there. In all of these scenarios, the secondary tasks are important and frequent enough that you shouldn't link to other apps for them. Instead, trigger a new screen or modal view within your app to handle browsing, mapping, or mailing.

The good news is that the iPhone's code toolkit makes it relatively painless for developers to add lightweight web, map, and email features to your app. Here are the building blocks:

Home brew can be weak broth, though. Web views and map views give developers the raw materials to build a web browser or map feature, but they don't come with the full-blown controls that you get with Safari or Maps. A web view, for example, doesn't include bookmarks, back/forward buttons, search bar, address bar, or any of the familiar controls you expect from a "real" web browser. If you want those, you have to build them yourself, but it's usually just fine to do without. Apart from adding back/forward buttons to a web view to enable very basic navigation, you should typically stick to the basic goal of offering just a quick glimpse at the requested content. Ditto for maps: don't feel obliged to create a full set of tools for search and getting directions—your job here usually stops at showing a simple location.

You certainly can do more. The iPhone's WebKit and MapKit frameworks give developers everything they need to build a full-fledged browser or mapping app, and it can be as complex as you like. Adding advanced features may make sense if web and location-based activities are your app's main mission. When it's a secondary add-on, though, keep it very simple. Give your audience the bare minimum to get what they need. For more than that, let your neighborly instinct return: your simple web browser should offer the option to open the page in Safari, and your home-grown map should likewise let people view the location in Maps.

In Gowalla, when you find a "spot" that you want to visit (left), tapping "Details & Map" takes you to a screen with a map view showing the location (middle). For directions and other fancy features, the screen offers a Get Directions button, which passes you over to the Maps app (right).

Figure 11-7. In Gowalla, when you find a "spot" that you want to visit (left), tapping "Details & Map" takes you to a screen with a map view showing the location (middle). For directions and other fancy features, the screen offers a Get Directions button, which passes you over to the Maps app (right).

You naturally focus (perhaps obsessively) on the details of your own app, and you're right to polish and shine every last feature. At the same time, be mindful of neighboring apps that are just a tap away and consider how your app might collaborate with them. Your job as an app designer is to make your audience's lives easier, more fun, more productive—and part of that is understanding how your app might fit in with the other tasks the iPhone handles. Find new ways to fill the cracks other apps don't address, or be bold enough to create an entirely new category of your own. Be creative!