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

Core Data, 2nd Edition – Updated for OS X Mountain Lion and iOS 6 – #programming #bookreview

Core Data, 2nd Edition
Data Storage and Management for iOS, OS X, and iCloud
Marcus S. Zarra
(Pragmatic Bookshelf – paperback)

“If you plan on writing an application that saves data to disk, then you should take a very long look at Core Data,” urges Marcus S. Zarra, in the new second edition of his Core Data how-to book.

“Core Data,” according to the Mac Developer Library, “provides an infrastructure for change management and for saving objects to and retrieving them from storage.”  It is Apple’s recommended way to persist data. And it is “used daily by millions of customers in a wide variety of applications.”

The new edition of Zarra’s book updates its Core Data development example to an iPhone recipe application (from a desktop recipe application in the first edition). The second edition includes coverage of OS X Mountain Lion and iOS 6 and examines changes to multithreading. The author also has added chapters to explore NSFetchedResultsController and iCloud.

If the structure of some of the book’s code examples appear puzzling, pay special attention to Appendix 2. There, Zarra discusses some of the typographical choices necessary to keep lines of code set to fewer than 80 characters wide. And he shows some macros that he uses in his code to speed up development work.

Whether you are just starting out with Core Data or now an old hand at working with it, you likely can learn new things from this well-written how-to guide. Its author is widely regarded as one of the world’s most experienced Core Data application developers.

Si Dunn

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 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

Programming C# 5.0 – Excellent how-to guide for experienced developers ready to learn C# – #bookreview

Programming C# 5.0
Ian Griffiths
(O’Reilly, paperbackKindle)

Ian Griffiths’ new book is for “experienced developers,” not for beginners hoping to learn the basics of programming while also learning C#. The focus is “Building Windows 8, Web, and Desktop Applications for the .NET 4.5 Framework.”

Earlier editions in the Programming C# series have “explained some basic concepts such as classes, polymorphism, and collections,” Griffiths notes. But C# also keeps growing in power and size, which means the page counts of its how-to manuals must keep growing, too, to cover “everything.”

The paperback version of Programming C# 5.0 weighs in at 861 pages and more than three pounds. So Griffiths’ choice to sharpen the book’s focus is a smart one. Beginners can learn the basics of programming in other books and other ways before digging into this edition. And experienced developers will find that the author’s explanations and code examples now have space to go “into rather more detail” than would have been possible if chapters explaining the basics of programming had been packed in, as well.

If you have done some programming and know a class from an array, this book can be your well-structured guide to learning C#. The “basics” are gone, but you still are shown how to create a “Hello World” program—primarily so you can see how new C# projects are created in Visual Studio, Microsoft’s development environment.

C# has been around since 2000 and “can be used for many kinds of applications, including websites, desktop applications, games, phone apps, and command-line utilities,” Griffiths says.

“The most significant new feature in C# 5.0,” he emphasizes, “is support for asynchronous programming.” He notes that “.NET has always offered asynchronous APIs (i.e., ones that do not wait for the operation they perform to finish before returning). Asynchrony is particularly important with input/output(I/O) operations, which can take a long time and often don’t require any active involvement from the CPU except at the start and end of an operation. Simple, synchronous APIs that do not return until the operation completes can be inefficient. They tie up a thread while waiting, which can cause suboptimal performance in servers, and they’re also unhelpful in client-side code, where they can make a user interface unresponsive.”

In the past, however, “the more efficient and flexible asynchronous APIs” have been “considerably harder to use than their synchronous counterparts. But now,” Griffiths points out, “if an asynchronous API conforms to a certain pattern, you can write C# code that looks almost as simple as the synchronous alternative would.”

If you are an experienced programmer hoping to add C# to your language skills, Ian Griffiths’ new book covers much of what you need to know, including how to use XAML (pronounced “zammel”) “to create  applications of the [touch-screen] style introduced by Windows 8” but also applications for desktop computers and Windows Phone.

Yes, Microsoft created C#, but there are other ways to run it, too, Griffiths adds.

“The open source Mono project (http://www.mono-project.com/) provides tools for building C# applications that run on Linux, Mac OS X, iOS, and Android.”

Si Dunn

For more information:  paperback – Kindle

iPhone: The Missing Manual, 6th Edition – Covers all iPhone models with iOS 6 software – #bookreview

iPhone: The Missing Manual, 6th Edition
David Pogue
(O’Reilly, paperback, Kindle)

 

This latest “Missing Manual” from David Pogue covers all iPhone models that have iOS 6 software, including iPhone 5.

The 538-page book is well-written, well-organized, and heavily illustrated with color photographs, illustrations, and screen shots. It also has numerous tips set off in yellow boxes for extra emphasis.

The 6th Edition’s chapters are gathered into five parts:

  • The iPhone as Phone – Focuses on “everything related to phone calls” with the iPhone.
  • Pix, Flix & Apps – “[D]edicated to the iPhone’s built-in software programs, with a special emphasis on its multimedia abilities…also app management….”
  • The iPhone Online – Includes “email, Web browsing, and tethering (that is, letting your phone serve as a sort of Internet antenna for your laptop).”
  • Connections – “…the world beyond the iPhone itself—like the copy of iTunes on your Mac or PC that can fill up the iPhone with music, videos, and photos, and syncing the calendar, address book, and mail settings.” Also covers the iPhone’s control panel, the Settings Program, and other features.
  • Appendixes – Appendix A covers the iPhone setup process; Appendix B looks at accessories such as chargers, car adapters, and carrying cases; Appendix C is a “master compendium of troubleshooting, maintenance, and battery information.”

The new iOS 6 software is available free, Pogue says, and is “the same operating system that runs on the iPad and the iPod Touch.”

He adds: “Why is that important? Because you can run iOS 6 on older iPhone models (the 3GS, 4, and 4S) without having to buy a new phone.” His new book “covers all phones that can run the iOS 6 software: the iPhone 3GS, iPhone 4, iPhone 4S, and iPhone 5.”

Si Dunn

For more information: paperback, Kindle

OS X Mountain Lion: The Missing Manual – Another how-to classic from David Pogue – #bookreview

OS X Mountain Lion: The Missing Manual
David Pogue
(O’Reilly, paperbackKindle)

 David Pogue knows how to produce excellent user manuals. He invented the popular “Missing Manual” series. And he continues to set high standards for other writers who also produce “Missing Manuals” and other tech books.  

Pogue’s newest, OS X Mountain Lion: The Missing Manual, is 864 pages of useful information, well presented, with clear writing and frequent sparks of humor.

It covers OS X 10.8 (which is pronounced “Oh-ess-ten, ten-dot-eight” [or “ten-point-eight”] by the way) and also covers iCloud.  Pogue cautions: “Don’t say ‘oh-ess-ex.’ You’ll get funny looks in public.”

Apple says OS X Mountain Lion has added 200 new features. But some users of previous Mac OS versions may be startled at a few capabilities that have been cut or reduced. (With this release, the term “Mac OS X” also has been reduced to “OS X” to better mesh with “iOS,” Apple contends.) Meanwhile, Pogue continues his well-known penchant for exposing and illustrating undocumented capabilities, irritants, and gotchas in software.

Still, he declares, “OS X is an impressive technical achievement; many experts call it the best personal-computer operating system on earth.”

Best OS or not, if you use OS X 10.8 and iCloud, you likely will want to have this how-to guide close at hand.

“If you could choose only one word to describe Apple’s overarching design goal in Lion and Mountain Lion, there’s no doubt about what it would be: iPad,” Pogue states.  “In this software, Apple has gone about as far as it could go in trying to turn the Mac into an iPad.”

OS X Mountain Lion: The Missing Manual is split into six parts, with 22 chapters and four appendices.

Part One: The OS X Desktop

  • Chapter 0: The Mountain Lion Landscape
  • Chapter 1: Folders & Windows
  • Chapter 2: Organizing Your Stuff
  • Chapter 3: Spotlight
  • Chapter 4: Dock, Desktop & Toolbars

Part Two: Programs in OS X

  • Chapter 5: Documents, Programs & Spaces
  • Chapter 6: Data: Typing, Dictating, Sharing & Backing Up
  • Chapter 7: Automator, AppleScript & Services
  • Chapter 8: Windows on Macintosh

Part Three: The Components of OS X

  • Chapter 9: System Preferences
  • Chapter 10: Reminders, Notes & Notification Center
  • Chapter 11: The Other Free Programs
  • Chapter 12: CDs, DVDs, iTunes & AirPlay

Part Four: The Technologies of OS X

  • Chapter 13: Accounts, Security & Gatekeeper
  • Chapter 14: Networking, File Sharing & AirDrop
  • Chapter 15: Graphics, Fonts & Printing
  • Chapter 16: Sound, Movies & Speech

Part Five: OS X Online

  • Chapter 17: Internet Setup & iCoud
  • Chapter 18: Mail & Contacts
  • Chapter 19: Safari
  • Chapter 20: Messages
  • Chapter 21: SSH, FTP, VPN & Web Sharing

Part Six: Appendixes

  • Appendix A: Installing OS X Mountain Lion
  • Appendix B: Troubleshooting
  • Appendix C: The Windows-to-Mac Dictionary
  • Appendix D: The Master OS X Secret Keystroke List

The focus stays firmly on “What’s this new feature for?” in OS X Mountain Lion: The Missing Manual. And David Pogue’s latest how-to classic makes it fun to test out a new feature with a good sense of what is supposed to happen and which choices are available or problematic .

Beats the heck out of opening up the software, randomly tinkering with selections, options and default settings, and then trying to figure out what you just did wrong.

Si Dunn

Mobile JavaScript Application Development – Bringing the Web to Mobile Devices – #programming #bookreview

Mobile JavaScript Application Development
Adrian Kosmaczewski
(O’Reilly,
paperback, list price $24.99; Kindle edition, list price $19.99)

In the author’s view, “the most important moment in recent technological history was the introduction of the iPhone in January 2007. The impressive growths of iOS, Android, and other platforms [have] completely transformed the landscape of software engineering, while at the same time opening new possibilities for companies.”

Indeed, Adrian Kosmaczewski notes: “It is estimated that, in 2015, more than 50% of all web requests will come from mobile devices!”

So, if you are, or are planning to be,  a JavaScript programmer, you better know how to develop and support apps for mobile devices. And you’d better stay aware of “platform fragmentation” – the various platforms that you may encounter as old and new ones battle for survival and market dominance.

Kosmaczewski’s new, 145-page book is aimed at web developers who have some familiarity with HTML5, CSS, and JavaScript.

“It does not matter if you have mobile software engineering experience,” he assures potential readers. But: “Mobile applications are a world of their own, and they present challenges that common applications don’t deal with.…” These include:

  • Small screen sizes
  • Reduced Battery Life
  • Little Memory and disk specifications
  • Rapidly changing network conditions

His book is divided into seven well-written chapters. And six of them offer numerous screenshots and short code examples. The chapters are:

  1. HTML5 for Mobile Applications
  2. JavaScript Productivity Tips
  3. jQuery Mobile
  4. Sencha Touch
  5. Phone Gap
  6. Debugging and Testing
  7. Conclusion

Mobile JavaScript Application Development takes this straightforward approach: (1) “leave the theory to others” and (2) focus on “understand by doing.” And, mercifully, the author does not try to tackle too many technologies at once. Instead, he concentrates – in “an opinionated, hands-on” way on three technologies that he says “are currently the most promising and…show the most interesting roadmap.”

These are, as previously mentioned in the chapter list, jQuery Mobile, Sencha Touch, and PhoneGap. His goal is to help you determine which one is best for your project. (If you don’t agree with his choices, he provides helpful links to several others but does not discuss them.)

To work with the book’s code samples, certain items are needed and not easily summed up here in a few words, because of platform fragmentation and other factors. But the requirements can be viewed easily, using Amazon’s “Click to Look Inside!” feature for both the paperback and Kindle editions.

If your job or ambitions include developing apps for smartphones, you should check out this book.

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.