Comparing Xamarin to other cross platfrom frameworks (Codename One)

YonatanNYonatanN Yonatan PrivateIL
edited November 2015 in General

Hi,
I wanted to ask for your opinion regarding the difference between Xamarin and Codename One.
I read a comparison they done in the Codename One's web site, but it's obviously a biased comparison. What do you think is the benefits of both frameworks? Specifically regarding IOS development, Codename one claims you can develope using their fw for IOS, without using a MAC. Also, they claim you don't really need to know native GUI (I know about the difference between Xamarin.Forms and native Xamarin but still.. if they claim you don't even need that for their development..)

Posts

  • SebastianSeidel.9226SebastianSeidel.9226 Sebastian Seidel DE ✭✭✭✭

    According to the this Stackoverflow post the main difference beside the programming language is that Codename One operates as Software as Service company.

    So this means to me that every time you hit the build button the code will be compiled on their servers. Thus there is no need for you to have a Mac to build your iOS application on. In my opinion this is a major drawback because not all clients would like to see there code spread to servers they can not control.

    Even the comparison between Codename One and Xamarin on their page is misleading and full of unqualified arguments. All in all not a real competitor if you ask me.

  • YonatanNYonatanN Yonatan Private IL

    Regarding what they say about the need to develope a native GUI when using Xamarin, I still havn't began using Xamarin but I know it's not generally true (except for some specific cases).
    What do you think are the benefits of Xamarin compared to Codename One? And what are their misleading points in their comparison?

  • SebastianSeidel.9226SebastianSeidel.9226 Sebastian Seidel DE ✭✭✭✭

    Here is what they wrote on their website to compare Xamarin:

    Xamarin is an ambitious tool allowing C# developers to write mobile phone applications, its a very impressive tool but it is not a WORA (Write Once Run Anywhere) tool. Xamarin requires that developers write platform specific code and as a result maintain platform specific code and platform specific skills, its proponents see that as an advantage (it is more native) but it has quite a few faults as a result.
    Xamarin uses C# as its base programming language, this is a matter of developer taste. However, it has one major drawback to Java: it is only "native" to Windows Phone where is Java is the native language of Android. So on most of the devices in the field it would require a 3rd party VM to be installed. Xamarin proponents try to spin this as an advantage claiming that their VM is faster than the native Dalvik VM on Android. However Dalvik is optimized for size/security & multi-tasking so its unclear how accurate these claims are in reality.
    Codename One differs from Xamarin in the following ways:

    • Doesn't need a Mac for iOS development - recent versions of Xamarin allow you to use a Mac hosted on the network but this doesn't solve the issue for a mobile worker.
    • WORA (Write Once Run Anywhere) - Xamarin has some portability libraries mostly for IO etc. but it isn't designed to be a WORA solution. Developers need to learn platform native API's and behaviors for every platform.
    • Java - Xamarin is a C# solution. This is a matter of developer preferences although Java has the advantage of being the language of Android.
    • GUI Builder - Since Xamarin isn't a WORA solution the GUI isn't portable, thus localization, branding and all resources need to be adapted to every platform.
    • IDE - Xamarin has its own IDE or Visual Studio from Microsoft. Codename One works with all major Java IDE's NetBeans, Eclipse & IDEA.
    • Free Version - Xamarin has a free version with very limiting stipulations which aren't present in the Codename One free version

    I pick some statements and write my opinions.

    Xamarin requires that developers write platform specific code and as a result maintain platform specific code and platform specific skills, its proponents see that as an advantage (it is more native) but it has quite a few faults as a result.

    What are these faults? I for myself see this as a postive thing to know the platform I am on.

    Xamarin uses C# as its base programming language, this is a matter of developer taste. However, it has one major drawback to Java: it is only "native" to Windows Phone where is Java is the native language of Android.

    Thats true. As well as Swift is native to iOS. And now? What are they trying to say?

    Doesn't need a Mac for iOS development - recent versions of Xamarin allow you to use a Mac hosted on the network but tis doesn't solve the issue for a mobile worker.

    As I said before. Most of my clients want to have control over there code and build-process. The way Codename One works it not the solution.

    WORA (Write Once Run Anywhere) - Xamarin has some portability libraries mostly for IO etc. but it isn't designed to be a WORA solution. Developers need to learn platform native API's and behaviors for every platform.

    We've seen this with web-apps. So I don't think I have to explain further.

    GUI Builder - Since Xamarin isn't a WORA solution the GUI isn't portable, thus localization, branding and all resources need to be adapted to every platform.

    What is so bad about this? I can use all the little things the platform offers.

    IDE - Xamarin has its own IDE or Visual Studio from Microsoft. Codename One works with all major Java IDE's NetBeans, Eclipse & IDEA.

    Microsoft Visual Studio IS the major IDE for .NET developer. So what's the point here?

    Do I need to say more?

  • codenameonecodenameone Shai Almog IL

    Some of the things listed in the comparison aren't meant to be advantages/disadvantages as much as differences. I think Xamarin is doing a good job in what its trying to achieve which isn't what we are trying to achieve!

    E.g. the IDE's supported comment, I personally really hate visual studio (trauma from the 90's) but it sure has a lot of fans who love it (to be fair I don't like Eclipse either).

    To me the whole comparison can be summed in:
    Codename One == WORA
    Xamarin == Porting Framework

    Yes code is sent to build servers when you build to device, that's Write Once Run Anywhere. Xamarin is a porting framework, whereas we provide WORA. Notice that Codename One does allow you to purchase your own "cloud" and install it on-site so you would have that control. This is used in cases where regulatory restrictions prevent you from using the cloud.

    With Xamarin you work with native widgets, that means your product UI is literally separate and duplicate. If you try to generify it behind a common masquerade you end up with something horribly broken e.g. AWT or broken on some platforms e.g. SWT on Mac. This begins with little things such as platform X delivers this event first and that event last or platform Y is more sensitive than platform X in regard to access outside of its event dispatch thread.

    The comment about Java being native to Android simply states that on Android we are "more" native. C code is in-fact non-native on Android oddly enough since the UI code needs to call back into Java and incur the Java to native bridge cost. So Codename One uses the language that is most popular on Android and works really well on Android (e.g. taking advantage of ART features). Xamarin is to some degree alien to both iOS and Android whereas Codename One (in the language/compiler level) is only alien to iOS.

    If you can point me at something that you think is unfair or incorrect in the comparison I'll happily fix it.

  • AndyDentAndyDent Andy Dent AU ✭✭

    I've been doing cross-platform development for over twenty years.

    Any time a vendor claims they are free from problems such as little things such as platform X delivers this event first and that event last or platform Y is more sensitive than platform X in regard to access outside of its event dispatch thread I get intensely sceptical.

    Is he claiming that they re-implement the entire event handling stack from the lowest level up? At what point do they hook into OS events and how can their system be more independent?

    The rise of Xamarin Forms has of course demolished their WORA argument.

Sign In or Register to comment.