May 19, 2020
  • Perspectives
  • Comparison
  • Xamarin

Ionic vs. Xamarin

Matt Netkow

Ionic and Xamarin are two of the most popular options for mobile app development. Both endeavor to make app development faster, easier, and more accessible to a wider audience of developers. The key contrast between them lies in the ecosystems that they embrace.

Ionic is a platform that uses widely-known, standards-based web technologies and languages to create award-winning mobile experiences, and is built on the broader web and JavaScript ecosystem. Xamarin is a Microsoft product and embraces the Microsoft ecosystem.

The choice between Ionic and Xamarin depends a lot on which approach and community you are willing to bet on. Even if you’re an existing C# or .NET developer, your options are vast. In fact, there’s never been a better time to switch to the web.

Note: Check out our just-published Ionic vs. Xamarin comparison guide for a more comprehensive analysis.

Why I switched from Microsoft to the web ecosystem (and never looked back)

Before joining Ionic, I was a .NET developer and consultant for 10 years, working with enterprise clients like Starbucks to help them build Microsoft-centric applications, from basic web and console apps to complex enterprise integrations.

I became serious about learning JavaScript after recognizing the growing disparity between the relatively closed Microsoft ecosystem, and the much broader web ecosystem. At that time, the JavaScript community was really starting to take off. Web developers were using it to build not only websites, but desktop, mobile, command line, and back-end apps as well. It’s now the foremost programming language in the world, with a rich ecosystem of powerful tools, libraries, and frameworks. Indeed, our recent developer survey confirmed that web developers are now squarely in the driver’s seat when it comes to enterprise app development.

Flash forward to today. Microsoft has rebuilt .NET from the ground up, open sourced it, and made a variety of tools freely available to developers, including Xamarin. Overall, they’ve done a nice job of reviving that community.

So, considering these advancements, why have I stuck with Ionic and the broader web ecosystem over Microsoft and Xamarin? It comes down to a few things:

Ionic and the web offer a more versatile skillset

For me personally, the open web ecosystem offers a more versatile, and therefore more valuable, skillset to advance my career, at least compared to what I was likely to find if I limited myself to the .NET ecosystem.

Learning the basics (HTML, CSS, and JavaScript) prepared me to move on to more advanced applications across nearly every platform. My work evolved from basic web apps to complex, frontend heavy applications built with Angular (frontend) and .NET Core (backend). I soon moved into mobile using Ionic and Cordova — all with the same basic skillset.

Ionic projects are easier to staff

When it comes to staffing your next mobile project, it will simply be more challenging to find quality C# and .NET developers. According to Stack Overflow’s recent Developer Survey, there are more than double the amount of JavaScript developers available (69.7% compared to 31.9% for C#). The same goes for backend technologies – compare Node.js (49.9%) to .NET (37.4%). A larger candidate pool means you’re more likely to find the right developers to bring your projects to life successfully.

The web offers a broader, more diverse collection of tools, libraries, and frameworks

Simply put, there’s a solution for just about everything, I don’t have to go far to find the right tool for the job, and there are new JS libraries coming out all the time. The massive size of the web community brings a creative force unmatched in other developer communities.

Ionic can address mobile, desktop, and web from a single codebase

While Xamarin is great for mobile, and .NET is great for web, you still have to build and manage separate codebases if you want to target mobile and web with the same app. Especially if you want to build a traditional native mobile app that also will exist as a PWA, or Progressive Web App.

Ionic apps, based on web technologies, run directly on any desktop or mobile browser—all from the same codebase across mobile, desktop and web.

Ionic allows you to port your web component styles to your mobile UI (and customize everything)

In the ordinary world of web development, applying custom styling is relatively easy. Just port your existing components over to your new project, or apply the specific CSS edits that you need to make your app look and feel the way you want it to.

But in the mobile world, this becomes a lot harder. For example, Xamarin Native uses only the native components available on iOS and Android. You won’t be able to just copy over your existing component library, and the styling and theming options are extremely limited.

This is where Ionic’s approach is most valuable. Ionic UI components are just Web Components. By default, they are designed to look and feel native to iOS and Android; but under the hood, they’re just Web Components. If you already have a React or Web Component library, you can easily port those over to your mobile project. Or, you can edit any aspects of the UI using CSS, just as you would for any web project. This level of design customizability is unparalleled in the world of mobile app development.

You don’t have to give up .NET!

One of the best things about moving from Microsoft to the web ecosystem is that you don’t have to throw out your existing .NET skillset. In fact, we highly recommend pairing Ionic and .NET together.

How does it work? Just use Ionic for the front-end portion of your applications: build a progressive web app first, and add mobile apps as needed. Then, leverage your existing backend infrastructure built on .NET (C# APIs, Microsoft SQL databases, etc.) along with Azure for all of your cloud computing needs.

Tips for .NET devs who want to move to web

If you’re a .NET developer (and especially if you’ve worked with ASP.NET), chances are you’ve been exposed to web development before. But when was the last time you tried it? If your first experience was with an older framework like jQuery or simply plain JavaScript, you’ll be surprised at how much easier it’s become. Older JS frameworks lacked type safety, generated brittle code, and offered a poor developer experience. Fortunately, modern web development is a breath of fresh air.

The good news is that you’ll find plenty of resources to help you make the switch. And you’ll soon find that your existing .NET skills will translate easily into JavaScript (the logic portion, aka most akin to .NET development). In fact, if you’re new, consider jumping right into Angular, a “batteries-included” framework from Google. While Ionic can work without a JavaScript framework, we recommend Angular if you’re new to the space.

Conclusion

If you’re already vested in the Microsoft ecosystem and you’re looking for alternatives to Xamarin for mobile development, Ionic is a great choice. And given the vast resources and supportive community surrounding Ionic and web development in general, there’s never been a better time to make the switch.

If you want to learn more, check out the full Ionic vs. Xamarin comparison post:

Read Ionic vs. Xamarin →


Matt Netkow