- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
iPhone SDK: UIViewController Testing & TDD
Unfortunately there are not enough examples out there on how to test view controllers with the iPhone SDK. My hope is to remedy that a bit by sharing some techniques I have been using to tackle the problem, particularly in keeping with the spirit of TDD along the way.
First, If you have not already done so, configure your project to use GTM. This is a bit of a no-brainer as it currently stands. Until Apple comes up with something better, GTM is the way to go. It works as advertised, and is a credit to the folks at Google for providing this toolkit.
Now then, many tutorials on the web seem to imply that one should test somewhere in the middle by suggesting to add a few outlets to your controller, fire up IB and wire up your view to your view controller before you even start to think about testing any of it.
Testing controller logic means working under the assumption that you have wired up your view components correctly to match the controller's actions and outlets. Wire up an element to the wrong action (or worse, forget to wire it up at all) and you can easily learn to rely too heavily on manual testing. While this might be acceptable for small one-off applications, within a team of developers practicing collective code ownership, this kind of error can cost real money over time. "Thanks for caring, but I'd rather have a unit test."
Now then, let's take a look at some code!
Will Q4 iPhone Sales Surpass Expectations?
I went to the AT&T store on Friday to buy another testing phone for our developers, who are busily churning out more iPhone applications, and to switch one of my cell lines over from T-Mobile to my iPhone. It was an interesting experience, with T-Mobile's very friendly and courteous customer service reps pitching me strongly on the G phone, and my service getting switched over in the middle of a business call. I asked the AT&T store manager what percentage of their sales were iPhones, and after a bit of thought, he said about 65%.
Granted, that's only one location, but based on all of the annecdotal evidence I have, as well as how well the T-Mobile folks were trained to deal with the iPhone switch (not only on my request, but on my wife's similar call last week) I am expecting some pretty strong numbers form Apple tomorrow.
I'm also expecting decent G phone numbers for Q4, but I'm not sure how well they'll hold up later.
Update: It looks like Apple's Q4 iPhone sales topped 6.9 million, about 800,000 units more than RIM's 6.1 million in the equivalent period, beating most analyst expectations by a mile.
Interesting discussion on this over at Daring Fireball (of course) as well as a piece on Fortune on traditional analysts versus bloggers on Apple sales and earnings. The bloggers got the iPhone numbers better than the analysts, but everyone missed on mac sales.
Where minimalism fails: The problem with Apple’s less-is-more approach
So I'm watching the big Apple notebook event and getting totally excited about the impressive new graphics capabilities. Finally I'll be able to get decent visuals on World of Warcraft on a Mac laptop. Then we get to the part about the new trackpads and my excitement wanes. Once again, Apple is opting for ultra-minimalist hardware and then using software to compensate (poorly) for that design choice.
Here's Steve Jobs:
We've got a new trackpad for notebooks. It's a gorgeous, large, multitouch glass trackpad for notebooks. It's 39 percent larger tracking area than before, it's multi-touch for gestures, it's glass for silky-smooth travel. And we've optimized the coefficient of friction on the glass, so it's really beautiful. And the entire trackpad is the button. It gives you more area on the trackpad and keeps you from hunting for that button. You can get multi-button support from software. And we've added some new four-finger gestures that are really nice.
Four-finger gestures may be really nice, but I'd opt for two hardware buttons any day. Whether you're playing video games or simply using productivity and development apps, you should be able to summon context menus without having to resort to arcane gestures. Apple's obsession with scaling hardware down to its essence may result in beautiful products, but usability almost always suffers. Need some more examples?
Flash Player on iPhone gossip
First thing that came to my mind when I initially heard about the iPhone was the multi-touch possibilities that would start changing the way we create Flash/Flex interfaces (hopefully through SDK extension supporting multi-touch on Adobe's side triggered by iPhone release).
It looked very promising and natural to me in the beginning that this will be the route. Flash is a great part of the Internet experience and iPhone is a great mobile device for, among other things, Internet access.
Topics: Flash, flash player, Flex, iPhone
TankEngine: New plugin for Rails iPhone Development
Last Saturday at Windy City Rails, I had the pleasure of announcing TankEngine, a new Rails plugin for targeting iPhone and Mobile Safari. ("git" it here)
Now, I know, I've done this already, so why a brand-new version of the plugin with a new name?
Good question. The original plugin was basically a wrapper around the iUI JavaScript and CSS classes. After working with iUI for a while, it turned out that I had a few differences of opinion with iUI (which I still think is a very nice piece of work).
Continue reading »
Topics: iPhone, Ruby on Rails
Betting Your Business on the iPhone
Monopsony - the market condition that exists when there is only one buyer.
We all have heard the term "monopoly" and even know a little bit of what it means - a market where there is only one seller. But the related term "monopsony," a market where there is only one buyer, is not as well known and it's dangers not as well understood.
Certainly both monopolies and monopsonies will reduce competition, innovation and consumer choice, but they further constitute a big risk for the sellers. For businesses on the seller side a monopsony can be the kiss of death. Just ask Walmart's suppliers how good it's been for them.
Not all monopsonies are as obvious or as overtly damaging to suppliers as that of Walmart, but Apple's iPhone and iTunes appstore looks like a benign monopsony. A monopsony in that although the iphone consumer is the ultimate buyer, Apple determines what is permitted in it's appstore, and benign in the fact that Apple hasn't flexed that restrictive muscle more than a few times.
iPhone Usability: More Taps, Less In My Head
Consider this my somewhat belated follow up to Brian's post about iPhone usability.
First, one pure follow-up. If you are so inclined, you can join an online petition calling for Apple to allow iPhone users or developers to disable keyboard auto correct if they so desire.
Here are my usability notes. I should say, I'm not a complete mobile warrior or anything, so there are probably other users a lot more dependent on, say, mobile email than I am. Also, the iPhone is my first smartphone, so I don't have any residual BlackBerry or Window Mobile experiences to compare it to.
Phone Usability
For all that everybody focuses on the fancy stuff, an iPhone still needs to allow you to make and receive phone calls. I have to say, the basic phone interface is perhaps my favorite of the built in Apple applications. The basic set of in-call options (speaker, mute, etc...) are clearly and cleanly presented with large buttons, reducing the need to remember how to trigger different features. The visual voice mail interface is outstanding -- almost making it pleasant to deal with voice mail.
One More Thing...
The iPhone 2.x OS features an unusual password entry field, in that the most recent character typed is displayed plain while all the other characters are masked. The idea, presumably is to make it easier to catch password typos, and it's (I guess?) not all that likely that somebody would look over your shoulder to catch a password.
Still, the behavior feels weird. I thought it was a bug the first time I saw it. I opened this up on my twitter feed and got exactly two responses. One in favor, one against. Obviously the masses have spoken. What do you think?
Topics: iPhone
Four blatant iPhone usability blunders (and one constant annoyance)
I've been an iPhone 3G owner for about six weeks now - six weeks of love, loathing, cool apps and connectivity problems. Rather than complain about poor network coverage, though, I'd like to delve into some of the vexing usability problems that hamper the phone's user experience.
No ability to disable autocorrect completely
Like pretty much every autocorrect feature ever built, the iPhone's does more harm than good. It always thinks it knows best. If you don't watch it like a hawk, it will render everything you type completely nonsensical. Proper nouns, abbreviations, profanity - all get turned into gibberish by this well-meaning but deeply flawed function. And god forbid you try to use the classic email e.e. cummings mode in which uppercase letters don't exist. The iPhone literally will not let you output the word "iPhone" without throwing in that capital "P." It's maddening.
If the purpose of autocorrect is to allow you to type quickly without having to monitor your output, it fails miserably. On the iPhone, if you want what you type to show up verbatim on the screen, you have to pause at the end of each word to ensure that the OS is not about to substitute its own wisdom for your actual intent. I would honestly rather type on a 1999-era StarTAC numeric keypad.
None of this would be as galling if there were a setting to turn this feature off. But there isn't. Elaborate, unwieldy workarounds have been suggested - all because Apple users know that the folks in Cupertino often paternalistically ignore their users. Microsoft's OS and apps may suck, but you can usually customize the hell out of them. Not so Apple's.
Topics: iPhone, Mobile, Safari, Usability, user experience design
The App Store, iPhone, and You

Kind of an interesting day in iPhone development land. Among the stories that crossed in front of my eyeballs today,
- The first popular application to get bounced from the App Store for cause. (The game Aurora Feint could send your contact list out over the Internet in plain text. This appears to have been more in the line of an overenthusiastic developer error than a malicious ever overlord, so hopefully they'll be able to get back in the store.)
- Update, Friday Morning Looks like Aurora Feint is back on the App Store with their update this morning. (In fact, Apple seems to have released a lot of updates overnight.) So, good for that, that's pretty close to how the process should work.
- The first open source iPhone project that I am aware of, WordPress
- The second open source iPhone project that I am aware of, Box Office
- Word that Apple is seeding a beta of the 2.1 firmware and SDK to paid developers.
- The possibility that the 2.1 SDK might lift the NDA that has prevented developers from discussing the development kit publicly.
I'm particularly excited by the release of the source code projects. So far, developing for the iPhone has resembled walking blindfold through a booby-trapped Indiana Jones cave, and seeing the source for successful projects can only help wandering developers.
Really, it's amazing that any successful software made it to the App Store launch given the limitations imposed on beta SDK development -- a tribute to some amazing developer work.
Which takes us to the murky world of Apple's NDA and the general air of mystery that Apple has placed over the entire process. The Aurora Feint team says that Apple has never contacted them over the status of their app. Some users report the app was deleted from their phones during a sync, others (like me) still have it. Many developers have posted updates to Apple with no clear idea when they will get posted to the App store. Dave Thomas posted about the trouble they are having writing iPhone SDK-related books.
I don't want this to be a rant -- the App store is full of amazing work, but for the benefit of the current developers, new developers, and the users who are coming to depend on this software platform, it's time to open up the lines of communication and let a developer community form.
Topics: iPhone
“Developing iPhone applications using Ruby on Rails and Eclipse, Part 3: Developing advanced views for iPhone” now available on IBM Developerworks
Part 3 of my series on developing web applications for the iPhone is now available.
This final series article looks at what you should do when the user reaches the end of the list structure and your application actually needs to display some content. iUI provides some useful features for content and form layout. It also covers some features that will give your application some extra polish, such as capturing the user's rotation of the phone and adding an icon to display on the iPhone's home screen.
Topics: iPhone, Ruby on Rails
iPhone SDK and the Audacity of Patience
You might be wondering what I've been up to lately.

I have been working with the iPhone SDK (the better half of three months now), and have been having more than a bit of fun. Not only have I had to re-familiarize myself with Objective-C and the Cocoa APIs, but I have started thinking more seriously about what it means to write great mobile applications. All of this led me to wonder about the experiences of other non-Cocoa developers (after all, there is a lot of ground to cover). Not surprisingly, while there are a few early adopters who feel so out of their element that they are tempted to write it off, I'm confident that there are others who are like me-- psyched up and ready to go.
Unfortunately I can't get into specifics of my experience so far while holding to the NDA, other than to say that learning anything new requires patience, but ultimately if you are experienced enough, the lessons you already know about good design will move you much farther along than any choice of IDE or language or API.
Continue reading »
Topics: iPhone
“Developing iPhone applications using Ruby on Rails and Eclipse, Part 2: Displaying iPhone content to the client” Also up on IBM Developerworks
It's actually a double-article day for Pathfinder on IBM developerWorks, as part two of my series on developing iPhone web applications in Rails was also posted today.
For this article, you use a Cascading Style Sheets (CSS) and JavaScript library called iUI to handle iPhone content. The iUI library has CSS classes that match Apple's human-interface guidelines for iPhone, as well as JavaScript to handle sideswipes that mimic the interface of the native iPhone OS applications. However, you aren't always going to want to use iUI in your application, so I'll also discuss some of the actual CSS and JavaScript needed to handle those common elements. In keeping with good Rails practice, I factored the HTML for common iUI patterns to Ruby helper methods. These methods are bundled in a Rails plug-in you can download and add to any Rails application.
Part 1 went up a week ago. Part 3 should be up in a couple of weeks.
Topics: Announcements, iPhone, Ruby on Rails
Rails and iPhone article online at IBM developerWorks
Just a quick mention that part 1 of my article series on using Rails to write iPhone apps is online at IBM developerWorks.
Parts 2 and 3 will be published sometime in the rather near future.
Oh, and a longer RailsConf piece will be coming later this week, along with the winner or winners of the free book drawing... stay tuned.
Topics: iPhone, Ruby on Rails
6 GWT Resources for the iPhone

- GWT + iPhone == Pretty Tasty - a nice discussion of the development of the GWT Feed Reader for the iPhone and what went into building it. A great starting point if you're just getting started with GWT on the iPhone.
- GWT App Dev for the iPhone - from the GWT Blog, a slightly different take on the GWT Feed Reader project discussed above.
- GWT Feed Reader source code - open source. If you learn best by doing, read the code. See how it's done.
- Fake the iPhone User Agent - testing the iPhone specific versions of sites and apps is easy if you have Mac OS X, but if you don't this quick little tutorial shows you how to fake the User Agent in Firefox.
- iPhone Debug - an attempt to make debugging Ajax on the iPhone easier, sending debugging info back to the server. Uses Jetty with its support for COMET.
- Firebug for the iPhone - the idea that inspired the above. A bridge between your iPhone and the Firebug console in your desktop browser. Now you can see those debug messages in the comfort of your laptop instead of having to do it in the little iPhone window.
I'm going to put together a little bit of a iPhone/GWT howto/tutorial/investigation in the next couple of weeks, starting with a close analysis of the Feed Reader above. Stay tuned.
Topics: Ajax Development, GWT, iPhone
Top 5 Iphone styled websites
In the oxymoron that was mobile web design for many years we struggled to try our HTML pages out on different mobile devices only to have to resort to stripping out anything resembling good design or usabilty. On my trusty RAZR phone, I was content with using java apps to display things in a meaningful way, but having to learn the arcane hotkeys for each app became a chore, and they went little used. With the iphone, the promise was that regular sites look like their BS (big screen) brethren, where users can not have to learn new interaction conventions for their favorite sites outside of zooming and moving around to fit the screen. However, there is a second wave of web apps that optimize their site for the iphone. Using conventional xhtml, css, and some javascript, with a few unordered lists you can distill most complex sites into something new, and in many cases are easier, faster, and better user experiences than the 'real' sites! I hope this gives notice to web designers to pare down things that users rarely need and keep things simple. You may have your favorites, please add them to the comments, and non-iphoners can usen this emulator to try out the alternate sites:
5. iPhlickr - http://www.chandlerkent.com/iphlickr/
What sets this apart is a seeming blur between the iphone features and the browsing world, when you select a photo, you can then share it, send it, or view it within the flickr world, unfortunately when iphone apps become available next month, flickr will probably become an 'app', but until then, this is a very ingenious and useful approximation.
4. Wikipedia
Iphones aren't fast in downloading data (yet) so when I want some info, I don't want a huge load time with lots of info that isn't getting me to my goal, this interface is very fast, and also does a great job in reformatting wikipedia content to take advantage of show/hide heading behaviors, which is a new iphone 'standard', and one that helps parse long documents quickly.
3. Amazon
A old-time favorite (was iphonized pretty much right away), but Amazon should be applauded by honing down their value propositions to fit on this screen, that is product, price, ratings. Thats it, and thats what In need when I'm thinking about picking up that camera in Circuit City, i want to swoop in and Amazon it for comparison and this does the job.
2. Reqall - www.reqall.com
I mentioned how much I liked this the other day, a technologically amazing mashup of voice/text note taking, plus some nice keyword recognition make a pretty darn useful to-do list! Add on the iphone interface, with good integration of thick finger style tabs, gets a reasonable amount of navigation in a small place to seal the deal. Bummer is that it makes you login every time, but I am lobbying for that to be fixed
1. Google reader - www.google.com/reader/i
I could say the google iphone interface, but the reason for this post is a huge shout out to Google for their revamping of the RSS interface for the iphone. I am super picky about RSS readers, my copy of NewsFire broke the other day in an update and I was in a panic to find a replacement, to no avail (I fixed it by installing a previous version). The thing I dislike most about other RSS readers is using the metaphor of email. I think we all get too much email, and RSS is not email, its more like a very personalized newspaper. The google reader nails this, and has kept me busy on train trips really enjoying reading stories, with excellent ajax integration, which really shines on the iphone since refreshing the page can take 20+ seconds, keeping info inline is imperative.
I also want to give credit to the password filler-inner 1password for their iphone interface, and twistori that shows that the same design works on both BS and little if the concept and interaction are clear. If I had a wishlist for sites I wish worked on the iphone it would be cellartracker (their regular site is not too great either, but the content is invaluable on mobile) and chase - if you are really embracing mobile users, let me really bank online.
The environment will change in the next month with the introduction of iPhone apps, but the resourcefulness of these developers to take 'plain ol' HTML and make a good user experience in a very constrained environment shouldn't be lost. Give your comments and contribute your favorites I may have missed.
Topics: iPhone, User Experience
About Pathfinder
Recent
- Bandwidth profiling Flex projects and more with Charles
- iPhone SDK: UIViewController Testing & TDD
- Icons are evil; so are menus - unless you do them right
- The Truth About Designing For Security
- GWT, Gadgets and OpenSocial, Part 2
- Has Many has_many: A Refactoring Story
- The Hidden Power of Canvas
- Review of fixture_replacement2 plugin
- Chess Game Viewer in GWT
- From JSP to Ruby on Rails: First thoughts on front-end coding conventions
Archives
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006






