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

Blazor

514
690
+ 1
440
Xamarin

1.3K
1.5K
+ 1
785
Add tool

Blazor vs Xamarin: What are the differences?

Blazor and Xamarin are both popular frameworks for building cross-platform applications. However, there are some key differences between the two that developers need to consider when choosing the right framework for their project.

  1. Language and platform: One of the main differences between Blazor and Xamarin is the language and platform they are built on. Blazor is based on WebAssembly and uses C# as its primary programming language, allowing developers to build web applications using C# instead of JavaScript. On the other hand, Xamarin is based on the .NET framework and uses C# as well, but it is primarily used for building native mobile applications for iOS and Android.

  2. UI components: Another difference between Blazor and Xamarin is the way they handle user interface components. Blazor uses Razor syntax and HTML to define the UI components, similar to how web applications are built using ASP.NET. Xamarin, on the other hand, uses XAML (eXtensible Application Markup Language) for defining the UI components, which provides a more declarative and XAML-based approach.

  3. Code reusability: When it comes to code reusability, Blazor has an advantage over Xamarin. Since Blazor allows developers to build web applications using C# and Razor syntax, the same code can be reused for both client-side and server-side development. In contrast, Xamarin requires developers to write separate code for each platform (iOS and Android), although it provides mechanisms for code sharing between platforms.

  4. Deployment: In terms of deployment, there are differences between Blazor and Xamarin. Blazor applications can be deployed as static files to a web server, making it easier to host and distribute. Xamarin applications, on the other hand, need to be compiled into native binaries for each platform before they can be deployed, which adds complexity to the deployment process.

  5. Integration with existing projects: Blazor and Xamarin have different levels of integration with existing projects. Blazor can easily integrate with existing ASP.NET projects, allowing developers to leverage their existing codebase and infrastructure. Xamarin, on the other hand, requires more effort to integrate with existing projects, especially if they are not built on the .NET framework.

  6. Community and ecosystem: Another important difference between Blazor and Xamarin is the community and ecosystem around them. Xamarin has been around for a longer time and has a larger community and ecosystem, with a wide range of tools, libraries, and resources available. Blazor, being a newer technology, is still growing its community and ecosystem, although it has gained significant traction in recent years.

In Summary, Blazor and Xamarin have key differences in terms of the language and platform they are built on, the UI components they use, code reusability, deployment process, integration with existing projects, and community and ecosystem support.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Blazor
Pros of Xamarin
  • 62
    Uses C#
  • 48
    No need to learn separate language or technology
  • 41
    Supports making a single page application
  • 39
    Tight integration with .NET project
  • 37
    Uses .NET standard library
  • 30
    Very little JavaScript required
  • 29
    Components
  • 27
    Shared classes between client and server
  • 27
    No need to compile, bundle and deploy separately
  • 24
    Cross Platform
  • 21
    Has Server AND Client hosting models
  • 18
    Very easy JavaScript interop if required
  • 17
    Third party state management i.e. Blazor-State
  • 14
    App state can be managed singleton objects
  • 4
    Portable Code across Mobile, Web and Desktop
  • 2
    Work with Electron/MAUI
  • 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 Blazor
Cons of Xamarin
  • 4
    Initial load time
  • 2
    Hard to inject javascript
  • 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 Blazor?

Blazor is a .NET web framework that runs in any browser. You author Blazor apps using C#/Razor and HTML.

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 Blazor?
What companies use Xamarin?
See which teams inside your own company are using Blazor 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 Blazor?
What tools integrate with Xamarin?

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

What are some alternatives to Blazor and Xamarin?
React
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
Vaadin
It is the fastest way to build web applications in Java. It automates the communication between your server and the browser and gives you a high-level component API for all Vaadin components
Flutter
Flutter is a mobile app SDK to help developers and designers build modern mobile apps for iOS and Android.
Bootstrap
Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
See all alternatives