SlideShare ist ein Scribd-Unternehmen logo
1 von 20
MvvmCross – Going Portable




        Going Portable
          @slodge
MvvmCross

 Version 1
MvvmCross       MvvmCross            MvvmCross            MvvmCross
   .WP7            .Touch               .Droid              .WinRT



MyApplication   MyApplication        MyApplication        MyApplication
   .WP7            .Touch               .Droid              .WinRT



    MyUI            MyUI                 MyUI                 MyUI
    .WP7           .Touch               .Droid               .WinRT
                       MvvmBinding          MvvmBinding
                         .Touch                .Droid
MvvmCross       MvvmCross         MvvmCross            MvvmCross
      .WP7            .Touch            .Droid              .WinRT



Core MvvmCross MyApplication
MyApplication  Library contains:     MyApplication     MyApplication
      .WP7            .Touch            .Droid           .WinRT

•   Mvvm interfaces and base classes
•   Simple DI container and IoC controller
      MyUI              MyUI               MyUI              MyUI
•   Platform specific navigation• and presentation logic
       .WP7            .Touch           M .Droid            .WinRT
•   Platform specific implementations of MvvmBinding
                            MvvmBinding
                              .Touch             .Droid
    file, location, camera, etc
MvvmCross            MvvmCross • M          MvvmCross            MvvmCross
   .WP7                 .Touch                 .Droid              .WinRT



MyApplication        MyApplication          MyApplication        MyApplication
   .WP7                 .Touch                 .Droid              .WinRT


 MyApplication Library contains:
  MyUI             MyUI                         MyUI                 MyUI
     .WP7                .Touch                .Droid               .WinRT
 •   Application startup logic
                          MvvmBinding
                            .Touch
                                                   MvvmBinding
                                                      .Droid
 •   Models and Services            •   M

 •   ViewModels
 •   ValueConverters

 Identical code across platforms – just cut-and-paste projects
MyUI Executable contains:
MvvmCross       MvvmCross             MvvmCross            MvvmCross
   .WP7             .Touch              .Droid              .WinRT
                               • M
• Platform Specific Views and Controls
• Some adaption for ValueConverters
MyApplication   MyApplication    MyApplication            MyApplication
   .WP7             .Touch              .Droid              .WinRT



   MyUI              MyUI                MyUI                 MyUI
   .WP7             .Touch              .Droid               .WinRT
                        MvvmBinding         MvvmBinding
                          .Touch               .Droid
Problems
• MvvmCross is a “fat” library – contains more than just
  mvvm!
• Compiled image sizes can be large – especially on
  MonoTouch
• Application libraries are cut and paste – a boring, error
  prone manual job
• Automated cross-platform refactoring is impossible
• No common way to extend the platform
• Each new platform added requires manual cut-and-
  paste duplication of projects
MvvmCross

Version Next
MvvmCross
                             .Portable



                           MyApplication
                             .Portable
                                              Plugin1            Plugin2
                                                                                     …
                                             .Portable          .Portable




MyUI               MyUI                     MyUI                             MyUI
.WP7              .Touch                   .Droid                           .WinRT
    MvvmCross            MvvmCross               MvvmCross                        MvvmCross
   .Adapter.Wp7        .Adapter.Touch          .Adapter.Droid                   .Adapter.WinRT


       Plugin1             Plugin1                  Plugin1                          Plugin1
        .Wp7               .Touch                   .Droid                           .WinRT


       Plugin2             Plugin2                  Plugin2                          Plugin2
        .Wp7               .Touch                   .Droid                           .WinRT


         …                   …                        …                                  …
MvvmCross
                                .Portable



                           MyApplication
MvvmCross is a single   Portable library containing:
                             .Portable
                                                 Plugin1            Plugin2
                                                                                        …
                                                .Portable          .Portable
• Mvvm base classes
• Simple DI container and IoC controller
• Plugin Loader base interfaces
   MyUI            MyUI              MyUI                                       MyUI
   .WP7              .Touch                   .Droid                           .WinRT
       MvvmCross            MvvmCross
                                        • M         MvvmCross                        MvvmCross
      .Adapter.Wp7        .Adapter.Touch          .Adapter.Droid                   .Adapter.WinRT


          Plugin1             Plugin1                  Plugin1                          Plugin1
           .Wp7               .Touch                   .Droid                           .WinRT


          Plugin2             Plugin2                  Plugin2                          Plugin2
           .Wp7               .Touch                   .Droid                           .WinRT


            …                   …                        …                                  …
MvvmCross
                                .Portable



                             MyApplication
                               .Portable
                                                Plugin1            Plugin2
                                                                                 …
                                               .Portable          .Portable




 MyUI               MyUI               MyUI             MyUI
MyApplication is a single Portable library containing: .WinRT
 .WP7              .Touch             .Droid
        MvvmCross           MvvmCross              MvvmCross                    MvvmCross

•   Application startup logic
       .Adapter.Wp7       .Adapter.Touch         .Adapter.Droid               .Adapter.WinRT


•   Models and Services Plugin1 •
         Plugin1
          .Wp7             .Touch
                                           M         Plugin1
                                                     .Droid
                                                                                 Plugin1
                                                                                 .WinRT
•   ViewModels
•
         Plugin2           Plugin2                   Plugin2                     Plugin2
    ValueConverters
          .Wp7             .Touch                    .Droid                      .WinRT


            …                   …                      …                             …
MvvmCross
                               .Portable



                            MyApplication
                              .Portable
                                               Plugin1            Plugin2
                                                                                      …
                                              .Portable          .Portable




  MyUI              MyUI                     MyUI                             MyUI
The Portable part of each Plugin:
  .WP7             .Touch                   .Droid                           .WinRT
       MvvmCross           MvvmCross              MvvmCross                        MvvmCross

• Provides the interface for that plugin
      .Adapter.Wp7       .Adapter.Touch         .Adapter.Droid                   .Adapter.WinRT


   • e.g. for Location it provides Start, Stop, and an
       Plugin1
        .Wp7
                          Plugin1 • M
                          .Touch
                                            Plugin1
                                            .Droid
                                                             Plugin1
                                                             .WinRT
     OnLocationChanged event.
• Provides an EnsureLoaded() call for initialisation at runtime
       Plugin2            Plugin2           Plugin2          Plugin2
        .Wp7              .Touch            .Droid           .WinRT


           …                   …                      …                                   …
MvvmCross
                                 .Portable

MyUI executable provides:
                               MyApplication
                                 .Portable
• Platform Specific Views and Controls
• Some adaption for ValueConverters               Plugin1
                                                 .Portable
                                                                     Plugin2
                                                                    .Portable
                                                                                         …

                                         • M

   MyUI                MyUI                     MyUI                             MyUI
   .WP7               .Touch                   .Droid                           .WinRT
        MvvmCross            MvvmCross               MvvmCross                        MvvmCross
       .Adapter.Wp7        .Adapter.Touch          .Adapter.Droid                   .Adapter.WinRT


          Plugin1              Plugin1                  Plugin1                          Plugin1
           .Wp7                .Touch                   .Droid                           .WinRT


          Plugin2              Plugin2                  Plugin2                          Plugin2
           .Wp7                .Touch                   .Droid                           .WinRT


            …                    …                        …                                  …
MvvmCross
                                 .Portable


The MvvmCross.Adapter for each platform provides:
                               MyApplication
                                 .Portable
• Platform Specific Mvvm Helpers – e.g. binding Plugin2
                                       Plugin1
• Platform Specific View and navigation
                                                                             …
                                      .Portable .Portable

                             • M
• Platform Specific Plugin Manager/Loader
   MyUI                MyUI                     MyUI                 MyUI
   .WP7               .Touch                   .Droid               .WinRT
        MvvmCross            MvvmCross               MvvmCross            MvvmCross
       .Adapter.Wp7        .Adapter.Touch          .Adapter.Droid       .Adapter.WinRT


          Plugin1              Plugin1                  Plugin1              Plugin1
           .Wp7                .Touch                   .Droid               .WinRT


          Plugin2              Plugin2                  Plugin2              Plugin2
           .Wp7                .Touch                   .Droid               .WinRT


            …                    …                        …                      …
Plugin Implementations:              MvvmCross
                                      .Portable

• Provide platform specific implementations of each Plugin
  Interface                  MyApplication
   • e.g. for Location a platform specific service will provide
                                 .Portable
      Start, Stop, and OnLocationChanged.      Plugin1
                                              .Portable
                                                                 Plugin2
                                                                .Portable
                                                                                  …

• Are initialised at runtime using a mixture of:
                                      • M
   • Project references
                      MyUI
   • Convention-based dynamic assembly loading MyUI
  MyUI                                      MyUI
  .WP7               .Touch                .Droid                         .WinRT
   • Setup Helpers on platforms that don’t support
       MvvmCross            MvvmCross              MvvmCross                    MvvmCross
      Assembly.Load()
      .Adapter.Wp7        .Adapter.Touch         .Adapter.Droid               .Adapter.WinRT


           Plugin1                  Plugin1                Plugin1                  Plugin1
            .Wp7                    .Touch                 .Droid                   .WinRT


           Plugin2                  Plugin2                Plugin2                  Plugin2
            .Wp7                    .Touch                 .Droid                   .WinRT


             …                        …                      …                        …
Plugins – Portable Interfaces
In the Portable Library – Plugins.Email.dll:

   public interface IMvxComposeEmailTask
   {
       void ComposeEmail(string to, string cc, string subject, string body, bool isHtml);
   }


   public class PluginLoader
        : IMvxPluginLoader
        , IMvxServiceConsumer<IMvxPluginManager>
    {
        public static readonly PluginLoader Instance = new PluginLoader();

        #region Implementation of IMvxPluginLoader

        public void EnsureLoaded()
        {
            var manager = this.GetService<IMvxPluginManager>();
            manager.EnsureLoaded<PluginLoader>();

        }

        #endregion
    }
Plugins – Portable Use

The plugin can be used in a Portable ViewModel as simply as:



      protected void ComposeEmail(string to, string subject, string body)
      {
           Cirrious.MvvmCross.Plugins.Email.PluginLoader.Instance.EnsureLoaded();
           var task = this.GetService<IMvxComposeEmailTask>();
           task.ComposeEmail(to, null, subject, body, false);
      }
Plugins – Platform Specific
                Implementations
In one platform specific implementation – Plugins.Email.WindowsPhone.dll:
  public class MvxComposeEmailTask : MvxWindowsPhoneTask, IMvxComposeEmailTask
  {
       public void ComposeEmail(string to, string cc, string subject, string body, bool isHtml)
       {
           var task = new EmailComposeTask() { To = to, Subject = subject, Cc = cc, Body = body };
           DoWithInvalidOperationProtection(task.Show);
       }
    }


   public class Plugin
        : IMvxPlugin
        , IMvxServiceProducer<IMvxComposeEmailTask>
    {
        #region Implementation of IMvxPlugin

        public void Load()
        {
            this.RegisterServiceType<IMvxComposeEmailTask, MvxComposeEmailTask>();
        }

        #endregion
    }
Advantages
• Core MvvmCross is now a much smaller library
• Compiled image sizes can be much smaller – especially
  on MonoTouch
• Each Application is now a single library
• Cross-platform refactoring now a reality
• Manual cut-and-paste between projects eliminated
• Plugin technique allows easy extensibility for everyone
• New portable architecture makes it easier to add ans
  support new platforms –
  Silverlight, WPF, MonoMac, PlayStationSuite, …
Progress…




Working now:          In progress:
• WP7                 • MonoTouch
• Mono for Android
• WinRT

Weitere ähnliche Inhalte

Andere mochten auch

C# Powered Robots, C# Powered Mobile Apps
C# Powered Robots, C# Powered Mobile AppsC# Powered Robots, C# Powered Mobile Apps
C# Powered Robots, C# Powered Mobile AppsJames Montemagno
 
.Net Standard Libraries and Xamarin
.Net Standard Libraries and Xamarin.Net Standard Libraries and Xamarin
.Net Standard Libraries and XamarinJames Montemagno
 
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test CloudXamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test CloudJames Montemagno
 
Xamarin 4 - the future of apps
Xamarin 4  - the future of appsXamarin 4  - the future of apps
Xamarin 4 - the future of appsJames Montemagno
 
Build 2016 - B836 - Cross-Platform Mobile with Xamarin
Build 2016 - B836 - Cross-Platform Mobile with XamarinBuild 2016 - B836 - Cross-Platform Mobile with Xamarin
Build 2016 - B836 - Cross-Platform Mobile with XamarinWindows Developer
 
Mobile Enterprise Success with Xamarin and IBM
Mobile Enterprise Success with Xamarin and IBMMobile Enterprise Success with Xamarin and IBM
Mobile Enterprise Success with Xamarin and IBMXamarin
 
Introduction to Xamarin 2.0
Introduction to Xamarin 2.0Introduction to Xamarin 2.0
Introduction to Xamarin 2.0Xamarin
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Xamarin
 
Cross platform development with c# and xamarin
Cross platform development with c# and xamarinCross platform development with c# and xamarin
Cross platform development with c# and xamarinLuca Zulian
 

Andere mochten auch (10)

C# Powered Robots, C# Powered Mobile Apps
C# Powered Robots, C# Powered Mobile AppsC# Powered Robots, C# Powered Mobile Apps
C# Powered Robots, C# Powered Mobile Apps
 
.Net Standard Libraries and Xamarin
.Net Standard Libraries and Xamarin.Net Standard Libraries and Xamarin
.Net Standard Libraries and Xamarin
 
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test CloudXamarin Dev Days -  Introduction to Xamarin.Forms, Insights, Test Cloud
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
 
Xamarin 4 - the future of apps
Xamarin 4  - the future of appsXamarin 4  - the future of apps
Xamarin 4 - the future of apps
 
Build 2016 - B836 - Cross-Platform Mobile with Xamarin
Build 2016 - B836 - Cross-Platform Mobile with XamarinBuild 2016 - B836 - Cross-Platform Mobile with Xamarin
Build 2016 - B836 - Cross-Platform Mobile with Xamarin
 
Mobile Enterprise Success with Xamarin and IBM
Mobile Enterprise Success with Xamarin and IBMMobile Enterprise Success with Xamarin and IBM
Mobile Enterprise Success with Xamarin and IBM
 
Introduction to Xamarin 2.0
Introduction to Xamarin 2.0Introduction to Xamarin 2.0
Introduction to Xamarin 2.0
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4
 
Cross platform development with c# and xamarin
Cross platform development with c# and xamarinCross platform development with c# and xamarin
Cross platform development with c# and xamarin
 

Ähnlich wie Mvvm cross – going portable

Design and develop cross-platform mobile apps using MVVMCross
Design and develop cross-platform mobile apps using MVVMCrossDesign and develop cross-platform mobile apps using MVVMCross
Design and develop cross-platform mobile apps using MVVMCrossDan Ardelean
 
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...Maksim Shudrak
 
Innomatic Platform Architecture Overview
Innomatic Platform Architecture OverviewInnomatic Platform Architecture Overview
Innomatic Platform Architecture OverviewInnomatic Platform
 
Using java interop in your xamarin.android apps
Using java interop in your xamarin.android appsUsing java interop in your xamarin.android apps
Using java interop in your xamarin.android appsWillem Meints
 
Node.js post-mortem debugging with mdb and SmartOS
Node.js post-mortem debugging with mdb and SmartOSNode.js post-mortem debugging with mdb and SmartOS
Node.js post-mortem debugging with mdb and SmartOSjuliengilli
 
App days 2016 munich - Leaware - real time cross platform app with signalr ...
App days 2016   munich - Leaware - real time cross platform app with signalr ...App days 2016   munich - Leaware - real time cross platform app with signalr ...
App days 2016 munich - Leaware - real time cross platform app with signalr ...Leaware.com
 
Nokia Qt SDK in action - Qt developer days 2010
Nokia Qt SDK in action - Qt developer days 2010Nokia Qt SDK in action - Qt developer days 2010
Nokia Qt SDK in action - Qt developer days 2010Nokia
 
Win rt fundamentals
Win rt fundamentalsWin rt fundamentals
Win rt fundamentalsKevin Stumpf
 
Mobile Application Development JEDI
Mobile Application Development JEDIMobile Application Development JEDI
Mobile Application Development JEDIAlver Noquiao
 
Microsoft Automotive Business Unit - J Za
Microsoft Automotive Business Unit - J ZaMicrosoft Automotive Business Unit - J Za
Microsoft Automotive Business Unit - J Zamfrancis
 
Helping the Lions Roar
Helping the Lions RoarHelping the Lions Roar
Helping the Lions RoarStuart Lodge
 
Build your next app with MvvmCross 6
Build your next app with MvvmCross 6Build your next app with MvvmCross 6
Build your next app with MvvmCross 6Nicolas Milcoff
 
Supercharge your releases with netflix nebula
Supercharge your releases with netflix nebulaSupercharge your releases with netflix nebula
Supercharge your releases with netflix nebulaDanijel Mitar
 
BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...
BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...
BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...Aditya K Sood
 
Triton + Docker, July 2015
Triton + Docker, July 2015Triton + Docker, July 2015
Triton + Docker, July 2015Casey Bisson
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android SecurityMarakana Inc.
 
Discover the Linux on z Systems Effect
Discover the Linux on z Systems EffectDiscover the Linux on z Systems Effect
Discover the Linux on z Systems EffectIBM
 
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2Damir Bersinic
 

Ähnlich wie Mvvm cross – going portable (20)

Design and develop cross-platform mobile apps using MVVMCross
Design and develop cross-platform mobile apps using MVVMCrossDesign and develop cross-platform mobile apps using MVVMCross
Design and develop cross-platform mobile apps using MVVMCross
 
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
Fuzzing malware for fun & profit. Applying Coverage-Guided Fuzzing to Find Bu...
 
Innomatic Platform Architecture Overview
Innomatic Platform Architecture OverviewInnomatic Platform Architecture Overview
Innomatic Platform Architecture Overview
 
Using java interop in your xamarin.android apps
Using java interop in your xamarin.android appsUsing java interop in your xamarin.android apps
Using java interop in your xamarin.android apps
 
Node.js post-mortem debugging with mdb and SmartOS
Node.js post-mortem debugging with mdb and SmartOSNode.js post-mortem debugging with mdb and SmartOS
Node.js post-mortem debugging with mdb and SmartOS
 
App days 2016 munich - Leaware - real time cross platform app with signalr ...
App days 2016   munich - Leaware - real time cross platform app with signalr ...App days 2016   munich - Leaware - real time cross platform app with signalr ...
App days 2016 munich - Leaware - real time cross platform app with signalr ...
 
VIPER ( ? OR : AND) MVVM
VIPER ( ? OR : AND) MVVMVIPER ( ? OR : AND) MVVM
VIPER ( ? OR : AND) MVVM
 
Making of GameOver
Making of GameOverMaking of GameOver
Making of GameOver
 
Nokia Qt SDK in action - Qt developer days 2010
Nokia Qt SDK in action - Qt developer days 2010Nokia Qt SDK in action - Qt developer days 2010
Nokia Qt SDK in action - Qt developer days 2010
 
Win rt fundamentals
Win rt fundamentalsWin rt fundamentals
Win rt fundamentals
 
Mobile Application Development JEDI
Mobile Application Development JEDIMobile Application Development JEDI
Mobile Application Development JEDI
 
Microsoft Automotive Business Unit - J Za
Microsoft Automotive Business Unit - J ZaMicrosoft Automotive Business Unit - J Za
Microsoft Automotive Business Unit - J Za
 
Helping the Lions Roar
Helping the Lions RoarHelping the Lions Roar
Helping the Lions Roar
 
Build your next app with MvvmCross 6
Build your next app with MvvmCross 6Build your next app with MvvmCross 6
Build your next app with MvvmCross 6
 
Supercharge your releases with netflix nebula
Supercharge your releases with netflix nebulaSupercharge your releases with netflix nebula
Supercharge your releases with netflix nebula
 
BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...
BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...
BruCon (Brussels 2011) Hacking Conference - Botnets and Browsers (Brothers in...
 
Triton + Docker, July 2015
Triton + Docker, July 2015Triton + Docker, July 2015
Triton + Docker, July 2015
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Discover the Linux on z Systems Effect
Discover the Linux on z Systems EffectDiscover the Linux on z Systems Effect
Discover the Linux on z Systems Effect
 
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 2
 

Mehr von Stuart Lodge

Hot tuna - from Sean Cross
Hot tuna - from Sean CrossHot tuna - from Sean Cross
Hot tuna - from Sean CrossStuart Lodge
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross IntroductionStuart Lodge
 
Wpug meeting - wp to win8 experiences
Wpug meeting - wp to win8 experiencesWpug meeting - wp to win8 experiences
Wpug meeting - wp to win8 experiencesStuart Lodge
 
AlphaLabs - Node Garden with Speech
AlphaLabs - Node Garden with Speech AlphaLabs - Node Garden with Speech
AlphaLabs - Node Garden with Speech Stuart Lodge
 
About Cirrious ltd
About Cirrious ltdAbout Cirrious ltd
About Cirrious ltdStuart Lodge
 
C# Client to Cloud
C# Client to CloudC# Client to Cloud
C# Client to CloudStuart Lodge
 
How to make a pig udf
How to make a pig udfHow to make a pig udf
How to make a pig udfStuart Lodge
 
C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)
C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)
C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)Stuart Lodge
 
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databindingDev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databindingStuart Lodge
 
Wpug mvvm and data binding
Wpug   mvvm and data bindingWpug   mvvm and data binding
Wpug mvvm and data bindingStuart Lodge
 
Ui testing for Windows Phone
Ui testing for Windows PhoneUi testing for Windows Phone
Ui testing for Windows PhoneStuart Lodge
 
Ui Testing on Windows Phone
Ui Testing on Windows PhoneUi Testing on Windows Phone
Ui Testing on Windows PhoneStuart Lodge
 
How To use Map Blogs
How To use Map BlogsHow To use Map Blogs
How To use Map BlogsStuart Lodge
 
Uk Nuke Rpx Authentication For Dot Net Nuke
Uk Nuke Rpx Authentication For Dot Net NukeUk Nuke Rpx Authentication For Dot Net Nuke
Uk Nuke Rpx Authentication For Dot Net NukeStuart Lodge
 
Uk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net NukeUk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net NukeStuart Lodge
 
UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5Stuart Lodge
 
10 things I’ve learnt In the clouds
10 things I’ve learnt In the clouds10 things I’ve learnt In the clouds
10 things I’ve learnt In the cloudsStuart Lodge
 

Mehr von Stuart Lodge (17)

Hot tuna - from Sean Cross
Hot tuna - from Sean CrossHot tuna - from Sean Cross
Hot tuna - from Sean Cross
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross Introduction
 
Wpug meeting - wp to win8 experiences
Wpug meeting - wp to win8 experiencesWpug meeting - wp to win8 experiences
Wpug meeting - wp to win8 experiences
 
AlphaLabs - Node Garden with Speech
AlphaLabs - Node Garden with Speech AlphaLabs - Node Garden with Speech
AlphaLabs - Node Garden with Speech
 
About Cirrious ltd
About Cirrious ltdAbout Cirrious ltd
About Cirrious ltd
 
C# Client to Cloud
C# Client to CloudC# Client to Cloud
C# Client to Cloud
 
How to make a pig udf
How to make a pig udfHow to make a pig udf
How to make a pig udf
 
C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)
C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)
C# - Azure, WP7, MonoTouch and Mono for Android (MonoDroid)
 
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databindingDev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
 
Wpug mvvm and data binding
Wpug   mvvm and data bindingWpug   mvvm and data binding
Wpug mvvm and data binding
 
Ui testing for Windows Phone
Ui testing for Windows PhoneUi testing for Windows Phone
Ui testing for Windows Phone
 
Ui Testing on Windows Phone
Ui Testing on Windows PhoneUi Testing on Windows Phone
Ui Testing on Windows Phone
 
How To use Map Blogs
How To use Map BlogsHow To use Map Blogs
How To use Map Blogs
 
Uk Nuke Rpx Authentication For Dot Net Nuke
Uk Nuke Rpx Authentication For Dot Net NukeUk Nuke Rpx Authentication For Dot Net Nuke
Uk Nuke Rpx Authentication For Dot Net Nuke
 
Uk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net NukeUk Nuke Facebook Connect Authentication For Dot Net Nuke
Uk Nuke Facebook Connect Authentication For Dot Net Nuke
 
UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5UkNuke Facebook Connect Authentication For DotNetNuke 5
UkNuke Facebook Connect Authentication For DotNetNuke 5
 
10 things I’ve learnt In the clouds
10 things I’ve learnt In the clouds10 things I’ve learnt In the clouds
10 things I’ve learnt In the clouds
 

Kürzlich hochgeladen

SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 MonthsIndeedSEO
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noidadlhescort
 
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...lizamodels9
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceDamini Dixit
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...lizamodels9
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...lizamodels9
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLkapoorjyoti4444
 
Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876
Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876
Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876dlhescort
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...daisycvs
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876dlhescort
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptxnandhinijagan9867
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwaitdaisycvs
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...rajveerescorts2022
 
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...Sheetaleventcompany
 

Kürzlich hochgeladen (20)

SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876
Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876
Cheap Rate Call Girls In Noida Sector 62 Metro 959961乂3876
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
 

Mvvm cross – going portable

  • 1. MvvmCross – Going Portable Going Portable @slodge
  • 3. MvvmCross MvvmCross MvvmCross MvvmCross .WP7 .Touch .Droid .WinRT MyApplication MyApplication MyApplication MyApplication .WP7 .Touch .Droid .WinRT MyUI MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT MvvmBinding MvvmBinding .Touch .Droid
  • 4. MvvmCross MvvmCross MvvmCross MvvmCross .WP7 .Touch .Droid .WinRT Core MvvmCross MyApplication MyApplication Library contains: MyApplication MyApplication .WP7 .Touch .Droid .WinRT • Mvvm interfaces and base classes • Simple DI container and IoC controller MyUI MyUI MyUI MyUI • Platform specific navigation• and presentation logic .WP7 .Touch M .Droid .WinRT • Platform specific implementations of MvvmBinding MvvmBinding .Touch .Droid file, location, camera, etc
  • 5. MvvmCross MvvmCross • M MvvmCross MvvmCross .WP7 .Touch .Droid .WinRT MyApplication MyApplication MyApplication MyApplication .WP7 .Touch .Droid .WinRT MyApplication Library contains: MyUI MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT • Application startup logic MvvmBinding .Touch MvvmBinding .Droid • Models and Services • M • ViewModels • ValueConverters Identical code across platforms – just cut-and-paste projects
  • 6. MyUI Executable contains: MvvmCross MvvmCross MvvmCross MvvmCross .WP7 .Touch .Droid .WinRT • M • Platform Specific Views and Controls • Some adaption for ValueConverters MyApplication MyApplication MyApplication MyApplication .WP7 .Touch .Droid .WinRT MyUI MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT MvvmBinding MvvmBinding .Touch .Droid
  • 7. Problems • MvvmCross is a “fat” library – contains more than just mvvm! • Compiled image sizes can be large – especially on MonoTouch • Application libraries are cut and paste – a boring, error prone manual job • Automated cross-platform refactoring is impossible • No common way to extend the platform • Each new platform added requires manual cut-and- paste duplication of projects
  • 9. MvvmCross .Portable MyApplication .Portable Plugin1 Plugin2 … .Portable .Portable MyUI MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT MvvmCross MvvmCross MvvmCross MvvmCross .Adapter.Wp7 .Adapter.Touch .Adapter.Droid .Adapter.WinRT Plugin1 Plugin1 Plugin1 Plugin1 .Wp7 .Touch .Droid .WinRT Plugin2 Plugin2 Plugin2 Plugin2 .Wp7 .Touch .Droid .WinRT … … … …
  • 10. MvvmCross .Portable MyApplication MvvmCross is a single Portable library containing: .Portable Plugin1 Plugin2 … .Portable .Portable • Mvvm base classes • Simple DI container and IoC controller • Plugin Loader base interfaces MyUI MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT MvvmCross MvvmCross • M MvvmCross MvvmCross .Adapter.Wp7 .Adapter.Touch .Adapter.Droid .Adapter.WinRT Plugin1 Plugin1 Plugin1 Plugin1 .Wp7 .Touch .Droid .WinRT Plugin2 Plugin2 Plugin2 Plugin2 .Wp7 .Touch .Droid .WinRT … … … …
  • 11. MvvmCross .Portable MyApplication .Portable Plugin1 Plugin2 … .Portable .Portable MyUI MyUI MyUI MyUI MyApplication is a single Portable library containing: .WinRT .WP7 .Touch .Droid MvvmCross MvvmCross MvvmCross MvvmCross • Application startup logic .Adapter.Wp7 .Adapter.Touch .Adapter.Droid .Adapter.WinRT • Models and Services Plugin1 • Plugin1 .Wp7 .Touch M Plugin1 .Droid Plugin1 .WinRT • ViewModels • Plugin2 Plugin2 Plugin2 Plugin2 ValueConverters .Wp7 .Touch .Droid .WinRT … … … …
  • 12. MvvmCross .Portable MyApplication .Portable Plugin1 Plugin2 … .Portable .Portable MyUI MyUI MyUI MyUI The Portable part of each Plugin: .WP7 .Touch .Droid .WinRT MvvmCross MvvmCross MvvmCross MvvmCross • Provides the interface for that plugin .Adapter.Wp7 .Adapter.Touch .Adapter.Droid .Adapter.WinRT • e.g. for Location it provides Start, Stop, and an Plugin1 .Wp7 Plugin1 • M .Touch Plugin1 .Droid Plugin1 .WinRT OnLocationChanged event. • Provides an EnsureLoaded() call for initialisation at runtime Plugin2 Plugin2 Plugin2 Plugin2 .Wp7 .Touch .Droid .WinRT … … … …
  • 13. MvvmCross .Portable MyUI executable provides: MyApplication .Portable • Platform Specific Views and Controls • Some adaption for ValueConverters Plugin1 .Portable Plugin2 .Portable … • M MyUI MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT MvvmCross MvvmCross MvvmCross MvvmCross .Adapter.Wp7 .Adapter.Touch .Adapter.Droid .Adapter.WinRT Plugin1 Plugin1 Plugin1 Plugin1 .Wp7 .Touch .Droid .WinRT Plugin2 Plugin2 Plugin2 Plugin2 .Wp7 .Touch .Droid .WinRT … … … …
  • 14. MvvmCross .Portable The MvvmCross.Adapter for each platform provides: MyApplication .Portable • Platform Specific Mvvm Helpers – e.g. binding Plugin2 Plugin1 • Platform Specific View and navigation … .Portable .Portable • M • Platform Specific Plugin Manager/Loader MyUI MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT MvvmCross MvvmCross MvvmCross MvvmCross .Adapter.Wp7 .Adapter.Touch .Adapter.Droid .Adapter.WinRT Plugin1 Plugin1 Plugin1 Plugin1 .Wp7 .Touch .Droid .WinRT Plugin2 Plugin2 Plugin2 Plugin2 .Wp7 .Touch .Droid .WinRT … … … …
  • 15. Plugin Implementations: MvvmCross .Portable • Provide platform specific implementations of each Plugin Interface MyApplication • e.g. for Location a platform specific service will provide .Portable Start, Stop, and OnLocationChanged. Plugin1 .Portable Plugin2 .Portable … • Are initialised at runtime using a mixture of: • M • Project references MyUI • Convention-based dynamic assembly loading MyUI MyUI MyUI .WP7 .Touch .Droid .WinRT • Setup Helpers on platforms that don’t support MvvmCross MvvmCross MvvmCross MvvmCross Assembly.Load() .Adapter.Wp7 .Adapter.Touch .Adapter.Droid .Adapter.WinRT Plugin1 Plugin1 Plugin1 Plugin1 .Wp7 .Touch .Droid .WinRT Plugin2 Plugin2 Plugin2 Plugin2 .Wp7 .Touch .Droid .WinRT … … … …
  • 16. Plugins – Portable Interfaces In the Portable Library – Plugins.Email.dll: public interface IMvxComposeEmailTask { void ComposeEmail(string to, string cc, string subject, string body, bool isHtml); } public class PluginLoader : IMvxPluginLoader , IMvxServiceConsumer<IMvxPluginManager> { public static readonly PluginLoader Instance = new PluginLoader(); #region Implementation of IMvxPluginLoader public void EnsureLoaded() { var manager = this.GetService<IMvxPluginManager>(); manager.EnsureLoaded<PluginLoader>(); } #endregion }
  • 17. Plugins – Portable Use The plugin can be used in a Portable ViewModel as simply as: protected void ComposeEmail(string to, string subject, string body) { Cirrious.MvvmCross.Plugins.Email.PluginLoader.Instance.EnsureLoaded(); var task = this.GetService<IMvxComposeEmailTask>(); task.ComposeEmail(to, null, subject, body, false); }
  • 18. Plugins – Platform Specific Implementations In one platform specific implementation – Plugins.Email.WindowsPhone.dll: public class MvxComposeEmailTask : MvxWindowsPhoneTask, IMvxComposeEmailTask { public void ComposeEmail(string to, string cc, string subject, string body, bool isHtml) { var task = new EmailComposeTask() { To = to, Subject = subject, Cc = cc, Body = body }; DoWithInvalidOperationProtection(task.Show); } } public class Plugin : IMvxPlugin , IMvxServiceProducer<IMvxComposeEmailTask> { #region Implementation of IMvxPlugin public void Load() { this.RegisterServiceType<IMvxComposeEmailTask, MvxComposeEmailTask>(); } #endregion }
  • 19. Advantages • Core MvvmCross is now a much smaller library • Compiled image sizes can be much smaller – especially on MonoTouch • Each Application is now a single library • Cross-platform refactoring now a reality • Manual cut-and-paste between projects eliminated • Plugin technique allows easy extensibility for everyone • New portable architecture makes it easier to add ans support new platforms – Silverlight, WPF, MonoMac, PlayStationSuite, …
  • 20. Progress… Working now: In progress: • WP7 • MonoTouch • Mono for Android • WinRT