1 / 0

Hot Tuna

Hot Tuna. Cross platform development with . net , Xamarin and MvvmCross. Sean’s Guff. Formerly CIO at Catalyst Risk Management Currently unemployed Personal shareware site at www.sourceitsoftware.com Blog at sourceitsoftware.blogspot.com @ seanrcross sean@sourceitsoftware.com. To cover.

badru
Download Presentation

Hot Tuna

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hot Tuna

    Cross platform development with .net, Xamarinand MvvmCross
  2. Sean’s Guff Formerly CIO at Catalyst Risk ManagementCurrently unemployed Personal shareware site atwww.sourceitsoftware.com Blog atsourceitsoftware.blogspot.com @seanrcross sean@sourceitsoftware.com
  3. To cover What are we trying to achieve Example Theory (boring!) Getting started with MvvmCross Plugins Platform specific stuff Summary Links
  4. The holy grail
  5. What is achievable
  6. Example – Lions Official (sorry)
  7. The pieces .net (duh) Xamarin (iOS, Android, Mac) Portable Class Libraries MvvmCross
  8. Xamarin Commercial products for C# development for non-Windows platforms Xamarin.Android Xamarin.iOS Xamarin.Mac Need business edition for VS integration @ $999 US each
  9. Xamarin Demo
  10. Portable Class Libraries Create a single library that can be used by multiple .net frameworks Allows access only to functionality shared by all selected frameworks Does some nifty namespace mapping Makes cross platform development much easier Microsoft and 3rd party PCLs available (HttpClient, Imaging, JSON…)
  11. .netx.x Silverlight Portable Class Library Shared functionality
  12. .netx.x Silverlight Portable Class Library Shared functionality Windows Store
  13. .netx.x Silverlight Portable Class Library Shared functionality Windows Store Xamarin.XXXX
  14. PCL Demo Easy-peasy, lemon squeezy It’s hard to find a good image of a class library
  15. Mvvm: Model – View Model - Model
  16. Mvvm: Key interfaces INotifyPropertyChanged RaisePropertyChanged(() => PropertyName ); ICommand INotifyCollectionChanged (or ObservableCollection)
  17. Mvvm: Binding
  18. XAML Code <StackPanel> <TextBox Text="{Binding Hello, Mode=TwoWay}" /> <TextBlock Text="{Binding Hello}" /> <Button Content="Click Me" Command="{BindingMyCommand}" /> <Button Content="Go Second" Command="{BindingGoSecondCommand}"  /> </StackPanel> publicclassFirstViewModel  : MvxViewModel { privatestring _hello = "Hello MvvmCross"; publicstring Hello { get { return _hello; } set { _hello = value; RaisePropertyChanged(() => Hello); } } publicSystem.Windows.Input.ICommandMyCommand     { get         {             return newCirrious.MvvmCross.ViewModels.MvxCommand(DoMyCommand);         }     } privatevoidDoMyCommand()     {         Hello = Hello + " World";     } publicSystem.Windows.Input.ICommandGoSecondCommand     { get         {             return newCirrious.MvvmCross.ViewModels.MvxCommand(DoGoSecond);         }     } privatevoidDoGoSecond()     { ShowViewModel<SecondViewModel>();     } }
  19. MvvmCross Cross Platform MVVM Development Framework Free, open source Supports WP7,8 WPF WinRT Xamarin.Android Xamarin.iOS Xamarin.Mac AKA Mvx
  20. MvvmCross Architecture
  21. Using MvvmCross Hard - download from github, compile, include references etc Easy - Nuget; look for MvvmCross Hot Tuna Starter Pack, and plugins Real Easy - NinjaCoder
  22. Getting started - Nuget
  23. Getting started - NinjaCoder
  24. Plugins Convenient way to access platform functionality Use NinjaCoder or Nuget to add plugins Includes Accelerometer, Email, Files, Location, Messaging, Sqlite 3rd party plugins available as well. Consume plugins using Dependency Injection or Service locator
  25. Plugins Demo
  26. Platform specific code Describe functionality using an interface in .Core Create platform specific implementation in .xxxx Register implementation on app startup Mvx.RegisterSingleton<ISettingsPersistance>(new SettingsPersistanceWPF()); Mvx.RegisterType<IGetRemoteData, RemoteDataWpf>(); Consume plugins using Dependancy Injection or Service locator persistance = Mvx.Resolve<ISettingsPersistance>();
  27. Platform specific example Here is one that I prepared earlier
  28. Summary PCLs let you use easily share code across multiple platforms Xamarin lets you use C# on Android, iOS and Mac MvvmCross wraps it all up to make it easy Shared PCL that holds most functionality Platform specific apps for views and dependant code Plugins let you easily add functionality in a cross platform friendly way Do your own platform dependant stuff using interfaces and IoC/Dependancy Injection
  29. Links - MvvmCross Stuart Lodge - MvvmCross Author Twitter @slodge Blog http://slodge.blogspot.co.uk/ Videos http://www.youtube.com/user/MrHollywoof?feature=watch List of tutorial videos http://mvvmcross.wordpress.com/ Repository https://github.com/slodge/MvvmCross
  30. Links - Xamarin Website - http://www.xamarin.com/ Samples - https://github.com/xamarin Mobile library - https://github.com/xamarin/Xamarin.Mobile
  31. Links – Ninja Coder Adrian Sudbury – Ninja Coder Author Twitter @asudbury Blog http://adriansudbury.blogspot.co.uk/ Ninja Coder http://visualstudiogallery.msdn.microsoft.com/618b51f0-6de8-4f85-95ce-a50c658c7767
  32. Links - Other http://www.hanselman.com/blog/CrossPlatformPortableClassLibrariesWithNETAreHappening.aspx http://sourceitsoftware.blogspot.co.nz/
  33. Credits Mvvm Images from http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/MVVM
  34. Questions Answers not guaranteed
More Related