Based on the domain name of this site, you’ve probably already guessed that I’m a fan of Xamarin.Forms (XF). However, the utility of Xamarin as a mobile development platform is a highly debated topic online. In my opinion, the answer to the question posed in this title is highly dependent on your situation. I know, I know, the answer “it depends” is annoying and probably not what you were looking for. But I really think in this case a one size fits all answer is a very poor idea. I’m not going to spend any time on the technical details of benchmarking Xamarin vs. other mobile platforms. In my experience, this isn’t really a huge factor seeing as how Xamarin is at least comparable in performance to native solutions (here’s a post that goes into a lot of detail for those interested). I’m more interested in viewing time invested in Xamarin through the lens of Return On Investment (ROI).
Disclaimer #1: I’m going to be talking specifically about using Xamarin.Forms. I haven’t developed anything specifically targeted to only Xamarin.Android or Xamarin.iOS so I can’t really give a strong recommendation to either.
Disclaimer #2: My background is in .NET so take my perspective on these topics with a grain of salt. While I’m not a .NET zealot, there are certainly downsides to using Xamarin.Forms I might be overlooking due to my familiarity with the tool set.
Let’s Talk About You
The main goal of this post is to attempt to help developers that are stuck in the analysis by paralysis phase of a new side project or side business. You’ve got an idea and you’re itching to get started, but you’ve never tackled a mobile project before. This is the point in which your intent becomes important. Your intent determines your value structure, which in turn helps you to frame what ROI means in your context. Let’s look at some general examples:
- Goal: Learn something new and enjoy yourself while doing it.
- Potential ROI: If you’re a hobbyist, more than likely the “return” you’re looking for is enjoyment per hour invested. If you’re already familiar with .NET, XF could be a great choice for you. However, there are several drawbacks (see below) which could jar you out of your flow state and cause you to spend your time investment on annoyances rather than creation.
- Main Considerations: Ease of use, flow state, time investment required.
- Verdict: If you’re interested in XF and your background is in .NET, definitely give it a try (see the drawbacks section below for some caveats to this). If your background isn’t in .NET I probably wouldn’t recommend it seeing as how the drawbacks below might ruin the enjoyment factor.
You want to start a business.
- Goal: Create a mobile app as a product, or as a means of helping to sell your product.
- Potential ROI: In my opinion, this is where Xamarin.Forms really shines, especially if you have a background in .NET. Even if you don’t have a background in .NET, XF still has some pretty fantastic benefits for budding entrepreneurs. You can build out a clean, testable, architecture with shared business logic AND UI very quickly in XF. The look and feel is not going to be as clean and crisp as native apps, but you can still build a professional, reliable, cross-platform app in a matter of weeks with XF. Considering your main ROI consideration (once you’ve validated your app idea) is time to market, XF is a fantastic tool for entrepreneurs.
- Main Considerations: Time to a finished product, stability, cross platform.
- Verdict: XF should be a leading contender for anyone wanting to make their own app. The amount of time it takes to go from blank slate to stable, polished, and production ready application is astounding.
You want to learn skills that will help build your resume.
- Goal: You want to work on a side project that will build marketable skills for potential employers.
- Potential ROI: The ROI for this intent is a bit of a mixed bag. The reason I say this is that jobs calling for Xamarin experience aren’t overly abundant. The job posts that I have seen usually require experience using Xamarin.iOS or Xamarin.Android. Because of the amount of heavy lifting Xamarin.Forms does for you, you won’t be able to build very much experience in either of those platforms. With that being said, a huge portion of the work you do in a Xamarin.Forms application applies as general .NET and C# experience which is valuable and marketable. I can certainly say that writing an XF app made me a much better .NET and front-end developer.
- Main Considerations: Marketability of technology choices, skill transfer.
- Verdict: If your goal is to gain experience in order to get a job as a mobile developer at a company, XF is probably not your best choice. If you’re looking to pad your .NET/C# experience XF will definitely fit the bill.
I’ll probably make an entirely separate post to talk about the drawbacks of XF in more detail, but I’ll give a brief summary of some of them I encountered below.
- Long build times- The Xamarin team is working hard to address this (check out the new Hot Reload feature), but this can definitely be a frustrating issue especially for tweaking small UI changes.
- Cryptic error messages- You will sometimes run into some pretty difficult to parse error messages that get generated by the core layers of Xamarin. Typically, not too painful to work through but can be annoying.
- Lack of documentation- There is a fair amount of documentation between Microsoft’s official docs, forums, and Github issues. However, there can be a frustrating lack of guidance when implementing non-Microsoft supported packages. It’s difficult to make informed decisions up front about how to implement features like push notifications, OAuth, app badges, etc. due to the lack of documentation.
Hopefully, assessing the value of a technology like Xamarin.Forms through this lens helps you to make an informed decision about what makes sense for your situation. Good luck!