iPhone development tools that work the way you do

You don't need to master Cocoa and Objective C to create killer iPhone apps. Rhomobile, PhoneGap, Appcelerator, and Ansca tools leverage standard Web technologies and still tap native features

1 2 3 4 5 6 7 8 Page 6
Page 6 of 8

The role of HTML and CSS here is a bit diminished. While you can certainly mark up pages in HTML and use all of the AJAX tricks with your pages, the simplest solution is to avoid it. Many of the examples from Appcelerator begin with HTML files that include just a few lines that fire up the JavaScript that does the real work. If you write CSS, it will affect the HTML that you add but not the controls created by Titanium. They'll follow Apple's UI guidelines. I wouldn't be surprised if the CSS file in your project is completely empty and the HTML has just a few lines that invoke the JavaScript.

Much of this could change in the near future because the mobile platform is still in a closed beta program. The company is rolling out new features frequently; it added a number of new widgets in version 0.5 released just a few days ago. The latest includes access to the accelerometer, the camera, and the geolocation data, all available in JavaScript.

The current version produces applications for only the iPhone and Android, but the structure should allow Appcelerator to move to other platforms in the future if it so chooses. The fact that Titanium can work directly with JavaScript instead of HTML and CSS means that it may even port neatly over to older phones that don't use WebKit. That's speculation, though. Appcelerator's road map is clearly focused on the iPhone and Android.

Ansca Corona

At this writing and perhaps for a long time to come, Flash code is ignored by the iPhone. Flash developers, though, now have a way to put their scripting skills to use on the iPhone: by using Ansca's Corona SDK. You write Lua, and Corona turns it into an iPhone app.

This framework may be the most accessible to many Flash and game developers because Lua is often used in these worlds. Flash Lite games, for instance, should translate relatively easily, although adapting them to use the accelerometer and the multitouch screen will take some work. The Lua language includes a number of basic features that makes animation simple.

Ansca adds several new features to the language designed specifically to help animators. The transition and easing methods will help calculate all of the positions for tweening objects in the display, something that helps set up animations. It won't handle complicated curves, but it will work with linear, quadratic, and exponential transitions.

The framework handles all of the details of initializing OpenGL and the Objective C, making it easier for Flash programmers to create iPhone applications without learning about pointers or malloc. Not every part of OpenGL is available through Lua, though. Three-dimensional extensions are still in the planning stages. You're limited to 2-D games, just like most Flash developers.

Corona's Lua is made for sending sprites dancing across the screen.
1 2 3 4 5 6 7 8 Page 6
Page 6 of 8