Learning Cocoa with Objective-C – An excellent how-to guide from two experts – #programming #bookreview

Learning Cocoa with Objective-C, 3rd Edition
Paris Buttfield-Addison and Jon Manning
(O’Reilly – paperback, Kindle)

 In some surveys, Objective-C is now the third most popular programming language, up from fifth place in 2011.

O’Reilly recently has published the awaited third edition of Learning Cocoa with Objective-C, with coverage of Xcode 4.2 and iOS 6.

The book’s two authors definitely know the Cocoa framework. They have been developing for it since the Mac first supported it. And their experience and expertise shine forth in this well-written, smoothly organized how-to guide.

They have, they note, “seen the ecosystem of Cocoa and Objective-C development evolve from a small programmer’s niche to one of the most important an d influential development environments in the world.”

Their 339-page, 20-chapter book assumes that you have some programming experience and at least know how to use an OS X and iOS device. Otherwise, it is a solid choice for learning Cocoa with Objective-C from the ground up. It offers clear descriptions and practical exercises, plus numerous code samples, screenshots and other illustrations.

Paris Buttfield-Addison’s and Jon Manning’s bottom-line goal, successfully met here, is to “give you the knowledge, confidence, and appreciation for iOS and OS X development with Cocoa, Cocoa Touch, and Objective-C.”

Si Dunn

iOS SDK Development – A totally new and improved 2nd edition – #programming #bookreview

iOS SDK Development
Chris Adamson and Bill Dudney
(Pragmatic Bookshelf, paperback)

The previous, 2009 edition of this popular how-to book was titled iPhone SDK Development.  But this  new and re-titled second edition is much more than a copy-and-paste, just-make-some-tweaks update.

“[W]e have copied absolutely nothing from the old book,” the authors say. “As we looked at all the changes to the platform—between Xcode 4, iOS 6, and the iPad—we decided that so much had changed that we would be better off starting fresh.”

While they tried to cover virtually everything in their previous book, their new, 274-page edition is much more focused and, yes, it’s more pragmatic.

“This book,” they state, “is about setting you off on the right foot: understanding the fundamentals, getting comfortable with the tools and the concepts, and developing good habits. We’ve put a particular emphasis on the last of these, looking for the kinds of things that aren’t just handy classes or compiler tricks but instead are the values and routines that will help produce better apps. We’re also adopting modern iOS development practices, such as using Objective-C properties exclusively instead of using traditional instance variables and getting private methods out of public header files.”

Two other goals: They want iOS SDK Development “to serve as a prerequisite” for Pragmatic Bookshelf’s other iOS titles; and they hope you will “come away from this book with a firm grasp of the most essential iOS APIs—the UIKit GUI framework and the essential utilities of the Foundation framework—and enough of a sense of where things are and how things work to be able to grab the documentation for interesting looking features and be able to figure it out.”

The book has 10 chapters, with illustrations and short code examples. The chapters are:

  1. Tweetings and Welcome to iOS 6 – Shows how to download and install the SDK and begin working on a first app.
  2. Programming for iOS –Introduces Objective-C and “the two frameworks we use most often in iOS apps: Foundation and UIKit.”
  3. Asynchronicity and Concurrency – Shows “how many of the iOS APIs use asynchronous callbacks and [employ] the Grand Central Dispatch system to handle concurrent execution….”
  4. View Controllers – “…looks at how iOS apps are built on a strong Model-View-Controller (MVC) foundation.”
  5. Table Views – Deals with “the flexible and widely used table view, the linchpin of most iPhone apps that need to present lists of data.
  6. Storyboards and Container Controllers – Covers “how to build a visual road map of the many screens of an app and how to build much of the logic of that navigation and presentation automatically.”
  7. Documents and iCloud – Shows the tools needed “to save our user’s work to the filesystem as well as to Apple’s new iCloud service.”
  8. Drawing and Animating – Explains how to use the Core Graphics framework and Core Animation.
  9. Testing and Fixing Apps – Looks at what can go wrong and how to use the SDK’s tools to fix things.
  10. The App Store and Beyond – Focuses on moving from learning to doing, by maintaining code, running it on devices, submitting it on the App Store, and “managing it after it’s in users’ hands.”

Whether you want to learn how to develop iPhone, iPad, and iPod Touch apps, or improve and update your knowledge of the necessary processes, you should read the new, improved iOS SDK Development and keep it within easy reach.

Si Dunn

Learning iOS Programming, 2nd Ed. – Updated to cover iOS 5, iPad, iPhone, iPod Touch – #programming #bookreview

Learning iOS Programming, 2nd Edition
By Alasdair Allan
(O’Reilly, paperback, list price $34.99; Kindle edition, list price $27.99)

Alasdair Allan’s popular iOS programming book recently has been updated to cover iOS 5. And it has a new name. (The first edition was titled Learning iPhone Programming.)

“The changes made in this second edition reflect the fact that a lot has happened since the first edition was published: the release of the iPad, a major release of Xcode, two revisions of the operating system itself, and the arrival of Apple’s iCloud,” the author notes. “This book has therefore been refreshed, renewed, and updated to reflect these fairly fundamental changes to the platform, and all of the example code was rewritten from the ground up for Xcode 4 and iOS 5 using ARC.”

Allan’s book – well-written and appropriately illustrated – is structured to provide “a rapid introduction to programming for the iPhone, iPod touch, and iPad,” and it assumes that you have some familiarity with C or a C-derived language, as well as a basic understanding of object-oriented programming.

And the pace is fast. By chapter 3, you are building the requisite “Hello, World” application and running it in iPhone Simulator.

In that same chapter, Allan also introduces the basic syntax of Objective-C and highlights some of the “rather strange” ways that it deals with method calls. He discusses how the Cocoa Touch framework underlying iOS applications “is based on one of the oldest design patterns, the Model-View-Controller pattern, which dates from the 1970s.” And he warns that “[a]ttempting to write iOS applications while ignoring the underlying MVC patterns is a pointless exercise in make-work.”

Learning iOS Programming, 2nd Edition does not emphasize web-based applications. It centers, instead, on creating native applications using Apple’s SDK. “The obvious reason to use the native SDK,” Allan states, “is to do things that you can’t do using web technologies. The first generation of augmented reality applications is a case in point; these needed close integration with the iPhone’s onboard sensors (e.g., GPS, accelerometer, digital compass, and camera) and wouldn’t have been possible without that access.”

He emphasizes a financial reason, as well. “Consumers won’t buy your application on their platform just because you support other platforms; instead they want an application that looks like the rest of the applications on their platform, that follows the same interface paradigms as the rest of the applications they’re used to, and is integrated into their platform.”

He adds: “If you integrate your application into the iOS ecosphere, make use of the possibilities that the hardware offers, and make sure your user interface is optimized for the device, the user experience is going to be much improved.”

Hard to argue with that.

Learning iOS Programming, 2nd Edition provides the steps necessary to develop and market your first iOS application. Allan notes: “Until recently, the only way to obtain the iOS SDK was to become a registered iOS developer. However, you can now download the current release of Xcode and the iOS SDK directly from the Mac App Store.”

Of course, if you intend to distribute your applications “or even just deploy them onto your own device, you will also need to register with Apple as a developer and then enroll in one of the developer programs.”

You may need some system upgrades, as well. To develop apps for the iOS, you’ll need an Intel Mac running OS X 10.6 (“Snow Leopard”) or later. If you plan to create apps that use Apple’s iCloud, you’ll need OS X 10.7 (“Lion”) or later.

One other recommendation from Allan: If you’re truly serious about being an iOS developer, consider also registering with the Mac Developer Program.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir. He is the author of an e-book detective novel, Erwin’s Law, now also available in paperback, plus a novella, Jump, and several other books and short stories.