Online Book Reader

Home Category

iOS Recipes - Matt Drance [1]

By Root 226 0
we don’t have to sort all of these things out on our own. Matt and Paul—the authors of this book—have assembled a set of examples and incorporated the latest, most current iOS software development best practices in this book of recipes. The result gives you a great set of specific solutions to targeted problems that you can dip in and out of as the need arises.

It’s better than that, however. Even though this book is a collection of discrete sections that can stand on their own quite well, reading straight through them all gives more than a few valuable insights into how Matt and Paul approach their craft. As I read through a beta draft of the book myself, it felt much the same as watching some of my favorite chefs making good food in their kitchen and learning from the way they approached the task at hand, even the simple tasks that I thought I already had mastered.

So, pull up a chair. Join two of my favorite iOS developers and learn a few things. Then, go out and make the kind software you could only dream about a few years ago.

James Duncan Davidson

April 2011


Copyright © 2011, The Pragmatic Bookshelf.

Introduction

Your goal as a programmer is to solve problems. Sometimes the problems are hard, sometimes they’re easy, and sometimes they’re even fun. Maybe they’re not even “problems” in the colloquial sense of the word, but you are there to discover solutions.

Our goal as authors is to help you solve your problems better and more quickly than before—preferably in that order. We decided to write a recipe-style book that focuses on a specific set of tasks and problems that we attack explicitly, rather than discuss programming issues at a high level.

That’s not to say we’re not about educating in this book. The blessing of a recipe book is that it gives you trustworthy solutions to problems that you don’t feel like discovering on your own. The curse of a recipe book is that you might be tempted to copy and paste the solutions into your project without taking the time to understand them. It’s always great to save time by writing less code, but it’s just as great to think and learn about how you saved that time and how you can save more of it moving forward.

If you are familiar with the iOS SDK and are looking to improve the quality and efficiency of your apps, then this book is for you. We don’t teach you how to write apps here, but we hope that this book helps you make them better. If you’re more of an advanced developer, you may find that you save yourself time and trouble by adopting some of the more sophisticated techniques laid out in the pages that follow.

We wrote many of these recipes with maximum reusability in mind. We weren’t after demonstrating a technique or a snippet of code that simply gets the job done. Instead, we set out to build solutions that are ready for you to integrate into whatever iPad and iPhone projects you’re working on. Some might find their way into your projects with zero changes, but you should feel free to use this recipe book as you would a traditional cookbook. When cooking food from a recipe, you might add or remove ingredients based on what you like, or need, in a meal. When it comes to your own apps and projects, this book is no different: you are invited to extend and edit the projects that accompany these recipes to fit your specific needs.

The recipes in this book help you get from start to finish, but we hope they also encourage you to think about when and why to choose a certain path. There are often multiple options, especially in an environment like Cocoa. With multiple options, of course, come multiple opinions. In the interest of consistency, we made some decisions early on about certain patterns and approaches to use in this book. Some of these techniques may be familiar to you, some may be employed in a way you hadn’t considered, and some may be brand new to you. Regardless, we’d like to explain some of our decisions up front so that there are no surprises.

2.1 Formatting and Syntax

We had to format a few code snippets in this book to fit the page. A

Return Main Page Previous Page Next Page

®Online Book Reader