xamarin user group san diego - mvvm cross
TRANSCRIPT
What Is MVVM?• Model, View, ViewModel
• Traditionally iOS is developed in MVC (Model, View, Controller)
• Everything can be tightly coupled (delegation pattern)
• Easy to do wrong
• Traditionally Android is developed in ???
• Tight coupling between views (AXML) and logic (views get inflated)
What Is MVVM?
http://en.wikipedia.org/wiki/Model_View_ViewModel
What Is MvvmCross?• a.k.a. MvX
• applies MVVM pattern to
• Xamarin.iOS, Xamarin.Android, Windows Universal
• Xamarin.Mac, Windows Store, …
• IoC and Dependency Injection are core concepts
• Makes for easily testable code
• https://github.com/MvvmCross/MvvmCross
What Is Inversion Of Control?
• http://en.wikipedia.org/wiki/Inversion_of_control
in traditional programming, the custom code that expresses the purpose of the program calls into reusable libraries to take care of generic tasks, but with inversion of control, it is the reusable code that calls into the custom, or task-specific, code.
What Is Dependency Injection?
• http://en.wikipedia.org/wiki/Dependency_injection
the client part of a program which uses a module or service doesn't need to know all its details, and typically the module can be replaced by another one of similar characteristics without altering the client.
Advantages / DisadvantagesAdvantages:
• Interchangeable code modules
• Supports test driven development (TDD)
• Core pattern to follow (Code Review)
• DataBindings
Disadvantages:
• It is a non-native pattern for iOS and Android
• core 3rd party dependency
• Lot’s of glue code for Custom Bindings (Value Converters)
• documentation contains a high amount of kitten
Bonusatp.fm
Hosted by Marco Arment, Casey Liss, John Siracusa
hanselminutes.com
Hosted by Scott Hanselman