4 ms·
How does it compare to React Native, anyone using both? I was just starting a project with RN, will be my first React project. But I have years of C# experience
by gokhan 11y ago
How does it compare to React Native, anyone using both? I was just starting a project with RN, will be my first React project. But I have years of C# experience, so Xamarin way would be faster.
- izacus 11y agoHaving tried both, Xamarin has been significantly more mature environment with better libraries and better support for underlying OS than React-Native.
- miguelrochefort 11y agoReact Native support is coming to Visual Studio Code https://github.com/Microsoft/vscode-react-native https://github.com/Microsoft/vscode-react-native
- kcorbitt 11y agoI haven't used Xamarin, so take this with a big grain of salt. But my understanding is that its API is similar to that of the underlying platform, meaning that it's mostly imperative and you write and interact with views in much the same way you would in Objective-C or Java, just in a different and arguably better language (C#). React Native has a different philosophy -- it intentionally abstracts away the platform APIs entirely, and unless you're writing a native plugin you're only able to access a React-centric API. This is a lot more ambitious and leads to a great developer experience when it works. Some people however feel that it's a misguided effort and that you can't expect to write fluid mobile applications without interacting with the platform primitives directly. The jury is still out on how well it will scale and there definitely still are pain points with both the developer experience and app performance, but many people including myself have written production apps in it and in my opinion it largely delivers on its promise.
- cableshaft 11y agoI've made apps with Xamarin before. For UI it's basically a very thin wrapper around existing UI code (at least pre-Xamarin Forms). I basically could take my existing native iOS knowledge, look up what they changed the function or object name to in Xamarin (usually a minor name change to be more idiomatic to C#), and set things up almost exactly the way I would have done in Objective-C code. It was actually very common that if I didn't know how to do something I'd look it up for iOS on Stack Overflow, because it was almost certainly answered there, then look up the corresponding Xamarin object/function names.
- nbevans 11y agoCorrect. The Xamarin API is 1:1 aligned with the native platform. To the point that it is almost entirely generated from automatic tooling with the odd "fix up" here and there. Xamarin Forms however is a framework that performs abstraction, in a similar vein as React Native. Xamarin Forms is built upon the Xamarin API.
- nxh 11y agoThe great thing about Xamarin Forms is you can use Dependency Injection [1] to access the Native features. I started with Xamarin Forms without any pre-knowledge of iOS or Android development. I use Xamarin Forms on a daily basis and share 99% of my code. [1] https://developer.xamarin.com/guides/xamarin-forms/dependency-service/ https://developer.xamarin.com/guides/xamarin-forms/dependenc...
- pc86 11y agoIs it on GitHub? I've been working with C# for a decade and will be getting into Xamarin now that it won't cost me thousands of dollars to do so. It would be great to have some Open Source examples to look at!
- nxh 11y agoThere are some good tutorials about Xamarin Forms, e.g. https://developer.xamarin.com/guides/xamarin-forms/getting-started/introduction-to-xamarin-forms/ https://developer.xamarin.com/guides/xamarin-forms/getting-s.... Xamarin Forms Labs is a great open source project for controls and services using Xamarin Forms: https://github.com/XLabs/Xamarin-Forms-Labs https://github.com/XLabs/Xamarin-Forms-Labs
- platform 11y agoI am currently developing a hybrid app. Where communication with backend, image manipulation, interaction with settings+security features of the platform -- are in Android Java. While the basic data entry / data presentation forms are in React-native. I would not mind switching the Android Java side -- to Xamarin, but will I still be able to have a portion of my app in React Native? Are there any open source examples that use Xamarin and React-native?
- mwcampbell 11y agoThis blog post, written by mpweiher shortly after the initial public release of React Native, explains why it can't truly be considered "native": http://blog.metaobject.com/2015/04/reactnative-isn.html http://blog.metaobject.com/2015/04/reactnative-isn.html Xamarin is much closer to native. In particular, unless you choose to use Xamarin Forms, you'll be using each platform's native UI APIs, so your UI will be indistinguishable from an app written in the platform's native language. Also, whereas React Native for iOS is restricted to using the JavaScriptCore interpreter (not even the JIT compiler), the Xamarin toolchain AOT-compiles .NET IL to native code.
- nbevans 11y agoGood lord that blog makes for tedious reading! It is like he is on a one man crusade to overturn decades of irreversible missteps with the practice of OOP. Rather than trying to fix an unfixable wrong the author should simply get on board the Actor-based Programming bandwagon instead which is almost entirely aligned to Alan Kay's original thoughts. Being "hung up" on ideologies, especially those which are decades old, is not a good personal development strategy.
- mwcampbell 11y agoYou may be right, but I still consider him an authority on developing native apps for Apple platforms, because he has so much experience in that area. So in that context, the blog post on React Native is relevant.
- nbevans 11y agoYeah the post about React Native is fair.