A Week (Wasted) With Titanium Studio
Last week I thought I'd invest some time in furthering my skillset and learn to develop mobile apps for both iOS and Android using Appcelerator's Titanium Studio.
My long-term plan is to get in to the mobile app-making market. To start down this path I need to be able to show that I've made some apps. So, I thought I'd make one and get it on the markets for free download. Then I can at least prove I know what I'm doing.
Titanium Studio seems the obvious choice for this task, as:
- You can target both major mobile OSes with the same source code.
- You code in JavaScript, which we're all familiar with.
- No need to learn to use XCode or learn Objective C.
After a week with Titanium this is where I'd got:
No prizes for working out what the app does. On the left you see a snapshot of my stock portfolio as it stands today (not a pretty site in itself). On the right a simple watchlist of stocks.
There are plenty of stock-tracking apps out there but none that meet my needs. As a casual investor I only really want a quick snapshot of where I stand. Not really bothered about volumes of shares or 52-week high/lows and all that.
The app you see above works, is on my phone and I'm actually using it. However, I'm not going to develop it any further! Not in Titanium anyway!!
The Trouble With Titanium
It shouldn't take a whole week to make a simple app like this one above. With a good, well-documented API it shouldn't take more than a couple of days. It took ages though because it isn't well documented and it's also full of bugs. I spent most of the week Googling for answers to ridiculous little things that ought just to work, but don't. Overall it was a very frustrating experience.
There are also lots of things you can't do on Android when using Titanium, which makes it quite restrictive in what you can come up with. I don't like feeling restricted by the tool I choose.
I read during the week somebody saying that Titanium is brilliant - if you're making iOS apps! That's the sense I got too. That Android, as ever, is playing second fiddle to iOS at the moment in terms of Titanium support.
When I come to make the same app in iOS then I'll no doubt use Titanium for that and - no doubt - I'll find it a much more pleasant experience.
For now though I'm giving up on it. Sorry I can't be more specific on what bugs and problems I encountered (they're too numerous to try and remember). The overall impression I got from using Titanium to make an Android app is that it just isn't ready yet.
Going Native
My plan is to re-build my app using native Android code (Java). To do this I'm using Eclipse with the Android toolkit installed. I'll talk about how to get started with that later in the week.
Already after a day with Eclipse I'm feeling much more comfortable - writing "real" code. Here's betting it doesn't take me a week this time!
Interesting to hear your experiences with Titanium. I've played with it myself, but it didn't "stick" for me, for some reason.
Having since completed a load of production web stuff with jQuery Mobile, I'm inclined to give wrapped native apps another look-see. So far, I'm tending more towards PhoneGap (certainly the documentation looks a lot better than that in Titanium!) -- worth a shot for you too?
It would be interesting to compare how you get on creating your stocks app in a competing tool-set.
Reply
I don't know what it is but I think I'd just be happier going native. Any other way and you have inherent limitations. Only with native can you unleash the true potential of these amazingly little smartphones we're all carrying around.
Obviously, as with *everything*, it's horses for courses. There will always be times when there's no need to go native and a web-based app or Titanium app will suffice.
Not tried PhoneGap yet. Might give it a whirl.
For now my interest is in native. I have some ideas for apps which only native code is going to deliver -- access to contact lists, sending SMS etc.
Reply
Show the rest of this thread
Jake,
Good take on Titanium. I have been using it for over a year now and totally agree with your analysis on the Android side. On the iOS side we created this app which I don't know if you have seen http://www.tsazr.com. If you have any questions or need any help with Titanium/IOS please feel free to reach out.
Best,
Bruce
Reply
Is that why there's no Android version of your app?
Reply
Show the rest of this thread
quote:
===
It shouldn't take a whole week to make a simple app like this one above. With a good, well-documented API it shouldn't take more than a couple of days. It took ages though because it isn't well documented and it's also full of bugs. I spent most of the week Googling for answers to ridiculous little things that ought just to work, but don't. Overall it was a very frustrating experience.
===
Come on, you used to do Lotus Notes development for a living. You should be used to this kind of stuff by now :-)
(*seeking cover...*)
Reply
Used to it enough to know when to quit. I never really had much choice in my continued use of Notes (circumstances meant it would have been foolish to walk away from it at any point until recently), but now I have a choice in matters I know when to walk away from tools that don't make me happy.
Reply
Thanks for posting about your experience. I downloaded Titanium over a year ago, looked at it, and never returned but have been feeling all kinds of pressure to return to it.
Your experience mirrors my perception of the tool and kind of what I thought about going native for mobile.
Reply
The utopia fed to us in lashings of hype by appcelerator is not much worse than utopia we're fed by the platform vendors as well. Google are particularly guilty of presenting "geek candy" of helloworld and scrolling/tab simplicity on their site, which appears to be simple but in reality is developer bait.Tempting you to waste, i mean, invest time in their toilets, oops I mean toolsets, autoselect making me do a freudian-slip ;)
The pay off is pretty limited as you have only mastered one platform with 2 others going begging, after months of knuckle mashing. The vendor is happy because they have your mental headspace and motivation by the gonads. really evil stuff actually. There is hope with html 5 but this is implemented poorly and inconsistently, and It's 2001 all over again.
But, Sencha Touch is worth a look as they have used their IP in Ext to help you build platform independent mobile apps...
Reply
That's a bit harsh isn't it? ;-)
Native Android dev seems ok to me so far. Takes a bit of getting used to the idea of intents, activities and views, but you can't expect to pick things up immediately.
With Sencha touch and the likes, can you package as an app to put in the AppStore/Market?
Reply
Show the rest of this thread
Why is it that you don't even mention flashbuilder? Isn't that an option at all?
Reply
Yes, it's an option. And one I'd consider using if a situation arose where it was the best fit.
This exercise for me though was about learning to be a mobile developer. I'm already a Flex developer, which makes me a mobile developer of sorts now that 4.5 is here. I did have a go at making mobile apps with Flex and it's incredibly easy. For my personal projects though I'd be reluctant to use it. It just feels a bit wrong.
Reply
Phew ... I so pleased you said this ... as at the time i spent half a day looking at stuff too ... seduced a bit by the "geek candy" (thanks Giulio ...) i too found the whole experience very frustrating, but i thought it was just me ... !
Totally agree with you, if you spend all day writing code, you have to be happy working with the code (of course unless you are being paid by a client to work in a dev environment ;-) ...
Reply
Just say no to IDEs that claim to perform well across multiple mobile platforms. I used the below quote and post from StackOverflow in a recent debate on my latest iOS project. After everyone had read the below... I didn't hear anymore noise about "alternative" IDEs for iOS or Android and we stuck with XCode and InterfaceBuilder. I'm sure in a few years they'll be mature enough to actually abstract the process well... but by that time... HTML 5 will be in full swing and who knows what the native vs web development landscape will look like (maybe native hooks from WebKit built in?). Admittedly I did try Adobe's latest efforts with Flash 4.5, but was disappointed when I couldn't find any documentation on native hooks to the phone services (Location, Audio, Camera Roll...) when creating a simple build for iPhone.
http://stackoverflow.com/questions/1482586/comparison-between-corona-phonegap-titanium
"As a consultant trying to deliver rather simple apps to multiplatforms for a customer - I'm not sure this is actually faster than doing native app development on two platforms. This is due to the fact that when you are up to speed you are fast with Titanium, but then suddenly you look down and find yourself in a hole so deep you don't know how many hours must be spent for a workaround. You can simply NOT promise a certain functionality for a certain deadline/time/cost."
Reply
That's pretty much how I felt. I came away from Titanium thinking I'd rather learn to use XCode *and* ADT/Eclipse than deal with the myriad bugs in Titanium.
From what I could tell the Android-based Titanium app I made isn't truly native (as I understand it at least). Rather it's partly native and runs "interpreted" javascript at runtime. I could well be (and probably am) wrong though.
One of my major issues with the Titanium app was performance (or lack of it). Opening tabs with tables on them had a very definite lag. Not so in the pure native app I've gone on to make in Eclipse, which is as snappy as I'd expect it to be.
Reply
Thanks for sharing your experience.
While I don't want to come across as a bad workman blaming his tools, I'm in the same boat with Titanium. The "Zero to app" nonsense only really applies if you are avoiding doing anything particularly decent with Android.
I get the feeling that this is definitely a product that is focussed on giving web/javascript developers a way into the native mobile apps marketplace. It's so not for you if, like me, you're coming to it from a native mobile developer perspective and you know what you can expect to achieve on the device using XCode/Obj-C or Eclipse/ADT.
I decided to go for Titanium specifically to build the Android version of some apps we had already made for iOS the XCode way and with an eye on being able to quickly get to Blackberry prototypes too. Big mistake. I now "find [myself] in a hole so deep [I] don't know how many hours must be spent for a workaround". Thinking about just biting the bullet and going for a crazy native rebuild scenario.
Simple stuff won't work: Like native Android MapViews won't load alternate res images for custom map pins automatically and if you reference the alternate images directly, it will run ok on the Emulator but crashes on any device. The only alternative seems to be to swap them out for a WebView loading Google Maps the HTML/JavaScript way... glah! And nine patch graphics won't load in Titanium 1.7.x (latest SDK), or they have changed the approach and not changed the docs... the docs say that they should work. I would have thought these are fundamental to building quality Android user interfaces.
On top of that, it won't let you run custom AVDs (need to start testing for qHD or Tablets? Forget it.). There are more issues besides.
My conclusion is that if it looks too good to be true, it probably is. It certainly hasn't saved me any time, and I'm plus one on the the performance issues with TableViews too...
I have persevered for over a month but I think I'm now pretty much broken by it - here's to 'going native'!
By the way, I'm totally happy if anyone can shoot down the issues I raised above and prove those problems are down to me being stupid and not Titanium failing to deliver on it's promises... :-)
Reply
Frustrating!!!!
now it is one week I am trying to understand how do deal with hierarchy pats, such changing the text of a label in a table row.
It is full (google and titanium support) of controversial tutorials and sample code, and, after one week of trials nothing seem to work.
The tutorials are just too much evangelisted, even for those with years of javascript experience and some native iOS experience.
and, what most frustrating, if happen that what you do for iPhone don't work for Android, there is no alternative suggestion
The API documentation, for how it presents to a new user, is simply impossible to understand.
Lack of code examples, a mess. Many resources, but with the same content.
Think that the main tutorial, the one suggested to learn almost every API, gives an error while importing in titanium.
The GIT website is different that the one shown in the tutorial, and you don't know what to dowload.
Have no idea how to proceed. One of the most frustrating experiences since I begun to code 20 years ago.
Reply