{"id":3724,"date":"2011-04-28T13:11:33","date_gmt":"2011-04-28T20:11:33","guid":{"rendered":"\/?p=3724"},"modified":"2013-06-14T06:18:20","modified_gmt":"2013-06-14T13:18:20","slug":"destination-ipad","status":"publish","type":"post","link":"https:\/\/needmoredesigns.com\/destination-ipad\/","title":{"rendered":"Destination: iPad"},"content":{"rendered":"
For the past few weeks, we’ve been working on some side projects at Needmore HQ, with the intention of bringing our own apps to an iPad near you. We see this side project as a convergence of several things we are really into right now: our child, our iPads, fine art, and a longing for the days when building interesting stuff in Flash was a realistic option for web designers.<\/p>\n
The biggest obstacle to a newcomer to iOS development is the steep learning curve associated with developing in Objective-C<\/em>, using the Cocoa Touch framework, in Xcode. None of these are things I have any experience with whatsoever, and since iOS developers are in such high demand, we’ve decided that we’re not interested in hiring someone for this work, at least not quite yet.<\/p>\n So that leaves me to learn these things more or less on my own here. And so I began my journey. Unfortunately, having just turned 39 yesterday, my brain is made up of an extremely firm substance that is incapable of taking on new knowledge like it used to. So while learning these things, I decided to shop around for some alternatives (or, ways to “cheat”).<\/p>\n Luckily, there are a ton of alternatives to brute-force development in Xcode. We’ve already experimented with a few, researched a bunch more, and they cover a complete spectrum of options. Many of them are very compelling, all of them involve a great deal of trade offs. Here are some highlights from our investigation.<\/p>\n First is the Baker e-book framework<\/a>. This is undoubtedly the easiest option, since you really just need a series of HTML files. Being a web developer, that’s not a problem at all. You just build a series of “pages” with HTML and CSS, aiming for the 768 pixels width of a potrait-oriented iPad, then build the resulting project in Xcode. In just a few hours, you’ve got a custom-designed e-book on your iPad. You can swipe left and right to navigate between pages, and swipe vertically to read more. You can even embed JavaScript if you need more interactivity, but it needs to be fairly simple.<\/p>\n We’ve already built a Baker project to show to a client, and while they were suitably impressed with how quickly we had a working app, the limitations are very apparent if you want anything beyond a simple e-book.<\/p>\n Next, in terms of complexity, comes the PhoneGap framework<\/a>. This is a little more ambitious than Baker in that it lets you make just about anything you want, using HTML, CSS, and JavaScript. Using PhoneGap (and optionally, a framework like Sench Touch<\/a> to give you iOS style widgets and features), you can make a very convincing app. You can’t build games or anything processor-intensive, but you can build simple apps in a way that we already understand here.<\/p>\n For example, we built a demonstration of an interactive e-book, using navigation widgets that look and behave just like the iPad’s, in an afternoon. It’s by no means finished nor acceptible at this point, but it does work and proves a concept. It’s also probably a decent way to prototype a more complicated app if you’re a web designer and are already familiar with the technologies involved.<\/p>\n Certainly, one big benefit from building in PhoneGap is that since you’re basically building HTML pages, you can use your existing toolset and the things you build can be tested – and used – in any web browser. So if you suddenly decide you want to see your work on almost any other platform besides Apple’s, you can do that. It’s an appealing option, but it isn’t one that interests us that much, since the iPad is the only thing we are building for, and we really want to optimize the experience for that one device. Not to mention that when you’re mostly limited to general web technologies, you aren’t always able to use the cool features of the device. There are exceptions to this rule, but it’s still worth knowing.<\/p>\n So far, neither of these frameworks lets you actually send something to Apple that’s using Objective-C, so you’re on shaky ground. Not only has Apple shown themselves loath to accept apps that don’t use their own programming language, the apps themselves don’t work nearly<\/em> as well if they’re not in that native language. It’s clear, for example, that an app built with Baker is really just HTML, if you know what to look for.<\/p>\n Why is performance so important? Turns out what we want to develop can be considered a “game.” I don’t like<\/em> to think of it that way, but we want something that children can interact with, and so performance is important. You want them to believe the illusion; to feel as if they’re really touching something with their fingers. Also, when you’re building a game, you are looking at controlling things like physics and animation of objects on-screen, which is exactly what’s going to make a compelling experience for a toddler.<\/p>\n Although I don’t play many games, I do<\/em> have experience making them, having spent a year in Santa Cruz during the dot-com bubble building 3D games. Because of this, I’ve got a pretty good idea of the importance of performance and of choosing the right framework from day one. Hence all the painstaking research.<\/p>\n This led us to examine some options for apps that were able to run on the iPad in the native<\/em> language. Last week, I wasn’t aware of any, but have since stumbled upon several promising options.<\/p>\n Cocos2d<\/a> is a framework that lets you add common game behaviors to your Objective-C code. This makes it easier to do the types of things games commonly do, like sprites (cell animation, like running characters), physics, detecting when things collide, having multiple “levels” (pages, in our apps), and so on. Having this at your disposal, for free, means you can build games faster, and you don’t have to reinvent the wheel. This is a very important shortcut.<\/p>\n This framework has actually been written for a number of different environments, and you can even build JavaScript games in a web browser using one of its many variations. It’s very interesting to me, but still very low level, and it still requires that the user master Objective-C, because you’re still writing in native iOS code. I don’t want to do this if I can at all help it.<\/p>\nBaker<\/h3>\n
PhoneGap<\/h3>\n
An Aside on Performance<\/h3>\n
Cocos2d<\/h3>\n
Corona<\/strong><\/h3>\n