Xamarin.Forms vs Xamarin Mvvmcross
Asked Answered
G

2

5

We are planning to go with Xamarin for our next big project. Seems like Xamarin.Forms is mature enough to use with production projects. But I still want to take input from you experts - should we go with Xamarin.Forms or Xamarin with MvvmCross architecture?

The project is big and critical for our customer.

Gauche answered 19/7, 2016 at 5:35 Comment(3)
I'm sorry to say but if this is a big and critical project I would recommend to learn some more about the subject. Xamarin.Forms and Xamarin with MvvmCross are things that can be combined. It's not like if you use the one you cannot use the other. So it seems you need to gain a bit more knowledge on the matter before you can make the right decisions.Krever
@Gerald I know we can do Xamarin.Forms with Mvvm but..I will ask in other way, Xamarin.Android with Mvvmcross vs Xamarin.Forms with Mvvmcross? I want to check in terms of performance?Gauche
Depends on what you anticipate from the UI perspective. Will the application have lots of custom UI? Will things need to by styled differently from the native controls? If you anticipate these types of requirements, Xamarin.Android and Xamarin.iOS w/ MvvmCross is a fine solution since it gives you the increased code-sharing through Mvvm but also complete flexibility when it comes to UI. From my experience in X.Forms, the time spent writing custom renderers typically offsets the time saved.Gall
A
23

We experimented with Xamarin.Forms about 18 months ago, so this experience may be dated, but we found Xamarin.Forms to be unsuitable for production projects. Granted, it is very quick to get basic data capture apps running on multiple platforms, but we found that inevitably the UI capabilities were so limited that we ended up having to write custom renderers all over the place, which complicated the code no end.

In my opinion, Xamarin.Forms tries to solve the multiple platforms problem in the wrong way - by trying to provide common wrappers around the UI elements in each platform. This means you'll always be able to do less with Xamarin.Forms than you would be able to do with Xamarin out of the box, and you will always be fighting with lowest-common-denominator implementations of the most common elements, while having to write your own code for more advanced UI.

By contrast, the MvvmCross approach aims to consolidate as much as possible of your business logic into a single library while leaving you free to do whatever you want in the UI of each platform. You can get as much as 80-90% of your code into a shared library while having complete freedom to implement the UI you want for each platform. It's a cleaner way to solve the multi-platform problem, IMO.

Antimasque answered 20/7, 2016 at 6:43 Comment(3)
I want to use Xamarin.android instead of Xamarin.forms but good night, literally all the examples all over the web including Pluralsight courses and Youtube videos, all reference Xamarin.forms. It leads one to believe it's the only thing people are using!Rime
Yeah, Microsoft is pushing the .Forms approach hard. They still think in the desktop era where you can slap together a WinForms app and it's ok for users because they get told what to use. In mobile you need a lot more emphasis on UX and .Forms is the wrong approach if that's your goal. There is a relatively new and very good Pluralsight course on MvvmCross: pluralsight.com/courses/…Antimasque
@Helzgate Just look at native android examples for xamarin.android. I use to write true native before writing xamarin.android and the conversions to the .net / c# equivalent of the java are very minor.Chair
I
1

Xamarin.Forms is a bit of a different technology than MvvmCross. Everything depends on the size of project, how complicated the UI is. I recommend reading this article - it should give you some ideas.

Irresistible answered 19/2, 2020 at 7:35 Comment(1)
Although your answer could be 100% correct, it might also become 100% useless if that link is moved, changed, merged into another one or the main site just disappears... :-( Therefore, please edit your answer, and copy the relevant parts from the link into your answer, thereby guaranteeing your answer for 100% of the lifetime of this site! ;-) You can always leave the link in at the bottom of your answer as a source for your material...Chokedamp

© 2022 - 2024 — McMap. All rights reserved.