4. Motivation: Development technologies like Windows
Forms, WPF, Silverlight, and Windows Phone provide a default
experience that leads a developer down the path of dragging
controls from a toolbox to a design surface.
Xamarin
5. Motivation:
● Writing code in the form's code-behind file.
● Coupling between the UI controls and the business logic.
● Increases the cost of making UI modifications.
● Difficulty of unit testing such code.
Xamarin
6. Xamarin
View
The view is responsible for
defining the structure, layout,
and appearance of what the
user sees on the screen
7. Xamarin
Model
The model in MVVM is an
implementation of the
application's domain model
that includes a data model
along with business and
validation logic.
8. Xamarin ViewModel
The view model acts as an
intermediary between the view
and the model, and is
responsible for handling the
view logic. Typically, the view
model interacts with the model
by invoking methods in the
model classes.
9. Xamarin
Benefits
● During the development process, developers and designers
can work more independently and concurrently on their
components.
● The developers can create unit tests for the view model and
the model without using the view.
12. Xamarin
The MvvmCross Magic It’s an open-source framework
maintained by Stuart Lodge, Martijn van Dijk & Co.
● It has Dependency Injection built-in -> Interface Driven
Design.
● It has a lot of plugins already written such as location,
emails, gallery, network, SQLite, secure storage, phone
calls etc.
● #IF plugins -> less work for the developer, but also less
control.
13. Xamarin
MvvmCross has support for:
● Xamarin.iOS
● Mac
● Xamarin.Android
● Windows Presentation Foundation
● Windows Phone
● Windows 8
● Universal Windows Platform
14. Xamarin
DataBindings:
Window Phone -> Properties No C#, just XAML <TextBox Text="{Binding
Password, Mode=TwoWay}" />
Android -> Properties No C#, just XML
xmlns:local="http://schemas.android.com/apk/res-auto" <EditText
local:MvxBind="Text Password" />
IOS -> Properties Just C# var set =
this.CreateBindingSet<LoginViewController, LoginViewModel>();
set.Bind(textField_Password).To(vm => vm.Password);