Need advice about which tool to choose?Ask the StackShare community!

Expo

668
662
+ 1
66
Xamarin

1.3K
1.5K
+ 1
785
Add tool

Expo vs Xamarin: What are the differences?

Introduction:

In the world of mobile app development, both Expo and Xamarin are popular frameworks used to build cross-platform applications. While they share similarities in their goal to enable developers to write code once and have it run on multiple platforms, there are key differences between the two that make them distinct choices depending on the specific needs of a project.

  1. Development Environment: Expo is a platform built on top of React Native that aims to simplify the development process by providing a minimalistic and opinionated workflow. It offers a simplified toolchain, allowing developers to quickly set up and start building their apps. On the other hand, Xamarin is a robust framework that uses C# and .NET to build cross-platform apps. It offers a full-fledged development environment with advanced features like a powerful IDE and access to a wide range of native APIs.

  2. Code Sharing: Expo primarily focuses on maximizing code sharing across platforms. With Expo, developers can write most of the app's logic in JavaScript, enabling seamless sharing between iOS and Android. Xamarin, on the other hand, allows code sharing by utilizing the .NET framework. Developers can share code written in C# across platforms, but platform-specific code may still be required for certain functionalities.

  3. Access to Native APIs: Xamarin provides direct access to native APIs, allowing developers to leverage the full capabilities of each platform. This enables high-performance and feature-rich applications. Expo, however, abstracts away the native APIs and provides a unified JavaScript interface. While this simplifies development, it may limit access to certain advanced native features that require direct interaction with the native platform.

  4. Deployment and Distribution: Expo simplifies the deployment and distribution process of apps. With Expo, developers can publish their apps to the Expo Client app, where users can easily access and test them. Xamarin, on the other hand, uses traditional app store deployment methods, requiring the creation of app packages specific to each platform. This may involve additional steps and requirements to deploy the app to respective app stores.

  5. Community and Ecosystem: Expo benefits from a large and active community, with numerous community-contributed packages and resources available. It has a well-established ecosystem that provides support and guidance for developers. Xamarin also has a strong community, backed by Microsoft, and offers extensive documentation and resources. Additionally, Xamarin benefits from the vast .NET ecosystem and developer tools provided by Microsoft.

  6. Learning Curve: Expo follows a more straightforward and simplified approach, making it relatively easier to learn for developers familiar with JavaScript and React. It requires a minimal setup and provides clear guidelines. On the other hand, Xamarin has a steeper learning curve, especially for developers who are new to C# and .NET. It involves understanding the Xamarin architecture and IDE setup, which may require additional time and effort.

In summary, Expo and Xamarin differ in their development environments, code sharing approaches, access to native APIs, deployment processes, community ecosystems, and learning curve. Choosing between them depends on the specific project requirements, developer familiarity, and preference for either simplicity or advanced capabilities.

Advice on Expo and Xamarin
William Miller
Needs advice
on
PyQtPyQtReact NativeReact Native
and
XamarinXamarin

We are developing an AWS IoT app for large boats. The IoT devices have sensors all over the boat for engine oil pressure, position, water depth, fuel level, crew location, etc. When the boat has internet, we interact with AWS cloud using lambda and Amazon DynamoDB. When the boat is offshore, the captain and crew still need normal and emergency alerts and real-time sensor information. The crew might have an Android or IoS phone or a Windows or macOS PC to receive alerts and interact with sensors. We may use the AWS GreenGrasss edge computing solution and either MQTT or HTML for that function.

Question: We want to develop a cross-platform client to run on Windows, Mac, Android, IOS, and possibly Linux. We are primarily Python programmers, so PyQt or Kivy are options for us, but we have heard good things about React Native, Flutter, Xamarin, and others. We think an AWS Greengrass core on an RPI4 could communicate to the client with MQTT or a local webserver with a client web interface.

Any thoughts would be much appreciated.

See more
Replies (2)
Recommends
on
React NativeReact Native

I don't know much about Xamarin but I know about PyQt and React Native.

However, I don't recommend PyQt because the apps made using PyQt are not that suitable for mobile apps. If you take a look at the PyQt interface, you will be able to see that the features are more of a desktop apps kind.

React Native uses JavaScript. React Native is immensely flexible in upgrading your apps because it allows you to formulate your app code into independent blocks.

In Xamarin, you have to write the code in .NET . The best thing about Xamarin is, that it extends the.NET developer platform with tools and libraries specifically for building apps for Android, iOS, tvOS, watchOS, macOS, and Windows

While the best choice for you depends on various factors but React Native app development is a promising overall choice. In today’s scenario, React Native has steady growth, flawless code structure, and brilliant and large community support. We suggest you go for React Native for your next project owing to its outstanding support from developers, easy availability, and cost-effectiveness.

See more
Saamer Mansoor
Founder at The First Prototype · | 4 upvotes · 46.4K views

It seems like your app is not really using any native functionality on the phone. I have experience with cross platform iOS & Android development. They are all really good tools! Xamarin (all the project on the website portfolio I attached) is awesome for accessing native functionality (NFC, Sensors, Bluetooth, etc), and I have built apps that have millions of downloads, some that hit Top 5 on Utilities, another that hit Top 50 in Finances. You just have to look at what your application intent is, it seems like it's just to read and post data. For that they are all pretty good, but you should also look into Ionic which may serve the same purpose

See more
Needs advice
on
ExpoExpoReact NativeReact Native
and
ReduxRedux
in

Hello guys, I am new here. So, if I posted without specific guidelines, please ignore.

Basically, I am an iOS developer and developing native apps for the last three years. Recently, I started learning React Native to develop apps for both platforms. If anyone out there knows any useful resources that will become a better react native developer.

#newbie

See more
Replies (1)
Javier Silva Ortíz
Senior Full Stack Developer at Aleph Engineering · | 6 upvotes · 294.2K views
Recommends
on
ReduxRedux

Well, the first resource I would recommend you is my upcoming book by Packt Publishing, "Professional React Native", but it's due late January next year :) . Now jokes aside (the book's real by the way :) ), the easiest way to build a iOS/Android/Web app with React Native is to do: npm install -g expo-cli expo init some-project cd some-project expo eject

You might have heard of Expo, but trust me, stay away from it. Expo highest value is that it's an already pre-configured 3 platforms environment, but if you don't eject then you're vendor-locked to what Expo has to offer in iOS and Android, which is very poor compared to going full React Native on these platforms, they can't even handle Google Sign In properly and by the way, even if your app is 10 lines of code your app size will be over 40 MB if you don't eject, yep it's that bad, plus the performance is regular and the loading times slow, not to mention that you're stuck with their build service which the free tier makes you wait for hours for a free build slot. It's important to note that when ejecting you don't lose the Web, you simply do expo start --web to start your dev environment and expo build:web to build a static website that you can serve with any web server. Regarding state management, don't bother with "lifting state up" philosophies mixed with Context API to manage your state, lifting state is a great pattern and helps your codebase, Context is great to avoid prop-drilling, but NEVER mix them to achieve app-wide state management, for that, simply go for Redux or MobX, the hype is all about Redux, but I consider MobX far better in many aspects. However, as you're getting new into this I would recommend you start with Redux AND PLEASE grab yourself npm install @manaflair/redux-batch so that you can batch updates and don't bring your app to a crawl. Forget that "connect HOC" thing with React-Redux, don't bother for a second with it, go with Hooks and useSelector and useDispatch and the likes, it will make your code SO much cleaner and smaller. Adopt clean and new Hooks philosophy, avoid writing class components as much as possible and write function components augmented with Hooks.

See more
Decisions about Expo and Xamarin

Our stack roughly divides into three major components, the front-end, back-end and the data storage.

For the front-end, we have decided to go with React Native via Expo. This allows us to target both Android and iOS with a single codebase. Expo provides "managed workflows" and an SDK that will simplify development and deployment.

For the back-end, we have decided to use Python. Python is the language of choice for machine learning (ML). It has extensive support for traditional ML algorithms (e.g. random forests) via Scikit-Learn and the SciPy ecosystem. On top of this, our industry partner has provided us their current solution written in Python. We decided to expose the back-end as a REST API using FastAPI. This allows us to nicely separate concerns from the rest of the codebase. FastAPIs use of static type hints, validation with Pydantic, and automated documentation allows us to build better APIs faster.

For data storage we decided to use a MongoDB Atlas, a NoSQL database. We decided to use a NoSQL database because we need to store large amounts of data (e.g data from the wearable IMUs). Moreover, due to the ever changing nature of a startup we require flexibility. NoSQL databases are schema-free which enables us to modify our schema as we see fit.

We plan on using GitHub Actions (GA) to orchestrate our CI/CD. Given GAs broad support of languages and workflows, it's hard to go wrong with this decision. We will also be using GitHub for version control and project management, so having everything in one place is convenient.

The major components of our CI/CD for the backend will consist of black for autoformatting, flake8 for linting, pytest for unit-testing, and mypy for static type checking and codecov for coverage reporting. We plan to use separate Docker containers to package the back-end and front-end components and use Docker Compose to launch the app. This allows us to better separate concerns, manage dependencies, and ensure our app is deployable anywhere.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Expo
Pros of Xamarin
  • 15
    Free
  • 13
    Hot Reload
  • 9
    Easy to learn
  • 9
    Common ios and android app setup
  • 6
    Open Source
  • 6
    Streamlined
  • 5
    Builds into a React Native app
  • 2
    PWA supported
  • 1
    Plugins for web use with Next.js
  • 121
    Power of c# on mobile devices
  • 81
    Native performance
  • 79
    Native apps with native ui controls
  • 73
    No javascript - truely compiled code
  • 67
    Sharing more than 90% of code over all platforms
  • 45
    Ability to leverage visual studio
  • 44
    Mvvm pattern
  • 44
    Many great c# libraries
  • 36
    Amazing support
  • 34
    Powerful platform for .net developers
  • 19
    GUI Native look and Feel
  • 16
    Nuget package manager
  • 12
    Free
  • 9
    Backed by Microsoft
  • 9
    Enables code reuse on server
  • 8
    Faster Development
  • 7
    Use of third-party .NET libraries
  • 7
    It's free since Apr 2016
  • 7
    Best performance than other cross-platform
  • 7
    Easy Debug and Trace
  • 7
    Open Source
  • 6
    Mac IDE (Xamarin Studio)
  • 6
    Xamarin.forms is the best, it's amazing
  • 5
    That just work for every scenario
  • 5
    C# mult paradigm language
  • 5
    Power of C#, no javascript, visual studio
  • 4
    Great docs
  • 4
    Compatible to develop Hybrid apps
  • 4
    Microsoft stack
  • 4
    Microsoft backed
  • 3
    Well Designed
  • 3
    Small learning curve for Mobile developers
  • 2
    Ionic
  • 2
    Ability to leverage legacy C and C++

Sign up to add or upvote prosMake informed product decisions

Cons of Expo
Cons of Xamarin
    Be the first to leave a con
    • 9
      Build times
    • 5
      Visual Studio
    • 4
      Price
    • 3
      Complexity
    • 3
      Scalability
    • 2
      Nuget
    • 2
      Maturity
    • 2
      Build Tools
    • 2
      Support
    • 0
      Maturidade
    • 0
      Performance

    Sign up to add or upvote consMake informed product decisions

    What is Expo?

    It is a framework and a platform for universal React applications. It is a set of tools and services built around React Native and native platforms that help you develop, build, deploy, and quickly iterate on iOS, Android, and web apps.

    What is Xamarin?

    Xamarin’s Mono-based products enable .NET developers to use their existing code, libraries and tools (including Visual Studio*), as well as skills in .NET and the C# programming language, to create mobile applications for the industry’s most widely-used mobile devices, including Android-based smartphones and tablets, iPhone, iPad and iPod Touch.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Expo?
    What companies use Xamarin?
    See which teams inside your own company are using Expo or Xamarin.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Expo?
    What tools integrate with Xamarin?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Expo and Xamarin?
    React Native
    React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about - learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native.
    Ionic
    Free and open source, Ionic offers a library of mobile and desktop-optimized HTML, CSS and JS components for building highly interactive apps. Use with Angular, React, Vue, or plain JavaScript.
    Create React Native App
    Create React Native App allows you to work with all of the Components and APIs in React Native, as well as most of the JavaScript APIs that the Expo App provides.
    Flutter
    Flutter is a mobile app SDK to help developers and designers build modern mobile apps for iOS and Android.
    Apache Cordova
    Apache Cordova is a set of device APIs that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript. Combined with a UI framework such as jQuery Mobile or Dojo Mobile or Sencha Touch, this allows a smartphone app to be developed with just HTML, CSS, and JavaScript.
    See all alternatives