Forum General


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Is this informatoin true about Xamarin?

YonatanNYonatanN ILMember

I am looking for a cross platform framework for a mobile app development. Since I love developing using .NET, it was natural for me checking out Xamarin, as I love static languages (and C# specifically) and don't like the dynamic ones that are common for other cross platform frameworks (HTML, CSS, JavaScript).
As I was searching for other frameworks just to see what's out there and if there's something for free (I am a private developer, so money is more of an issue to me) I came across another framework. They made a comparison of their framework to Xamarin and listed some items that a bit concern me about Xamarin and I'll be glad if you could elaborate on them.
Here are the few points they listed:

1) Xamarin UI code is not cross-platform: instead, the user needs to write specific code for each platform.
2) Xamarin often requires platform-specific coding.
3) Xamarin doesn’t support Linux.
4) With Xamarin, you still need to know ObjectiveC and Java.

Is there any truth to these points?


  • JamesAltJamesAlt USUniversity ✭✭

    Hello @YonatanN,

    1) In general the answer to this one is no, the UI code is not cross-platform. If you are writing a Xamarin.iOS or Xamarin.Android app you generally have a shared code project (PCL) and then specific projects for the UI. This is so that you truly get a native application. That said, depending on your app, you can look into Xamarin.Forms which for the most part does cover everything with the need to sometimes write platform specific renderers.

    2) I feel like this question is really just an extension of question 1, that's where you write platform-specific code.

    3) As far as I know, it doesn't. You also need to have a mac available to do iOS development as your build server.

    4) I don't know if I can fairly answer this one as I already knew both before using Xamarin. However, both are c-based languages so it's really not that hard to understand them in a pinch if you're trying to find a solution to something and it isn't readily available for Xamarin. Also, the other two members of my team had never used Objective-C or Java and did pretty well on their own without it so I would say no, not necessary but it definitely doesn't hurt.

    My personal opinion; I think this is a great platform for building mobile applications so grab the trial and give it a whirl.

  • YonatanNYonatanN ILMember

    @JamesAlt Thank you for your answer.
    Just regarding what you said about the Xamarin.Forms, is it something that can be used to write a truly cross platform UI without the need for specific native language knowledge? If I want to make an application with a single look for all platform, then why would I change these Xamarin.iOS or Xamarin.Android separately?

  • JamesAltJamesAlt USUniversity ✭✭
    edited September 2015

    Most of my apps will look "similar" between iOS and Android but I do try to make sure they feel like a native app on their platforms. That said yes, with Xamarin.Forms you generally write once run anywhere and you have a UI that looks mostly identical. Xamarin does a good job in forms of making apps written in Forms still feel like it was an app written for that particular OS, i.e. tab placement at the bottom on iOS and at the top on Android.

    Go check out @adamwolf and his blog Syntax is My UI which has a lot of good examples of Xamarin.Forms apps.

  • YonatanNYonatanN ILMember

    @JamesAlt Just another question... Do you use C# only if you're using Xamarin.Forms? And what limitations does it have compared to a native UI? Where is that point that you will say something like "oh if I need that feature, then I can't do it with Xamarin.Forms" ?

  • JamesAltJamesAlt USUniversity ✭✭

    You can use XAML to build your pages if you so desire but I generally just stick to C# only. I can't speak to any specific limits as I generally don't do a lot of Xamarin Forms. I've written a conference app and a few other simple apps and it worked perfectly well for it. Maybe someone can better articulate that or some Google Searching could help in that regard. It all just depends on the type of app you're building as far as what is the best solution. Like I said, try both and go from there. The real upside to Xamarin.Forms is that if you find yourself stuck on something you can always just build a custom view for the particular platform instead of using the Forms one and then go right back into forms on the next view should you so need. It is all very flexible.

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    By the way, one topic is enough. Posting in multiple forums just ends up splitting responses across the forums rather than having it all in one place for people coming after you that might have the same question.

  • JasonAwbreyJasonAwbrey USInsider, University, Developer Group Leader mod

    2) Xamarin often requires platform-specific coding.

    This depends on your app's requirements. Xamarin provides platform-independent abstractions for many things, but not everything. If your app needs to make use of a platform feature that doesn't have a abstraction, then you might need to write platform specific code.

    4) With Xamarin, you still need to know ObjectiveC and Java.

    It helps a lot if you can read them, because them you can read the original platform docs, refer to the samples, etc. But it's not an absolute requirement.

    What you didn't ask, but is related, is how much you need to know about the platform (for example, the app lifecycle in Android vs iOS). And the answer again depends on the requirements of your app. But it generally will only help you to understand the underlying characteristics of each platform and how they behave.

  • JeremyHerbisonJeremyHerbison CAMember ✭✭

    Just to be clear, the platform-specific coding is still done in C#. Everything is C#. Xamarin.Forms also allows for XAML though, which is cool.

  • nexlesoftnexlesoft VNMember

    Thanks JamesAlt, I'm looking for information on programming Xamarin and your answers contain useful information.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    You should "Like" what you like (if a message has helped you) -> just click on the greyed "Like" to the message.

  • RyanDixonRyanDixon USMember ✭✭✭

    1) Xamarin UI code is not cross-platform: instead, the user needs to write specific code for each platform.
    Native Xamarin, yes. Xamarin Forms, no.

    2) Xamarin often requires platform-specific coding.
    Native: Yes, thats the point of it.
    Fomrs: Generally not until you're at the point of polishing your code. Most of the time the community will have plugins for most things you need, and only edge cases may require considerable amounts of platform code.

    3) Xamarin doesn’t support Linux.
    Yes it does via GTK (Still early Alpha though)

    4) With Xamarin, you still need to know ObjectiveC and Java.
    No, but it helps. A lot of the patterns you see in these platforms will be used in some manner in C#. You can avoid this 99% of the time though with Forms.

    In my honest opinion, give it a go. Its hard to make an informed decision as to what you should approach unless you give more of an idea as to the nature of your application :smile:

Sign In or Register to comment.