Programming iOS 6, 3rd Edition – In with the New, Out with the Old (iOS 5 & Earlier) – #bookreview

Programming iOS 6, 3rd Edition
Matt Neuburg
(O’Reilly - paperback, Kindle)

“My book is way bigger than your book.”

Matt Neuburg, author of Programming iOS 6, could make that claim and win almost any book-size contest. The recently published 3rd Edition of his well-respected how-to guide focuses on the “Fundamentals of iPhone, iPad, and iPod touch Development” and now spans 1,154 pages in its paperback edition. It’s definitely much thicker and heavier than any of the devices it covers.

This new edition is centered on iOS 6.1 and xCode 4.6. The author notes that he has “eliminated most references to previous iOS versions.” And he explains: “Many iOS 6 features, of course, do not exist in iOS 5 or before; I usually mention that a new feature is new, but I have not generally addressed the problem of writing backwards-compatible code. The text would become confused and bloated if everything had to be qualified with advice for different versions (‘but if you’re targeting iOS 5.1, do this; if you’re targeting iOS 5.0, do that; if you’re targeting iOS 4.3, do the other’). I believe that I can justify such omissions on the grounds that previous editions of this book exist!”

Indeed they do. Programming iOS 5, which was published in two editions, also covers iOS 4.3 and is available on Amazon.com and through other sources..

“New iOS 6 features are, of course, both explained and adopted” in the new 3rd edition, Neuburg says. “For example, having described NSArray subscripting (in Chapter 10), I then use it consistently, in place of objectAtIndex:, throughout the rest of the book. Aside from this, the book’s structure remains the same as in previous editions, growing where necessary to accommodate explanations of new features, such as autolayout (in Chapter 14), state restoration (in Chapter 19), and collection views (in Chapter 21). Also, in response to reader requests, I have inserted a short example of Core Data programming into Chapter 36.”

Absolute beginners should not start with this book. Get some basic programming experience in C and Objective-C first.

And don’t be surprised that not everything about iOS is covered in a book 1,154 pages long. “It’s far too big to be encompassed in a book even of this size,” Neuburg emphasizes. “There are areas of Cocoa Touch that I have ruthlessly avoided discussing. Some of them would require an entire book of their own. Others you can pick up well enough, when the time comes, from the documentation. This book is only a beginning — the fundamentals.”

Si Dunn

iOS 6 Programming Cookbook – Updated for the new SDK – #iOS #programming #bookreview

iOS 6 Programming Cookbook
Vandad Nahavandipoor
(O’Reilly –
paperback, Kindle)

If you are a new iOS developer, you can learn many things quickly from this hefty book. And even if you are an iOS veteran, you can gain some important new insights.

The iOS 6 cookbook has been completely updated to cover the recently released iOS 6 SDK. And the author is a well-known and well-experienced developer of iOS apps.

The 20-chapter book begins with the basics of programming for the iPhone, iPad, and iPod touch, using Objective-C. But it is not intended for beginners who are just learning to program.

In some forums, debates continue to rage over whether new programmers who want to create iOS apps should dive straight into learning Objective-C or study traditional C first and perhaps other programming languages before tackling Objective-C.

No opinion is offered in this well-written, well-organized book. It is just assumed that “you are comfortable with the iOS development environment and know how to create an app for the iPhone or iPad.”

The book’s  focus, the author says, is on explaining “frameworks and classes that are available in iOS 6 SDK” and teaching the reader “the latest and greatest APIs. As you know, some users of your apps may still be on older versions of iOS, so please consider those users and choose your APIs wisely, depending on the minimum iOS version that you want to target with your apps.”

Here is the chapter line-up for iOS 6 Programming Cookbook:

  1. The Basics
  2. Implementing Controllers and Views
  3. Auto Layout and the Visual Format Language
  4. Constructing and Using Table Views
  5. Storyboards
  6. Concurrency
  7. Core Location and Maps
  8. Implementing Gesture Recognizers
  9. Networking, JSON, XML, and Twitter
  10. Audio and Video
  11. Address Book
  12. Files and Folder Management
  13. Camera and the Photo Library
  14. Multitasking
  15. Core Data
  16. Dates, Calendars, and Events
  17. Graphics and Animations
  18. Core Motion
  19. iCloud
  20. Pass Kit

Vandad Nahavandipoor’s important new iOS 6 cookbook offers hundreds of how-to examples and code samples that can help solve problems and give well-defined starting points and frameworks for developers at all levels of experience.

The topics and code samples range from the basic, such as testing new iOS apps by running them on the iOS simulator, to the advanced, such as using Apple’s Pass Kit to create digitally signed coupons, tickets or passes that can be delivered to compatible iOS devices running iOS 6 or later.

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.

Build Mobile Websites and Apps for Smart Devices – #bookreview

Build Mobile Websites and Apps for Smart Devices
By Earle Castledine, Myles Eftos & Max Wheeler
(SitePoint, $39.95, paperback; $27.99, Kindle)

By 2013, in some estimates, mobile devices such as smartphones and “other browser-equipped phones” will outnumber the world’s 1.78 billion PCs.

Meanwhile, the “mobile share of overall web browsing” is now growing rapidly. And: “We’re never going to spend less time on our phones and other mobile devices than we do now,” contend the authors of Build Mobile Websites and Apps for Smart Devices.

“Inevitiably, more powerful mobile devices and ubiquitous internet access will become the norm. And the context in which those devices are used will change rapidly. The likelihood of our potential customers being on mobile devices is higher and higher. We ignore the mobile web at our peril.”

The authors’ new guidebook from SharePoint is aimed at front-end web designers and developers, with emphasis on mobile websites and apps that are accessed via touch-screen smartphones.

Their well-illustrated, 256-page book is written in a smooth, accessible style that moves quickly to the point of  each chapter and example. They recommend that you read the chapters in sequence the first time, rather than skipping around, particularly if you are new to mobile web design and web development.

The chapter line-up gives a good look at the book’s structure and coverage:

  •  Preface
  • Chapter 1: Introduction to Mobile Web Design
  • Chapter 2: Design for Mobile
  • Chapter 3: Markup for Mobile
  • Chapter 4: Mobile Web Apps
  • Chapter 5: Using Device Features from Web Apps
  • Chapter 6: Polishing Up Our App
  • Chapter 7: Introducting PhoneGap
  • Chapter 8: Making Our Application Native
  • Appendix A: Running a Server for Testing

The book includes a link to “a downloadable ZIP archive that contains every line of example source code printed in this book.” And the writers emphasize that readers should have “intermediate knowledge” of HTML, CSS, and JavaScript. They skip the absolute basics and move right into “what’s relevant for the mobile context.” 

They emphasize that “[t]he inevitable decision when designing for the mobile space is the choice between building a native application or a web application….A web application is one that’s accessed on the Web via the device’s browser–a website that offers app-like functionality, in other words.” Meanwhile, “[a] so-called native application is built specifically for a given platform–Android or iOS, for example–and is installed on the device much like a desktop application.”

They contend that “native apps offer a superior experience when compared to web applications,” and they note that “the difference is even more pronounced on slower devices.” However, building a native application can leave you vulnerable to market fragmentation and unsure which platforms you should target. Meanwhile,  it can be cheaper and faster to develop a Web application. So several important design and business decisions have to be made before you offer a new app to the marketplace. 

Build Mobile Websites and Apps for Smart Devices focuses first on making design decisions, selecting a feature set and using HTML, CSS and JavaScript to build a Web application. Later, it shows how to use PhoneGap to turn a web app into a native app for iOS, Android, BlackBerry and other platforms.

In the authors’ view, “mobile design is about context, but it’s also about speed. We’re aiming to give our users what they want, as fast as possible.” And, in many cases, “[p]roviding a version of our site to mobile users is going to be important regardless of whether or not we have a native application.”

In other words, be ready and able to go native and web when creating mobile websites and apps for smart devices

Si Dunn

#