Preface

With over 200,000 apps (and counting every second) available for download at the whim of its users, Apple's App Store affects all walks of life. The effect of Apple's "There is an app for that" catchphrase definitely cannot be ignored. Believe it or not, I had been using my iPad to finish many parts of this book while sitting on my couch during the course of four months.

Every day there is a growing number of iOS developers who want to jump on the bandwagon and get rich with their next killer apps in mind. As of this writing, there are more than 50,000 iOS developers around the world, and the number is growing rapidly. If you are one of those who are serious about iOS development and want to make your development effort more productive with good software design principles, then this is the book for you.

I am an iOS developer and understand well the many pains and gains from developing an app. Learning a new programming language is never easy. Finally the lightbulb flickers on and we start developing apps. When we look at the Cocoa Touch framework, it is very easy for even a seasoned developer to realize its elegance in design and organization. Its elegance comes from the thoughtfulness of its designers by putting different well-known (or not yet known) design patterns in various framework infrastructures, which makes it scalable and flexible to use by third-party developers like you and me. Much of the framework reuses the same types of patterns again and again; any new elements added later to the framework can easily be absorbed by other application developers without taking a steep learning curve again.

Understanding the patterns that are used in the Cocoa Touch framework is just part of the picture. If you don't spend time on your project's design and just start coding as soon as you get your killer app ideas, it will become a giant mothball as you add more features to it later. The worst-case scenario is that it will become unmanageable and you (or other developers in the team) will be totally lost in your code. You might end up spending more time fixing coding flaws (bugs) instead of focusing on new improvements.

To fully take advantage of the framework, one should have a good grasp of design patterns and apply them appropriately during implementation. This book was inspired by the original classic Design Patterns: Elements of Reusable Object-Oriented Software, written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, often referred to as the Gang of Four. In each chapter of this book, I reference any details of a pattern to its original definitions.

Today we understand the importance of using design patterns in many software projects. Most of the Cocoa Touch framework was written in Objective-C and, as of this writing, there is no other book that explains implementation of design patterns in the Objective-C language on the market. This book's aim is to be the first definitive guide on how to implement the classic design patterns in Objective-C language for Cocoa Touch development on the iOS platform.

You do want to make your life easier as an iOS developer, right? Without knowing best practices in application software design, the development process would be frustrating or even fruitless in the end. Also, reusing what you have already developed that is proven to work is the key to catching up with the frenetic pace of change in the App Store or software market in general.

With a little patience to understand the materials in this book and effort to apply them to your real projects whenever you can, you will soon experience the benefits from design patterns!

I have developed a web site for this book at www.objective-c-design-patterns.com, where you can find other information related to the book. On the website, you are also welcome to share your success stories and any hurdles you encountered while using design patterns in your projects. Source code for this book is available at www.apress.com.

Happy coding!

Carlo Chung

March 2011

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.176.145