Thoughts from the Furry Tail Apps gang We create apps for iOS and Mac.

14Nov/100

Is Appcelerator Titanium good to use for iOS and Android development?

Appcelerator Titanium has been around for a while, and seems to be a neat way of developing multi-platform apps without having to maintain multiple code bases. But as all frameworks of that kind, it does seem a little too good to be true. And as there’s no way of knowing without trying it out, I figured it’s time to give it a shot.

I’m not going to get in to all the details during my Titanium experiment. Instead, I figured I’d break it down to the pros and cons I’ve come across. Note that they’re not all of the same importance; some are minor, whereas some are very important.

First, the pros

Single codebase, multiple platforms
The obvious one. Having to maintain only one code base, which can be compiled to multiple platforms is a very nice thought.

Doesn’t require Objective-C or Java expertise
If you’re not comfortable with writing Objective-C or Java code, or just not in to learning new programming languages, Titanium is going to be a very nice experience. Everything is written in Javascript and later compiled into native Obj-C and Java code.
It’s very nice and easy to get started if you’re used to writing Javascript, but that also means that you can’t use a lot of the nice things about both Objective-C and Java.

Fairly small amount of code
Compared to a similar Objective-C project, the Titanium project turned ended up with fewer lines of code. Especially parts like the Facebook integration was pretty lightweight.
Also, there were some nice simplifications in some areas, which required me to write less code.

… and the cons

No interface builder
Interface builder is a very neat tool for laying out your user interface for iOS apps. In Titanium, there is no Interface Builder, meaning you’re restricted to laying out all your views in code.

Building to device takes a long time
As the Titanium Javascript code has to be converted to Objective-C code, building to the device takes quite some time. Instead of taking 10-20 seconds, every build took me at least a minute or two.

Poor error reporting
It was quite difficult to find reasons to errors during the development. A lot of the times, all I got was generic error messages which didn’t really give me any good reason to why it crashed.

Javascript isn’t Objective-C or Java
As mentioned, it’s nice and simple to develop your apps using Javascript. But you’re missing out on some nice things that exist in the other languages, i.e. the structure provided by the stricter rules of Java or Objective-C. Compared to Obj-C and Java, it is in fact more difficult to keep your Javascript code organized, clean and tidy.

Lots of generated code
When Titanium converts your Javascript code to Objective-C, it generates lots and lots of classes. When looking at the generated Xcode project, it contained around 450 classes even though my project was only around 10 files.
This isn’t necessarily a big problem, but since so many files are built in to your app, you don’t have much control of its file size.

Bugs in the UI
I know that Titanium is under development, but one very annoying thing was that the UI it generated turned out to be a bit buggy. The navigation controllers didn’t work properly, causing some navigation controller animations to freeze, hence breaking the UI.
If that would’ve happened in a real App Store product, it would have been a disaster. (I reviewed the code a number of times, and couldn’t find anything wrong with it.)

Difficult to find solutions
The business model behind Titanium seems to be to provide users with tutorials and help in exchange for some, quite expensive, training programs. This is probably one of the reasons to why it can be quite difficult to find solutions to any obstacles you might run in to during development.
There’s of course the Appcelerator Developer Center forums, but unfortunately I don’t think they’re sufficient. In any case, it’s not as easy as finding help with Objective-C issues.

Problems getting Android builds to work
I had lots of problems getting my Android builds to work; the emulator didn’t start as it should have done and I didn’t get any decent error reports.
As I couldn’t get the Android builds to work, I ended up only focusing on the iPhone. I’m sure there’s ways of solving the build issues, but I couldn’t find any help on that particular issue…

Random crashes without appearant reason
One of the most serious issues is that the app crashed occasionally without any appearant reasons. And as the error reporting was insufficient, it’s very difficult to troubleshoot. As with the UI bugs mentioned above, this would definitely have stopped me from releasing the app to the App store.

Conclusion
All in all, I have to say I’m disappointed with Appcelerator Titanium. At first, it all seemed very nice and easy, but as the issues got more and more serious, I realized that it really was too good to be true.

It’s probably worth pointing out that I didn’t sign up for any of the Appcelerator training program, which might point out some quirks and other things that would reduce the risk of bugs. But I have many years of programming experience and did try my best to find solutions to the problems in the dev forums and by googling…

Titanium could possibly be used for prototyping new apps or features, as the Javascript development was quite rapid. But as there were at least a couple very serious issues, I can’t say I recommend anyone to use it in its current state.
Releasing an app with bugs like the ones Titanium caused would’ve been a complete failure…

I’m hoping that the issues I’ve raised will be taken care of in the future, as the I still believe that Titanium is a good idea.

At the moment, I’d rather develop my apps the old school way using Java or Objective-C.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.