Using Xamarin in 2020. Why?
What is Xamarin?
Xamarin is a developer technology, which we can develop cross platform mobile applications (native).
Why it is good?
Let’s see, if we don’t develop natively, what do we need before we start developing?
iOS: We need a macOS or OS X, which we can build our application. We need, if we develop iOS, Mac applications, to know the Objective-C or Swift language.
Android: fortunately Java is platform independent, so we can install on every OS. We need to know in Java and need to install an Android Studio.
WindowsPhone: We need to use Windows with C# and Visual Studio.
All in all, unfortunately, it would be very long to develop, and it would take a lot of resources from the company.
Let’s look at all these with Xamarin :
iOS, Android, UWP(Universal Windows Platform) : Xamarin C# with Visual Studio or Xamarin Studio.
It was a little shorter method. One person is enough for work on it, because he writes and builds everything. Xamarin reached that each platform is implemented specificity, so there is no need for an API to develop the app from the platform.
Xamarin the company has been owned by Microsoft.
Now let’s take a look at Xamarin’s services, which we can make the development simpler, easier testing, or even crash detection easier :
- Xamarin Studio: on Mac and Windows, which we can develop in Xamarin.
- VisualStudio 2015contains Xamarin. If we will develop for UWP, we should use VS.
- Xamarin Platform: This is the soul of all this, it will make available to us all the native C # function .
- Xamarin Insights: This is an app-monitoring service, is extremely easy to use crash-s improvement .
- Xamarin Test Cloud: This is an automated help services for testing.
Xamarin, Xamarin.Forms Shared, Xamarin.Forms Portable, which one to choose for development ?
Xamarin (Android,iOS): You should use this if you do not want to develop for UWP and you want to develop the two platform completely separate.
Xamarin.Forms Shared and Portable project:
This is where the Xamarin really, why should you use it. While in the previous chose C # because of this, however, it had also because here we share the UI , for example, if you want to display a pop-up window, we will take the Shared Project, and the compiler will solve for us to all platforms in their pop-up window appears.
But then what is the difference between the two?
Such that even in the Shared we are using the so-called conditional compilation, dependency injections are used for Portable if any platform specific implementation needed.
What are they?
About Dependency you can read in my other post: Xamarin.Forms Portable DependencyService — platform specific implements.
The conditional compilation means that you do not organize as a separate files for each platform , but there you implement where you need to use . How can this be? : we have to write the platform specific implementation between this makro :#if __iOS__ , if we need to implement a iOS specific implementation. Who does what in comfortable using it. I actually recommend and the Dependency Injections, beacuse I like to see the implementation of separate files.