Monkey vs Xamarin

Monkey Forums/Monkey Programming/Monkey vs Xamarin

blabz(Posted 2013) [#1]
I know this is a very subjective question and I anticipate a bias as I'm asking this on the monkey forums but I could use some serious input.

I'm looking to build a mobile Application for iOS, Android, and Windows Phone. This is NOT a game, but a utility that must use the devices native ui.

Which is preferred for this situation and why?

Any input is really appreciated.

Thank you!


AdamRedwoods(Posted 2013) [#2]
depending on your needs, Apache Cordova is another good option.
http://cordova.apache.org/


Gerry Quinn(Posted 2013) [#3]
I don't know anything about Xamarin, but Monkey [more precisely, mojo] abstracts the devices to support a single set of features on all devices. It can interface easily with native code, but cleaving to the native UI is not what Monkey/mojo is fundamentally about.

What's the difference between a utility and a game, exactly? Perhaps, in a game, the user accepts the interface that's given as part of the game.

Monkey does not, for example, have any direct support for native menus on the various targets. You can easily *make* menus with Monkey, but they will either target every native target separately, or they will be sui generis menus that will look the same on every Monkey target, but not necessarily the same as any other menu in the world.

Looking at the site for Xamarin briefly, I suspect there is no simple answer. I suspect it accesses native-looking GUIs more easily, but you will have to rewrite your utility's interface for every target. With Monkey you could easily get your utility operating quickly and looking the same on every target, but at the cost of your GUI not looking so native.


rIKmAN(Posted 2013) [#4]
Native iOS UI support in Monkey is pretty non-existant really, although you can use native code and wrap it in Monkey.

There is a native iOS module by sk3n although I think it is just basic functionality.

If you have the option of using either, then for a native UI app I would go with Xamarin, though I have never used it so I'm not sure how it compared to Monkey in terms of ease of use.


therevills(Posted 2013) [#5]
depending on your needs, Apache Cordova is another good option.

I would never recommend Phonegap (Cordova) for Android... so slow and it has been known that Apple has rejected apps made by it.


Nobuyuki(Posted 2013) [#6]
If Xamarin lets you use the VS formbuilder to make your apps, I'd say go for it. I'm writing an app in Monkey right now, and over half the time spent on it is spent making UI elements. One thing that should be noted though is that if you don't get the kinds of ui elements that are good for touch-based platforms, those potential gains in productivity might not even matter.

Also, Monkey apps on mobile need to be updated constantly on a loop, so if you want to make an app that isn't a battery hog, tough luck.


AdamRedwoods(Posted 2013) [#7]
I would never recommend Phonegap (Cordova) for Android... so slow and it has been known that Apple has rejected apps made by it.

The newer builds claim to have those issues fixed? I don't use it myself, so I cannot confirm.
http://phonegap.com/blog/2013/07/19/adobe-phonegap-3.0-released/

if you want to make an app that isn't a battery hog, tough luck.

yes, this is a bit of an issue for all targets as monkey does not have an update-by-event system.


computercoder(Posted 2013) [#8]
Based off (replaced?) Mono, Xamarin allows you to code using the VS.NET Frameworks. You CAN use the same GUI for ALL platforms using GNOME's GTK, but under the Windows platform, you may also choose to use Winforms instead.

Having coded on both sides with GTK and Winforms, I must say that Winforms are FAR easier to implement and wrap your head around, but once you get the hang of GTK, its about the same between the two; just the learning curve is there for GTK.

Code-wise, having the power of the .NET frameworks is pretty nice. Xamarin has implemented most of the latest .NET Framework into it and is constantly enhancing its capabilities.

Monkey is designed to work natively on all targets, and really, Xamarin does this relatively the same - both use GCC. It really depends on your capabilities with each language and what you are trying to do in your app for which toolset you decide to go with. You may find that Monkey fits your needs if you need a lot of graphic capabilities. The .NET Framework offers GDI+ (under Windows) which is VERY slow compared to Monkey's OpenGL implementation. Right out of the box, Xamarin doesn't offer anything for graphics other than the basics for drawing forms and controls. You can find .NET libraries that offer OpenGL or the like to in

Honestly, I'd use Monkey for game development and higher end graphical tools, and leave Xamarin for the rest.

Also, Xamarin has a pretty hefty price for iOS and Android development per year. If you can overcome that, Xamarin really has a nice IDE you can develop with.


therevills(Posted 2013) [#9]
The newer builds claim to have those issues fixed? I don't use it myself, so I cannot confirm.

I'll have a look at PhoneGap 3 later on, I was using 2.9. But I dont hold out much hope as the webview on older Android devices are really really slow.

You CAN use the same GUI for ALL platforms using GNOME's GTK

Sorry are you talking about Xamarin here? When I looked into Xamarin it seemed that you coded all your model/business logic using the same code and have separate GUI code per platform.


ziggy(Posted 2013) [#10]
Sorry are you talking about Xamarin here? When I looked into Xamarin it seemed that you coded all your model/business logic using the same code and have separate GUI code per platform.
Yes. That's how it works, but implementation is very very similar in iOs and Android and it is a very straight-forward process once you get used to it.


Beaker(Posted 2013) [#11]
For completion sake:
http://www.monkeycoder.co.nz/Community/posts.php?topic=4824


frank(Posted 2013) [#12]
Cordova works well and Apple rejects your app if you just wrapped a HTML site (no added value). It's also not slow per-se; Cordova doesn't know anything about controls ; you normally use HTML and when you use HTML you need to optimize for that. Meaning it won't look/act/feel native because it's HTML , not native controls and some libraries (notably the horrible crap Jquery-mobile is) use way too much DOM magic to be fast. If you have a state of the art phone then it's ok. But this has nothing at all to do with Cordova. We made many solid working apps with Cordova writing and optimizing html/css/js by hand for webview.

Xamarin is nice and you write , like others said, the frontend in the frontend model belonging to the specific platform. You can also use Corona (WP-8 version is on its way) to write once, use everywhere and Corona does use native components. Monkey will probably have a library like Corona in the end; GUI libs which are not native and a native libraries which abstracts the same API over all platforms. The former is something I currently use in my Monkey projects, the latter is something i'm migrating to.

There is no reason why you can't use Monkey for that (like Corona); the only thing which is hard for new users to get their brains around is the problem that you cannot really mix the game and non game aspects when using native controls. You can z-index your native controls and, in game, you can z-index your game 'layers', however you cannot mix them; your game objects are on top or under all the native controls and vice versa. That's why Xamarin's option is easier; you just hack all your stuff in the interface via the platform API and not an abstraction.

After having written apps with Monkey, Corona, Cordova, Native, Codename One and Appcelerator, I must now say that if I have have to write cross platform, I would take an abstraction. The time spent hacking in those native API's is way too much work unless you have a ton of money and time to burn on something. And it's not that much better. My next app will actually be written in Monkey with native components; I'll open source the lib of course.