3

I would like to know, in order to use MONO TOUCH to develop app on iOS, if it is better to learn :

  • Objective-C / Cocoa Touch
  • C# .NET

I ask for that because my boss wants to send me in C#.NET formation instead of Objective-C /Cocoa Touch and i am not sure it is the best decision

Thanks for Help !

Romain
  • 91
  • 1
  • 1
  • 9
  • Why does your boss want this? I cant think of any decent reason... – borrrden Mar 28 '12 at 14:41
  • Because they want to use that code to developp apps on Android too ... and for them it seems to be the better way ! – Romain Mar 28 '12 at 14:50
  • I have never used monotouch, but I have tried another multiplatform solution. It was nothing but a huge pain in the ass of figuring out which parts are supported in which platform. Android and iOS are so vastly different that I feel like maintaining two code bases would actually be just as hard.... – borrrden Mar 28 '12 at 14:58
  • So you, finally, NOT RECOMMENDED to use this platform to develop the same application on Android and iOs – Romain Mar 28 '12 at 15:02
  • I cant comment on monotouch having never used it. I only suggest being cautious about multi platform solutions. – borrrden Mar 28 '12 at 15:11

5 Answers5

5

I think that you need to determine what your higher level goal is for a decision like this. Personally, MonoTouch was the only path for me, as I am a .NET developer working at a .NET shop so my company would buy-in for this but wouldn't want to take a risk of doing it in Obj-C.

I know very little Obj-C, but I can say that everything offered in the BCL (Base Class Library) makes coding in MonoTouch easier. With support for LINQ, Generic lists, File IO, etc..., going .net seems like a pro (in my opinion).

In the end, you will be overriding the same methods and calling the same methods to do what you need to do things in iOS. However, MonoTouch wraps some functionality making it easier to do things.

Take into account that my point of view is highly subjective as I am a .NET developer.

valdetero
  • 4,624
  • 1
  • 31
  • 46
  • Thanks for your answer ... So now you know i don't know C# but i know a little bit objective C (i have developp 2 littles apps) ... do you consider it would be a better way to learn C# or to improve my Objective C knowledge and after learn C# ? What is for you the fastest way to be able to be operationnal ? Thx – Romain Mar 28 '12 at 15:25
  • If you know some Obj-C and you want the fastest way, then go Obj-C, plain and simple. With them both being descendants of C, they do have similarities that will make it easier to go from one to the other. I've never messed with memory management or ARC in Obj-C, but I hear it can be a pain. MonoTouch abstracts that all out for you. – valdetero Mar 29 '12 at 14:17
3

If it's already sure that you will be using MonoTouch, you need to know C#. You will whatsoever need some knowledge of objective-c / iOS-development, because you sometimes will need to know how the functions are called etc.

UPDATE: To answer your question in the comments, it's not so easy to decide. I really like MonoTouch and it's definitive a very good way to develop iOS-Apps. Maybe you can get some information you like to know from my previous question. I would not use objective-c to develop iOS-Apps, as you can use everything that objective-c has in MonoTouch too.

WARNING (subjective opinion follows): C# is in my opinion a way better language than Objective-C and it's much more modern. So why stick with this ancient technique?

UPDATE2: Just seen your update about Android. For multi-plattform-development there are only 2-3 choices atm:

  • MonoTouch / MonoDroid
  • Webdevelopment (HTML5 etc.)
  • Adobe Flex

Every 3 of them has different pros and cons. But if it should feel and look native, you will stick with Mono* in the end as it is the only one (of the above mentioned) that actually uses the native libraries.

Community
  • 1
  • 1
basti
  • 2,649
  • 3
  • 31
  • 46
  • 1
    Do you consider it is a good solution to use a system as Mono Touch ? – Romain Mar 28 '12 at 14:46
  • Out of curiousity, can you vouch for monotouch as working equally well on both platforms? I am very apprehensive to cross platform solutions since my unfortunate run in with appcelerator titanium... – borrrden Mar 28 '12 at 15:01
  • Yes ! It is a really good question ! It would be nice to know if the portabality is really efficient between platforms with the same code ! Thanks – Romain Mar 28 '12 at 15:14
  • It's at least running like a charm on iOS. I didn't try it on Android as I am not having an license for MonoDroid. As long as you strictly follow MVC there should be only a small amount of code you have to rewrite... – basti Mar 28 '12 at 16:33
  • Then unfortunately I cant trust the revommendation. Android native is enough of a headache without adding another layer in between. For example, iOS scroll views can scroll in two directions but android only in one. How does it handle this difference? These kinds of questions bother me a lot...and they end up being a fundamental difference instead of a small change. – borrrden Mar 29 '12 at 00:46
  • You are developing with the MVC-pattern. You have to replace Views to device-/platform-specific Views. That's how its handled - at least that's I know about it... – basti Mar 29 '12 at 07:09
3

I would recommend learning both... here is why:

  • To use MonoTouch, you'll need to know C# and the some of the base class libraries. This is obvious.
  • To develop for iOS, you need to know the Apple way of thinking UI. This is quite different from the Windows way. You do not need to know much of the ObjectiveC language itself to use MonoTouch (but being able to read it is a definite plus, since you can obviously find many more samples in ObjectiveC than in C#).

So if you have to choose, it really depends on what you already know. If you know some C#, I'd go for the CocoaTouch course. If you know a bit of iOS/CocoaTouch UI programming, then I'd go for the C# course. If you know neither and have to pick one... I'd go for the C# course, since you'll also need it for the Android version of your app.

Rolf Bjarne Kvinge
  • 19,253
  • 2
  • 42
  • 86
  • OK ... but finally, if you would like to make the better choice ... Would you developp iOS & Androids apps with MONO (developpment made by Two developpers which are respectively a few skills one in iOS and the other one in Java), or you would choose to use XCode/Obj-C for iOS and Eclipse/Java for Android ? You would prefer a multi plateform system to developp sames apps on the 2 devices or you would prefer to develop this same apps in thier "native" way ? – Romain Mar 28 '12 at 17:25
  • @Romain Rolf and I work for Xamarin. That being said have a look at http://blog.xamarin.com/2012/02/24/mwc_2012/ to see how you can maximize code sharing when building native, mobile application (which could easily be extended to desktop application on Windows, OSX and Linux as well). – poupou Mar 28 '12 at 17:46
  • Thanks but it not answer my question but show us another multiplatform system ... – Romain Mar 28 '12 at 17:53
  • @Romain: Personally I would use MonoTouch/Mono for Android, but I'm probably a bit biased since I work for Xamarin. In any case I would definitively pursue a multi-platform solution to lower development time (and cost). – Rolf Bjarne Kvinge Mar 28 '12 at 21:08
2

MonoTouch is a C# (cross-)compiler.

So you need to learn C# but not (all of) .NET

H H
  • 263,252
  • 30
  • 330
  • 514
  • Is it not easier to learn how to code and use the cocoa touch framework and learn after that C# ? – Romain Mar 28 '12 at 14:45
  • 2
    It depends. MonoTouch is intended for C# use. But what is fixed / most important: iOS or MonoTouch? – H H Mar 28 '12 at 14:47
  • The finality is to developp iOS apps and Android Apps with the same code ! But for my part, I already know a little bit of Objective C. And i am pretty sure it would a better way to follow a "complete" formation to know how to correctly use the Cocoa Touch FrameWork and then juste learn how to code in C#. What do you think about that ? – Romain Mar 28 '12 at 14:55
1

MonoTouch is in C# and has the added benefit of also having an android version, so porting your app to android should be fairly simple.

Kevin
  • 532
  • 2
  • 7
  • the fact to allow the "porting" on iOS and Android of the same app sems to be not so easy ... It is pretty clear for me (even though i don't really know all about MONO TOUCH) that you do not use the same code to compil on iOS and on Android ! Could you confirm ? – Romain Mar 28 '12 at 15:10
  • I certainly didn't mean to imply it would be a 1 to 1 port; the code isn't necessarily the same, but you get the benefit of being able to use Visual Studio and develop on windows for both devices. You can use regular .Net DLL's across both. There will be code that is reused across both platforms. – Kevin Mar 28 '12 at 15:16
  • Romain: You will be able to use exactly the same "business logic" code in both MonoTouch and Mono for Android, but you will have to rewrite the UI portions as you need to use the native UI bindings for each platform. – jstedfast Mar 28 '12 at 22:33