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

Kotlin

15.3K
11.7K
+ 1
647
Xamarin

1.3K
1.5K
+ 1
785
Add tool

Kotlin vs Xamarin: What are the differences?

Introduction

In this article, we will discuss the key differences between Kotlin and Xamarin. Both Kotlin and Xamarin are popular frameworks used for developing native mobile applications. However, there are several important distinctions between the two.

  1. Language and Syntax: Kotlin is a statically-typed programming language developed by JetBrains, while Xamarin is a framework that allows developers to build cross-platform applications using the C# language. Kotlin has a more intuitive and concise syntax compared to C#, making it easier to read and write code.

  2. Platform Support: Kotlin primarily targets the Java Virtual Machine (JVM) and is compatible with Android, JVM, and native desktop applications. On the other hand, Xamarin allows developers to build cross-platform applications for iOS, Android, and Windows using a shared codebase. Xamarin provides a range of development tools and libraries to facilitate multi-platform development.

  3. Tooling and Development Experience: Kotlin has official support from Android Studio, which provides a rich set of developer tools and an integrated development environment (IDE). Xamarin, on the other hand, uses Visual Studio and Visual Studio for Mac as the primary development environment. Xamarin provides extensive tooling support for debugging, testing, and profiling mobile applications.

  4. Performance and Memory Consumption: Kotlin compiles to highly optimized bytecode, resulting in excellent performance and low memory consumption. Xamarin, however, relies on runtime interpretation and Just-In-Time (JIT) compilation, which can impact performance and increase memory footprint. Xamarin applications may require additional optimization techniques to achieve comparable performance to Kotlin applications.

  5. Community and Ecosystem: Kotlin has gained significant popularity in recent years and has a growing community of developers. It benefits from the vast Java ecosystem and libraries, making it easier to reuse existing Java code. Xamarin, on the other hand, has been around for a longer time and has a mature and active community. It benefits from the extensive C# ecosystem and libraries as well as support from Microsoft.

  6. Learning Curve and Development Time: Kotlin has a relatively gentle learning curve for developers familiar with Java. It offers excellent interoperability with Java, enabling the incremental adoption of Kotlin in existing Java projects. Xamarin, on the other hand, requires developers to learn C# and the Xamarin framework, which may involve a steeper learning curve for developers new to the Microsoft ecosystem.

In summary, Kotlin and Xamarin differ in terms of the programming language, platform support, tooling, performance, community, and learning curve. Kotlin provides a more concise and intuitive syntax, primarily targeting the JVM and Android, with excellent performance and memory efficiency. Xamarin, on the other hand, offers cross-platform support for iOS, Android, and Windows, leveraging C# and the extensive Microsoft ecosystem. The choice between Kotlin and Xamarin depends on project requirements, existing codebase, and developer expertise.

Advice on Kotlin and Xamarin
Needs advice
on
DartDart
and
KotlinKotlin

Can anyone help me decide what's best for app development or even android Oreo development? I'm in a state dilemma at the moment. I want to do Android programming, not necessarily web development. I have heard a lot of people recommend one of these, and it seems that both the tools can do the job. Which language would you choose?

See more
Replies (4)
Ondrej Malek
Recommends
on
DartDart

I assume that you mean Flutter by Dart. I have over 6 years experience programming in Android SDK, but about 1,5 month in Flutter. So far I think that Flutter is the future for mobile development. Flutter SDK is much better designed. Ecosystem of libraries seems having much higher quality. I would even say that android opensource libs are having really poor quality. Many times I am wondering how can garbage like that have so many stars at GitHub. Android SDK is hard to compose so you reinvent even basic things on and on, which is totally different story at Flutter. Lolcycle? Both are having good documentation. I quess apps in Flutter can be done in 1/3 of time compared to develop AndroidSDK and iOS, its design is that much better and contemporary. As of language comparison - Kotlin is better, but the difference is not that important. Go from one language to other is no problem. Dart is being updated with new features.

See more
Recommends
on
DartDart

I've selected Flutter and Dart for my side projects and never regretted. Dart learning curve is easy after any OOP language . Flutter as a framework is also has a low entry threshold. I've already started development after a week of learning. Pros for me: code can be build for Android and IOS devices (for ios you need mac or VM), apps written in Dart have great performance on each of these platforms, flexibility. Cons: if you want to build a product as a business and want to hire a new Flutter Developer in the future it can be a problem as the framework and language is not popular for the moment.

See more
Ranjeet Sinha
Senior Software Engineer · | 3 upvotes · 272.8K views
Recommends
on
KotlinKotlin

It depends on what is the purpose of your app development. Do you want to make one app that shares the codebase for both iOS and Android? If yes, then Dart is the way to go. Does your app include interacting with hardware features like camera, Bluetooth, if yes, then go for native Android for better performance? Dart is good for simpler UI apps where you just do basic crud operations over the network and show data but if you need richer UI experience go with native.

See more
Tran Phuc
CTO at Nextfunc Co., Ltd · | 3 upvotes · 272.8K views
Recommends
on
DartDart

I have worked in mobile development since 2010. I have experienced myself on various techs including Native SDK (Android), React Native (from 2016) and Flutter (2018). Almost the apps nowadays can be built using cross-platforms frameworks like React Native or Flutter. I suggest you start with Flutter. Flutter SDK is designed well to speed up your development and it still keeps the quality for your apps. If you're familiar with OOP languages (Java, C#...), switching to Dart is really quick and easy. Of course, sometimes you will need to dive deep into native parts but almost the cases you don't need. Good luck!

See more
Decisions about Kotlin and Xamarin
Alaeddin Alzeybek
Head of Engineering at Volt Lines · | 1 upvote · 225.5K views

From cross platform development point of view: Using kotlin multiplatform is more convenient than java for implementing cross platform code, since it can be converted to be used in iOS (swift) projects, and it can be easily learned if you already know swift. It still an experimental feature but it helped so far to unify a lot of the common code between our iOS and Android projects. And it is more future proof than java regarding support and maintain multiplatform converting.

See more
Nick Parsons
Building cool things on the internet 🛠️ at Stream · | 11 upvotes · 163.7K views

I work at Stream and I'm immensely proud of what our team is working on here at the company. Most recently, we announced our Android SDK accompanied by an extensive tutorial for Java and Kotlin. The tutorial covers just about everything you need to know when it comes to using our Android SDK for Stream Chat. The Android SDK touches many features offered by Stream Chat – more specifically, typing status, read state, file uploads, threads, reactions, editing messages, and commands. Head over to https://getstream.io/tutorials/android-chat/ and give it a whirl!

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Kotlin
Pros of Xamarin
  • 73
    Interoperable with Java
  • 55
    Functional Programming support
  • 50
    Null Safety
  • 46
    Official Android support
  • 44
    Backed by JetBrains
  • 37
    Concise
  • 36
    Modern Multiplatform Applications
  • 28
    Expressive Syntax
  • 27
    Target to JVM
  • 26
    Coroutines
  • 24
    Open Source
  • 19
    Statically Typed
  • 19
    Practical elegance
  • 17
    Android support
  • 17
    Type Inference
  • 14
    Readable code
  • 13
    Powerful as Scala, simple as Python, plus coroutines <3
  • 12
    Better Java
  • 10
    Pragmatic
  • 9
    Lambda
  • 8
    Better language for android
  • 8
    Expressive DSLs
  • 8
    Target to JavaScript
  • 6
    Used for Android
  • 6
    Less boilerplate code
  • 5
    Fast Programming language
  • 5
    Less code
  • 4
    Native
  • 4
    Less boiler plate code
  • 4
    Friendly community
  • 4
    Functional Programming Language
  • 3
    Spring
  • 3
    Official Google Support
  • 2
    Latest version of Java
  • 1
    Well-compromised featured Java alternative
  • 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 Kotlin
Cons of Xamarin
  • 7
    Java interop makes users write Java in Kotlin
  • 4
    Frequent use of {} keys
  • 2
    Hard to make teams adopt the Kotlin style
  • 2
    Nonullpointer Exception
  • 1
    Friendly community
  • 1
    Slow compiler
  • 1
    No boiler plate code
  • 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

- No public GitHub repository available -

What is Kotlin?

Kotlin is a statically typed programming language for the JVM, Android and the browser, 100% interoperable with Java

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 Kotlin?
What companies use Xamarin?
Manage your open source components, licenses, and vulnerabilities
Learn More

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

What tools integrate with Kotlin?
What tools integrate with Xamarin?

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

Blog Posts

GitHubPythonNode.js+47
55
72742
What are some alternatives to Kotlin and Xamarin?
Scala
Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.
Swift
Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.
Java
Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
Groovy
It is a powerful multi-faceted programming language for the JVM platform. It supports a spectrum of programming styles incorporating features from dynamic languages such as optional and duck typing, but also static compilation and static type checking at levels similar to or greater than Java through its extensible static type checker. It aims to greatly increase developer productivity with many powerful features but also a concise, familiar and easy to learn syntax.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
See all alternatives