What I learned while developing for the iPhone

Categories: Adobe Flex AS2 AS3 iPhone Objective-C XCode

Now that MASH, my first game for the iPhone and iPod touch, has been in the App Store awhile (more info here: http://magnatemobile.com/apps/mash), I thought I’d take a moment to jot down some of my thoughts on the experience and what I learned, not having done Cocoa or Mac development previously.

I came to Objective-C having had the bulk of my programming experience using scripting languages like ActionScript (AS2 and AS3), JavaScript, and PHP, as well as a fair amount of C# and Java. The transition to C style syntax and methodologies wasn’t a giant leap, but there was definitely a learning curve involved. These are some of the things I learned.

Coming from Eclipse-based IDEs, I was used to having the file and folder structure of my project in the editor match up to the structure I’d see in Finder (or Explorer if I was on Windows) - in XCode, though, you can arrange and re-arrange the files and groups within the editor without actually changing the location of the corresponding item in the filesystem. I’m still not sure if I like this - there are times when I want to re-arrange files (especially the location of graphics) in my project using Finder’s column view instead of XCode’s list view.

Know when to retain and when to release. Releasing an object that you needed to keep will cause your program to crash. Seems like a no-brainer, but not understanding why my app crashed when I would invoke a “Start Over” method I created had caused me to spin my wheels for about a half hour. Additionally, take care not to “over-release” an object - the console will spit out malloc warnings that aren’t self-evident as to their cause.

When it comes to creating an app from the get-go with multiple languages in mind, creating a Strings file first and then using NSLocalizedStringFromTable is one way to do localized strings, but isn’t necessarily the conventional way. After having implemented localized strings that way first, I later learned that XCode has a process for writing your code first with the strings you intend to use, and then allowing the compiler to handle creation of the necessary files.

XCode does a very nice job with HeaderDoc documentation. It’s much easier to use than Flex Builder and ASDoc, in my experience. HeaderDoc doesn’t try to document every class in your project like ASDoc does by default, just those you tell it to.

You may have heard horror stories about long waiting times and applications rejected for seemingly trivial or vague reasons - while that hasn’t been my experience, I will say that the process for submitting an application is less than ideal. It takes a lot of time, forms ask for information in a strange order (this isn’t exactly the process, but on some form pages it’s a little like: enter the information about your app, then choose graphics to upload; after clicking to upload the graphics and the page refreshes, the previously entered form information is wiped out and you have to enter it again - frustrating!). Submission to approval time for my app and updates have been fairly quick so far, less than a week from “In Review” to “Ready for Sale”, so I don’t think I can complain about long waits, although the anticipation of not knowing if your app will be approved or rejected is bad enough.

Overall, I’ve enjoyed the process of learning to develop for the iPhone. I’d imagine the learning curve is probably steepest for those without previous object-oriented development experience, but for anyone with a good idea and a willingness to learn (and shell out for tooling and a developer certificate), I’d say the effort has been worth it.

FI Launches Kontain Alpha

Categories: ActionScript Adobe Flex AS3 Cool Sites Flash RIA


Kontain, the Flash-based blogging and media sharing site from agency powerhouse FI launched its alpha version on November 13th. The evolution of FI’s Propod rich media blogging system, Kontain is a promising and beautifully designed site. The clean design is mildly reminscent of Virb, with a pinch of (new) Facebook thrown in for good measure.

FI is one of few firms that can do full Flash sites very well. However, understanding that it is still an alpha, the site really ought to provide alternate content for computers without Flash installed. And while the site does attempt to redirect to a slimmed down version of the site for iPhone/mobile users, on my iPhone sending to http://i.kontain.com/ failed because of “too many redirects”.

It remains to be seen if the lack of alternate content for search engines will be detrimental (although FI may have plans to provide alternate content in a future release), or if Google’s advancements towards Flash content discover-ability will overcome this sticking point.


As a funny side note, the back-end for Kontain appears to be running JBoss/Apache on a ColecoVision (operating at 3.58 MHz).

Even Richer Internet Apps with Adobe AIR 1.5

Categories: ActionScript Adobe AIR Adobe Flex AS3 Flash WebKit

Adobe AIR logo

Adobe has just released Adobe AIR 1.5. Now you can take advantage of great features like Pixel Bender for custom filters and fills, the new 3D effects, dynamic video streaming (based on available bandwidth), and the Speex audio codec, aimed at providing high-quality audio delivery at lower bandwidth.

In addition to the existing Encrypted Local Store functionality in earlier versions of AIR, Adobe has now added encrypted local databases, which will make it easier to encrypt and locally persist large data sets.

Also, as a follow up to an earlier post on the use of SquirrelFish in AIR, Adobe has confirmed that this is indeed the case. Adobe AIR 1.5 has a WebKit update that incorporates SquirrelFish - Adobe claims that HTML-based AIR applications can run as much as 35% faster.

Download version 1.5 of Adobe AIR.

Developer and User release notes are available as PDF.

On a related note regarding the Flex Builder 3.0.2 update that takes advantage of the new AIR runtime: be sure to change the app.xml XML namespace to use 1.5 instead of 1.0, as noted on this blog - http://www.bobsgear.com/display/ts/Can%27t+Launch+Air+Apps+After+Upgrading+from+Flex+Builder+3.01+to+Flex+Builder+3.02  I had trouble with my application until I found this post.

Mixed emotions: SVG versus FXG

Categories: Adobe Flex Degrafa Standards Thermo

Adobe has released a new vector graphics specification for Flex called FXG (Flash XML Graphics or FleX Graphics, ostensibly), an XML document format that should make interchange of vector artwork between applications and loading/parsing of vector art at compile-time or run-time more seamless. FXG has provisions for creating various primitives, symbols, and text objects, as well as constructs for transforming and applying bitmap effects to vector data. In a manner similar to Degrafa, FXG documents could conceivably be used for more than simple artwork: they could also be used to define vector-based skin elements for user interfaces. Additionally, vastly improved text handling in Flash Player 10 allows for higher-fidelity skewed and rotated text, along with text on a path, meaning exporting from an application like Adobe Illustrator should produce great looking, highly portable documents.

According to the FXG 1.0 specification, an initial effort was made to use the more standard SVG (Scalable Vector Graphics) specification, but the development team found that mapping SVG to Flex classes was going to be more trouble than it was worth in the long run. Mark Anders has a pretty reasonable explanation on this here: http://www.andersblog.com/archives/2008/09/flash_on_the_be.html

I can’t help but ask, though…really? Seeing as Adobe essentially led the charge to ratify the SVG spec as a standard, could it not have been augmented through its built-in extensibility facilities (see SVG Extensions) to accommodate the additions required for Flex? Mark’s explanation is reasonable, to be sure, but it seems like the team gave up on something that could have helped to further cement and promote the use of SVG. A project I’m working on, in particular, would have benefited massively from the ability to use SVG output from Illustrator natively.

Pushing multiple specs that essentially do the same thing only serves to muddy the water, and reminds me of another large software firm, but I digress. Knowing Adobe’s track record, I’m sure there will be good interchange functionality for FXG between various Creative Suite products and applications like Thermo. However, considering SVG already has acceptance as a standard, with a plethora of third-party tools for transforming and working with it, my excitement on the prospects of FXG are mixed at best.

Adobe and Zend announce collaboration

Categories: Adobe Flex AS3 PHP


via The Official Flex Team Blog

Adobe and Zend have announced their collaboration in bringing together the benefits of open source Flex with the reliability and flexibility of the enterprise-grade PHP Zend Platform (official press release). A recent article on Adobe Developer Connection details how to get up and running with Zend Studio and the Eclipse plugin version of Flex Builder 3.


Adobe Thermo Demo at 360|Flex

Categories: ActionScript Adobe AIR Adobe Flex Flash Thermo

Mark Anders from Adobe gave a preview of Thermo and Flash Player 10 at the 360|Flex conference. It’s a good video for designers interested in Flex-based RIA UI development and for Flex programmers interested in what’s on the horizon for designer/developer collaboration.

Flex in a Week video training

Categories: ActionScript Adobe AIR Adobe Flex AS3 Howto

Adobe is offering Flex training on their developer site using videos and supplemental PDFs. Check it out here: http://www.adobe.com/devnet/flex/videotraining/

As of this writing, days one through three have been added.

Invitations to Aviary

Categories: Adobe Flex AS3 Cool Sites

I currently have five four invitations to Aviary (http://a.viary.com/) if anyone is interested.

Flex 4 to improve designer/developer workflow

Categories: Adobe Flex

Adobe Developer Connection has posted a video demonstrating some impressive upcoming skinning features in Flex 4 that should greatly improve designer/developer collaboration and workflow on projects. One thing I’m left wondering though is how Thermo is going to play into this system.

Keep reading to see a video.

Keep reading “Flex 4 to improve designer/developer workflow”...

Using Flex Builder 3 with Subversion on Assembla

Categories: Adobe Flex Howto

Source control. We all know we should be using it. The peace of mind benefit alone is enough to aid in speeding development – a programmer who isn’t concerned with self-versioning his files is a more productive one. Then there are the other benefits, like code comparison and streamlining workflow for a team-built project.

Setting up Trac and Subversion can be somewhat painful the first time around, so if you’re looking for a quick and easy hosted system (with a whole mess of other features, too), I suggest taking a look at Assembla.com.

Keep reading “Using Flex Builder 3 with Subversion on Assembla”...