Going through Xamarin platform features from Android and iOS developer perspective and trying to answer if Xamarin is a rockstart platform ;-) #xamarin #android #ios #csharp
Ximian 2003 Ximian bought by Novell 2004 Mono first release 2009 MonoTouch 1.0 2011 MonoAndroid first release 2011 Novell acquired by Attachmate 0000 Xamarin is founded 2012 Xamarin.Mac 2013 Xamarin Studio .NET is 15 years old mono is 11 years old Xamarin.iOS is 7 years old Xamarin.Android is 4 years old modern Xamarin is 2 years old
software developer since 1992 • Midnight Commander • early Wine contributor • worked on Linux Sun SPARC • later on Linux for SGI Indy • almost did Internet Explorer port to SPARC • started GNOME project and created Gnumeric • started Mono project to implement .NET on Linux source: wikipedia
Phone by sharing C# code between projects • development: ◦ Mac: for all platforms excluding Windows ◦ Windows: for all platforms by using remote Mac ◦ Linux: -
• single base library - .NET Base Class Library plus specific libraries for target platforms MonoTouch or Mono.Android • single runtime for all targeted platforms iOS, Android, Windows Phone • “performant enough even for demanding games”
• AOT compiler converts Xamarin app to native ARM code Android • no final native code • Xamarin compiler creates IL (Intermediate Language) which is executed at runtime on the device
Base Class Library: 15.8MB • Hello world + BCL after Linking: 2.9MB • Hello world debug release: 6KB + Mono Shared components: 10MB source: used to be here http://developer.xamarin.com/guides/android/advanced_topics/linking/
in multiplatform projects • ultra annoying “app is running, are you sure you want to stop it and install new version?” • cannot compare to IntelliJ aka IDEA • Visual Studio to the rescue • overriding methods CMD-I
// implicitly typed int i = 10; // explicitly typed #define preprocessor directive ulong, ushort unsigned types async/await for asynchronous programming mandatory break in switch Lambda expression Generics with runtime type support namespaces properties
read, update, delete • Business Logic data model and business logic • Service Access Layer access REST, parsing JSON • Application Layer platform specific code but not UI-related • User Interface Layer UI-related code shared not shared shared shared shared not shared
into” referencing project • not compiled, if not used • platform specific code via #if statements ◦ #if __MOBILE__ ◦ #if __ANDROID__ • “for personal use only”
Profile • targets many different (supported) platforms • no platform-specific libraries allowed • refactoring of PCL affects all referencing projects • good for sharing with others
contains layouts (StackLayout, GridLayout) and UI elements (Button, Image, SearchBar, WebView) • connect actions (click event, long press event) to code which is shared across all platforms • at the end at run-time all UI elements are mapped to native platform- specific UI components
a bit like old school iOS style • or in XAML layout files ◦ sounds more like Android style ◦ not supporting existing XAML editor :-/ ◦ layouts have supporting class, so called CodeBehind class • using MVVM pattern
in our fast and hassle-free environment. only Android apps • integrated with Xamarin Studio and Visual Studio • native UI on Windows and Mac • widgets for location and battery • easy screenshot taking
and Windows • Android developer could learn iOS app architecture • explains not only C# or Xamarin-related aspects but also basics of the platforms • always with “download as PDF”
• iOS user interface http://developer.xamarin.com/guides/ios/user_interface/ UIKit, Tables and cells, Storyboards • platform features http://developer.xamarin.com/guides/ios/platform_features/ Newsstand, HealthKit, and iOS 9 introduction
in data model • refit by paulcbetts • one C# code for Android, iOS and .NET RESTful API data model network service in our app AFNetworking Retrofit Retrofit manually as a dict
• stars at 1,000 USD/month paid annualy … for 2 apps • 5,000 USD for 5 apps • NUnit or Calabash tests • screenshots, device performance for every step of every test
the Credit Card Validation Screen When I enter a credit card number that's 16 digits long And I click on the Validate button Then I should see a validation error source: http://developer.xamarin.com/guides/testcloud/calabash/introduction-to-calabash/
Montemagno https://github.com/jamesmontemagno • podcast - Xamarin Podcast http://pca.st/9cXF • their own WWDC, also quite pricey 1,499$ Xamarin Evolve • Paul C. Betts and his libraries https://github.com/paulcbetts/
components Library Events Paul C Betts Xamarin Studio Xamarin Podcast Miguel de Icaza Documentation Evolve Xamarin Android Player Components & packages Test Cloud & Calabash Programing Language C#, F#, support native