Introduction to Xamarin


Published on

Presentation we delivered for the the GRMobileDev meetup ( on 10/2/2013. We introduced the Grand Rapids, MI mobile dev community to Xamarin and leveraging C# cross platform.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Introduction to Xamarin

  1. 1. Enterprise Mobile Apps Xamarin and C# We Love This Stuff
  2. 2. About Us ( • Brian Anderson • Founder of OST’s app dev practice / Business Dev • Crowe -> SageStone -> NuSoft -> OST • Nick Westbrook • Sr. Consultant (worked on ArtPrize 1.0) • … -> Spout -> Family Christian -> OST • Mike Perry • Sr. Consultant • NuSoft -> Amway -> KPMG -> OST • Alex Jantz • Consultant • Belcan (Aerospace dev and EE) -> OST
  3. 3. Xamarin History (via Wikipedia) • In June 2000, Microsoft first announced their .NET Framework.[4] Miguel de Icaza of Ximian began investigating whether a Linux version was feasible.[5] The Mono open source project was launched on July 19, 2001. Ximian was bought by Novell on August 4, 2003. • After the acquisition of Novell by Attachmate in April 2011, Attachmate announced hundreds of layoffs for the Novell workforce, including Mono developers,[6]putting the future of Mono in question.[7][8] • On May 16, 2011, Miguel De Icaza announced on his blog that Mono would be developed and supported by Xamarin, which planned to release a new suite of mobile products. According to De Icaza, at least part of the original Mono team had moved to the new company.[9] • After this announcement, the future of the project was questioned, since MonoTouch and Mono for Android would now be in direct competition with the existing commercial offerings owned by Attachmate, and considering that the Xamarin team would have difficulty proving that they had not used technologies previously developed when they were employed by Novell for the same work.[10][11] • In July 2011, however, Novell, now a subsidiary of Attachmate, and Xamarin announced that Novell had granted a perpetual license for Mono, MonoTouch and Mono for Android to Xamarin, which formally and legally took official stewardship of the project.[12][13] • In December 2012, Xamarin released Xamarin.Mac,[14] a plugin for the existing MonoDevelop Integrated development environment (IDE), allowing developers to build C#-based applications for the Apple OS X operating system and package them for publishing via the Apple App Store. • In February 2013, Xamarin announced the release of Xamarin 2.0.[15] The release included two main components: Xamarin Studio, which bundled Xamarin's previous, separate iOS, Android and Apple OS X development tools into a single application;[16] and integration with Visual Studio, Microsoft's IDE for the .NET Framework, allowing Visual Studio to be used for creating applications for iOS and Android, as well as for Windows.
  4. 4. Xamarin Framework History •Mono • C# + .NET implementation for Linux • started in 2001/released 2004 (C# 1.0) •MonoTouch (for iOS) – 2009 (iPhone OS 3.0, pre-ipad) •Mono for Android – 2011 (Android 2.3 Gingerbread) •MonoDevelop IDE •MonoMac open source project
  5. 5. Why Xamarin? • Apps are native, performance is native • Entire platform SDK available to your code: • iOS: StoreKit, EventKit, iCloud, etc • Android: Play Services, Compatibility Library, etc • Share C# across Xamarin, Windows & WinPhone apps • Leverage platform-specific libraries: • iOS: Objective-C • Android: Java
  6. 6. Why does this matter? 1. User experience 2. Performance 3. Features We don’t believe that HTML5 apps give a truly native experience •Proof = Facebook Apps
  7. 7. How does it work?
  8. 8. How does it work?
  9. 9. Xamarin Development Environments
  10. 10. iOS apps in Visual Studio
  11. 11. Demo Xamarin Studio (Mac & Windows), Visual Studio, Debugging, Storyboards
  12. 12. Enterprise Mobile Apps
  13. 13. Real Enterprise Project Experience • Project description • Starting with iPhone • Building on top of large infrastructure with existing RESTful API and a common domain library • Leveraging an enterprise Onion Architecture • Domain driven design • Domain services • App services • UI per platform • Defined infrastructure layers for communication and data abstraction • Dependency Injection • ORM with Linq support • Repository patterns • We wanted to leverage components (ie Charts & more) to save time and $
  14. 14. Demo How are we architecting it? Where are we at in the dev cycle?
  15. 15. Pro / Cons Pros • C# - makes for fast coding of back-end patterns • Lots of shared code cross- platform • Clean IDE, easy to pick up and run with Cons • New platform • Still gaining support for things like AutoMapper, Ninject, and PCL’s • SVN add-in needs work (or remove it completely. We really need this project to migrate to Git anyway.) • Poor Storyboard stability when used with SVN • File linking in the presentation layers can be a pain
  16. 16. Tips • If using SVN: Use Xcode to install the Command Line Tools (if not already installed) and use Terminal to run SVN commands. • You can create XIB (nib) files for complex views and avoid using the Storyboard • Expect a learning curve if you haven’t worked with iOS view controllers before
  17. 17. Something Fun
  18. 18. Skunk works • Azure Mobile Services • Android / iOS with shared core • Including communication with on premise Web API • Custom microcontroller designed using • A stop light Let the final demo begin…
  19. 19. How it works
  20. 20. Circuit
  21. 21. Questions / Thoughts