Introduction

If you're an experienced programmer, a beginner just learning to program, or a complete novice who knows nothing about programming at all, this book is for you. No matter what your skill level may be, you can learn how to write programs for the Macintosh starting today.

What makes programming for the Macintosh so appealing is that the programming tools are free (courtesy of Apple), and by learning the basics of programming the Macintosh, you can easily apply your skills and experience to programming the iPhone, iPod touch, and iPad as well. Although this book focuses on programming the Macintosh, what you learn here can build a solid foundation to help you take the next step toward writing your own iPhone/iPod touch/iPad apps in the future.

The introduction of a new computer platform has always ushered in new (and lucrative) opportunities for programmers. In the early 1980s, the hottest platform was the Apple II computer. If you wanted to make money writing programs, you wrote programs to sell to Apple II computer owners, such as Dan Bricklin did, an MBA graduate student at the time, when he wrote the first spreadsheet program, VisiCalc.

Then the next big computing platform occurred in the mid-1980s with the IBM PC and MS-DOS. People made fortunes off the IBM PC including Bill Gates and Microsoft, which went from a small, startup company to the most dominant computer company in the world. The IBM PC made millionaires out of hundreds of people including Scott Cook, a former marketing director at Proctor & Gamble, who developed the popular money manager program, Quicken.

Microsoft helped usher in the next computer platform when it shifted from MS-DOS to Windows and put a friendly graphical user interface on IBM PCs. Once again, programming Windows became the number-one way that programmers and nonprogrammers alike made fortunes by writing and selling their own Windows programs. Microsoft took advantage of the shift to Windows by releasing several Windows-only programs that have become fixtures of the business world such as Outlook, Access, Word, PowerPoint, and Excel.

Now with the growing market for Apple products, thousands of people, just like you, are eager to start writing programs to take advantage of the Macintosh's rising market share along with the dominant position of the iPhone and the iPad in the smartphone and tablet categories.

Besides experienced developers, amateurs, hobbyists, and professionals in other fields are also interested in writing their own games, utilities, and business software specific to their particular niche.

Many programmers have gone from knowing nothing about programming to earning thousands of dollars a day by creating useful and frivolous iPhone/iPad apps or Macintosh programs. As the Macintosh, iPhone, and iPad continue gaining market share and adding new features, more people will use one or more of these products, increasing the potential market for you.

All this means that it's a perfect time for you to start learning how to program your Macintosh right now, because the sooner you understand the basics of Macintosh programming, the sooner you can start creating your own Macintosh programs or iPhone/iPad apps.

Code Conventions Used in This Book

Most of this book prints text in the font you're reading right now. However, you'll run across text formatted in different ways. To make it easy to tell the difference between explanatory text and actual programming instructions, you may see a different font like this:

NSString *newString;

This type of text highlights code that you can examine or type in. This font also highlights messages you may see on your screen.

Throughout this book, you'll be typing in sample programs. Sometimes you'll only need to modify part of an existing sample program, so to emphasize the new code you need to type in, you may see bold text like this:

NSString *newString;
newString = [largeString substringWithRange: NSMakeRange(5, 4)];

The bold text emphasizes the new code you need to add while the non-bold text represents the existing code you can leave alone. By seeing the existing code, you can easily see where you need to add any new code.

What to Expect from This Book

There are plenty of programming books on the market, but what makes this book different is that it assumes you're a complete novice with a great idea for a program but don't know the first step for getting started. For that reason, this book will minimize all the technical jargon about Objective-C, Xcode 3.2, and Cocoa frameworks and instead focus on helping you achieve specific tasks such as displaying a command button or accepting text from the user.

Of course, you will eventually need to know what Objective-C, Xcode, and the Cocoa frameworks can do, but you won't get buried in a lot of technical jargon. Since this book starts you at the very beginning, it also won't contain detailed technical information needed to create super-sophisticated programs that involve graphics or sound. If you just want to get started and learn the basics of programming using Apple's programming tools, this book is for you. If you're already an experienced Windows programmer and want to get started programming the Macintosh, this book can be especially helpful in teaching you the basics of using Apple's programming tools in a hurry.

If you've never programmed before in your life or if you're already familiar with programming but not with Macintosh programming, then this book is for you. Even if you're experienced with Macintosh programming, you may still find this book handy as a reference to help you achieve certain results without having to wade through several books to find an answer.

To help you learn the different principles behind Macintosh programming, this book also provides plenty of short example programs that you can run and study. Because each sample program is so short, you'll be able to focus just on learning a new feature of programming while reducing the possibility of typos and other errors. As a result, you're more likely to get each short sample program working right away, which can increase your confidence and enjoyment as you learn how to program.

You won't learn everything you need to know to create your own programs, but you'll learn just enough to get started, feel comfortable, and be able to tackle other programming books with more confidence and understanding. Fair enough? If so, then turn the page and let's get started.

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

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