Monotouch or Titanium for rapid application development on IPhone?
Asked Answered
P

7

27

As a .NET developer, I always dreamed for the possibility to develop with my existing skills (C#) applications for the iPhone.

Both programs require a Mac and the iPhone SDK installed.

Appcelerator Titanium was the first app I tried, and it is based on exposing some iPhone native api to javascript so that they can be called using that language.

Monotouch starts at $399 for being able to deploy on the iPhone and not on the iPhone simulator while Titanium is free.

Monotouch (Monodevelop) has an IDE that is currently missing in Titanium (but you can use any editor like Textmate, Aptana...)

I think both program generate at the end a native precompiled app (also if I am not sure about the size of the final app on the iPhone as I think the .NET framework calls are prelilnked at compilation time in Monotouch).

I am also not sure about the full coverage of all the iPhone API and features.

Titanium has also the advantage to enable Android app development but as a C# developer I still find Monotouch experience more like the Visual Studio one.

Which one would you choose and what are your experiences on Monotouch and Titanium?

Petrina answered 28/9, 2009 at 17:48 Comment(5)
What is so scary about learning a new technology? It's a new platform, afterall.Impersonalize
learning a new language just for one platform doesn't make sense. Next year a Nokia or Linux phone will be the next big thing, and you have to learn a new language all together again. Iphone supports c and c++ and now through these technologies c#. I would go with what I knew too. (although looking at new languages is never a bad thing... but to start working in it just for this one platform is another thing)Ics
If you rather spend months wasting time with second rate tools, than spend days learning a new programming language; then you should be ashamed to call yourself a programmer.Encarnalize
@reinier I would guess that the chances of any other mobile platform approaching the reach of the iPhone within the next 2-3 years is minimal. But, if another mobile phone does come along, another 2 weeks of learning every 2-3 years isn't really that much of an investment. If you want create great applications for a (any) new platform, don't start out by crippling yourself.Saguaro
I know this is from a while back, but thought I'd drop in to see what was doing. Just wanted to say that people are missing the point when talking about whether or not it's smart/stupid/silly/etc. not wanting to learn the native tools. The OP doesn't deserve a bunch of flack for wanting to take advantage of an existing skillset. I use the native tools and MonoTouch, and as someone who prefers C#, I have a lot of interest in MT. Not sure what's wrong with that. And if you think MT is a "second rate tool," there's no way you've seriously checked it out. Apple should be grateful it exists.Landscape
L
95

Like any which-tool-or-platform-or-language-or-framework-or-whatever question, it should really come down to what you want.

Forget all the if-you-want-to-develop-for-this-platform-then-you-have-to-pay-your-dues advice. If you're interested in learning Objective-C, Xcode, and associated Apple bits, then go for it. I did. It's been fun, but my interest was in developing iPhone apps. Learning a new language, framework, and IDE was just a bonus (I like this stuff). It was also necessary when I started.

I've been working with MonoTouch since it was released, and I love it. I prefer C# to Objective-C, and I like having access to the subset of the .Net (Mono) framework that MonoTouch provides. There are certain things that are simply easier to do with .Net than Cocoa (string manipulation, date manipulation, anything XML, etc.).

I also like not having to deal with reference-counting anymore. I was spoiled by years of not having to keep track of resources at that level. I don't mind having to clean up after myself, but I don't want to have to manually do something that every other modern dev platform I've used does for me automatically. Plus, even for seasoned Objective-C devs, reference-counting isn't a no-brainer. Scroll through OS X's console output sometime to see how many apps crash due to memory-management issues (I know - this can happen with basically any app, but it's far easier to make the mistakes that lead to this situation when you get overworked devs involved whose attention spans have been destroyed by twelve hours of if this and if that and else this and else that and blah blah blah).

I still use Objective-C/Xcode - I've really learned to like Apple's tools. I honestly feel they're awkward and a bit arcane, but still fun.

But... then I also like this:

public string SomeString { get; set; }

To do the same thing with Objective-C (on the iPhone, anyway) requires that you declare a local variable to back the property, write the property declaration, and then use the "synthesize" directive to have the property generated for you (depending on what property attributes you specify, you might have a property that wraps getters and setters that take care of reference-counting for you - overall, this is a time-saver, but the C# Way is the clear winner here).

That's just one example of how MonoTouch can make your life easier, especially if you're used to .Net/Java/Python/other languages that don't require that you get your fingers dirty with memory-mangement (unless you want to).

As far as iPhone-ness is concerned, aside from brining part of .Net to the iPhone world, the MonoTouch namespace maps to CocoaTouch, so if you're confused about, say, the MonoTouch UIViewController, you can just hop over to Apple's docs on the UIViewController. MonoTouch .Net-izes CocoaTouch, but it's close enough that you're unlikely to hit a wall (that wouldn't have also hit if you were using Xcode/Objective-C). It's slick.

Titanium is different. Since they're trying (trying) to create an abstraction layer that lets you write the same app for multiple platforms, you're going to deal with the usual drawbacks: Totally different APIs, loss of flexibility (the same could be said of MonoTouch, but not remotely to the same degree), and basically having to learn a whole new platform (which is what you're trying to avoid by getting around Xcode/Objective-C/CocoaTouch, right?).

I also hate JavaScript, so I'm going to be biased against Titanium. But even if that weren't the case - even if I could use a language I do like - the APIs don't tickle my fancy. Or my anything.

Regardless of the dev tools you choose, you will end up having to learn something about CocoaTouch. Whether it's Xcode/Objective-C, MonoTouch, or Titanium, something is going to break or go all wonky on you, and you're eventually going to have to refer to CocoaTouch documentation.

If I were giving a talk on iPhone development (which I have, and which I will be doing again), and if I were to discuss alternatives to Apple's dev tools (which I will), I would still strongly encourage devs to at least work through a few basic iPhone apps using the native tools. It's going to make you a better developer for the platform - period. And you can use this beginning phase to determine if you even want to use anything other than the free Apple-supplied bits. You might not. I've been using MonoTouch because it pleases me - not because it's necessary.

So, to summarize a few basic criteria:

  • Preference (language/frameworks)

  • Devices (do you care about non-iPhone platforms or think you might someday?)

  • Comfort (if you like and know C# MUCH better than Objective-C, there's no reason not to go with MonoTouch)

And don't listen to the naysayers unless they've actually used the tech they're talking about. For example, I've read about Titanium, but I'm not experienced with it - I just know that I don't want anything to do with it on account of my preferences. That doesn't make it "bad" - just something I don't want in my life.

The Objective-C crowd can be impressively zealous. While there are plenty of open-minded devs in it, there are so, so, so many who think Objective-C and Cocoa and blah blah blah are THE last dev tools devkind will ever need.

Ignore them.

If you're worried about support, here's some stuff to consider:

  • Apple is likely to remain current, as they're the ones making this junk.

  • MonoTouch is likely to remain current - the Mono peeps have done an amazing job keep up with Microsoft, and I see no reason why they won't do the same with Apple. I'm blown away by what they do. And despite MonoTouch having been released, like, five minutes ago, they already have an update out for iPhone 3.1 stuff. They're serious about this, and I think they're magic. They're the Keebler Elves of the dev world. They sit in their secret layers and crank out stuff everybody (ok - not everybody) likes, but that nobody else would even attempt to do.

  • Titanium is either going to become an awkward unified API for writing apps for multiple platforms that is entirely its own thing, or it's going to become more and more splintered as the capabilities of different platforms diverge. Yeah, that's a bunch of typical armchair nerdly future-gazing... I should have prefaced this bullet item with "It's my opinion that..." If only there were a way to go back and change it.

Go with what you like. MonoTouch is a "safe" alternative to Apple's stuff. I'm afraid Titanium is going to go down the same old oops-this-super-high-level-platform-abstraction-layer-stuff-doesn't-really-work road that so many other technologies have. But if you're doing something simple, there's no harm in giving it a shot, especially considering that it's free during the beta period.

Landscape answered 4/10, 2009 at 3:2 Comment(4)
Rory, thanks for this clear and deep explanation that really gave shape to the various possible choices.Petrina
God damn that is a very helpful answer. Thanks for sharing what you know.Willed
Very nice answer. I like MonoTouch which is very very useful.Neopythagoreanism
Rory,not that i have anything to do with Mobile Dev for the time being, but i just wanted to applaud your Input man, so well written and the logic flow is superior, you should be a debater :)Galbreath
S
4

These are fun and interesting ways you can build iPhone apps. But, for truly rapid native iPhone development, your best bet is the free iPhone SDK and Xcode.

To be honest, the hardest things to learn are the capabilities of the frameworks themselves, NOT the language syntax. But that is an issue you have to tackle either way as these IDEs/Languages still require you to grasp some of the conventions of Cocoa (and Cocoa Touch).

I don't say this as a Cocoa / Objective-C snob, but if you know C (which as a C# dev you do) there really isn't any barrier to entry.

In addition, you will have access to tons of tutorials and sample code that just won't be available for these fledgling translators/IDEs/languages.

Learning another programming language is rarely a bad thing, and as an experienced programmer, your time investment won't be as large as you think.

Saguaro answered 28/9, 2009 at 18:2 Comment(5)
Using MonoTouch for iPhone development because you already are a .NET programmer, is equal to welding a wooden bookcase because you already are a welder. Sometimes learning a few carpenter-tricks is good, especially if you want to avoid fire.Encarnalize
Using MonoTouch to "weld a wooden bookcase" is like having a welder you already know to use, but that magically hammers, screws, and glues the bookcase together without your having to know about the details. You can dig in and figure out your new magic welder, but you don't have to. If your goal is to build or fix a bookcase, and if all you know is welding, then... hey - go for it. Some people want to learn all about the gear - some just want to build things. With MonoTouch, you can do both (MT has taught me more about Apple's tool stack - that's awesome). Try it before you knock it :)Landscape
To be clear, though, I think every MonoTouch dev can greatly benefit from learning Apple's stack. I just don't feel they have to. I know that having done iPhone dev work for a year made it far easier for me to grok MonoTouch. Won't pretend that's not the case. But, speaking of "learning a few carpenter-tricks" - wouldn't you say that learning MonoTouch is doing just that? There are times when one stack makes sense over the other - I like having that choice. But, back to the beginning: I do recommend MT devs spend a few days with Apple's stack - it's fun, helpful, and can't hurt.Landscape
I would say that learning .NET on a Windows box or for web development definitely falls under learning new carpenter tricks. A lot of quality products are built in VS (we're using one now!) But I would not say the same of MonoTouch. MonoTouch is an abstraction layer on top of Cocoa Touch, specifically created to lower the barrier to entry for .NET devs. It doesn't actually add any capabilities to the stack that weren't there before. I can't think of an advantage (but I could be wrong) that experienced Cocoa/iPhone devs would gain from specifically learning MonoTouch.Saguaro
To piggy back, I don't have anything specific against MonoTouch. I would only say that square brackets and @ signs shouldn't scare you away from the language. It really is just C with very thin layer or OOP added.Saguaro
C
3

I've created an open source project http://propertycross.com that helps developers select a cross-platform mobile framework by showing the same application implemented with Sencha, Titanium, Xamarin and more. This project allows you to easily compare a wide range of frameworks in terms of end-user experience, code, IDE, developer experience etc ...

Crescint answered 28/12, 2012 at 15:15 Comment(0)
S
2

I kinda like the idea of providing means to quickly get a grip on iPhone dev with techno people already know. I personnaly, as a Java developer, use iSPectrum (http://www.flexycore.com). It also come with an IDE, debugger and stuff, which make it really convenient to develop with because it benefits of all the power of Eclipse Java plugin. Being based on Java, this also allows to easily reuse already existing code from other java apps, which can be really handy providing that Java is present on almost all platforms (desktop & mobile alike) except iPhone. Plus it's free for open source projects.

I'd rather consider these kind of solutions, because I don't like the idea of coming back to developing in emacs :) .

Sapele answered 24/3, 2010 at 8:28 Comment(0)
B
2

I know this is an old topic, but in the interest of staying current, it looks like MonoTouch and other cross-platform frameworks are going to be banned in SDK 4.0. Your only "safe" bet for writing iPhone apps is to use XCode and Objective-C, at least for the time being.

Betelgeuse answered 13/4, 2010 at 4:42 Comment(0)
C
1

If you're C# programmer why you shouldn't invest some times to learn Objective C. Honestly speaking, it will not take much time from you. But you feels good to work in a new platform with new language. Learning new things all time fascinates me.

Canna answered 20/7, 2010 at 15:43 Comment(0)
B
0

There are numerous ways to get on the device. Apple has stated in the SDK license that the only approved way to get on the device is via C, C++, ObjectiveC, and Javascript.

It appears at this point in time that apps built on MonoTouch and Appcelerator Titanium are being accepted into the App Store. Thanks to the license change, there is much fear, uncertainty and doubt on this subject. Apple has scared everyone not doing ObjectiveC.

I would suggest that you do whatever makes the most sense for you as a developer. If you know C# and .NET, you should go with MonoTouch. If you know ObjectiveC or the Mac platform, ObjectiveC is probably the way to go. If you know X and it's on the iPhone, well, X is where I would suggest looking first.

Benzine answered 1/7, 2010 at 12:30 Comment(1)
The down voters should at least provide feedback to the user.Squill

© 2022 - 2024 — McMap. All rights reserved.