xamarin workshop

Post on 08-Apr-2017

2.796 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Xamarin WorkshopMarch 28th

Coimbra, Portugal

Sara Silva@saramgsilva

Microsoft MVP Windows, Xamarin and Azure Developer

Speakers

João Matos@tritonpt

Software Engineer @ Xamarin

Xamarin Overview

Cross-platform development using Xamarin

Xamarin Forms

Let’s code

Agenda

Xamarin Overview

Xamarin enables developers to reach all major mobile platforms!

Xamarin Overview

Xamarin apps look and feel native because

they are native

Native User Interfaces Native API Access Native Performance

Xamarin API

iOS APIs | 100% Coverage Android APIs | 100% Coverage Windows APIs

Anything you can do in Objective-C or Java can be done in C# with Xamarin

Xamarin Products

Test CloudXamarin Platform Xamarin Insights

Is Free => Xamarin iOS + Xamarin Android +

Xamarin Studio

= 0 €

Xamarin for Students

Cross-platform development using Xamarin

Build cross-platform native apps for iOS, Android, and Windows

and share most of your code between them

Shared C# code

Cross-platform development using Xamarin

Shared Code

Data Layer

Data Access Layer

Business Layer

Service Access Layer

Model

Cloud Services

database

Windows App

Application Layer UI Layer

Windows SDK assemblies

iOS App

Application Layer UI Layer

Xamarin iOS SDK assemblies

Android App

Application Layer UI Layer

Xamarin Android SDK assemblies

Model View ViewModel Pattern (MVVM)

View define the UI

View Model must define the behavior for theconnected View

Model define the structure of the data showed in the View

Abstraction Pattern

View Model

Feature X(Abstraction

)

Feature XiOS

Feature XAndroid

Feature XWindows

Knows

Implements

View Model must• Be independent of the platform;• Knows the abstraction for each feature;

In each target, each feature:• Has your own implementation• Must respect the abstraction (the interface)

Make your app testable!

Xamarin Forms

Build native UIs for iOS, Android and Windows Phonefrom a single, shared C# codebase.

Xamarin Forms

Build native UIs for iOS, Android and Windows Phonefrom a single, shared C# codebase.

Shared C# codeShared C# code

Native Development Xamarin SDK and Windows SDK Development Xamarin Forms Development

Xamarin Formsusing Xamarin.Forms;

var profilePage = new ContentPage { Title = "Profile", Icon = "Profile.png", Content = new StackLayout { Spacing = 20, Padding = 50, VerticalOptions = LayoutOptions.Center, Children = { new Entry { Placeholder = "Username" }, new Entry { Placeholder = "Password", IsPassword = true }, new Button { Text = "Login", TextColor = Color.White, BackgroundColor = Color.FromHex("77D065") }}}};

var settingsPage = new ContentPage { Title = "Settings", Icon = "Settings.png", (...)};

var mainPage = new TabbedPage { Children = { profilePage, settingsPage } };

One code…. multiple platforms…. native interface!

Let’s codeGuides and source code are available @GitHub

https://github.com/saramgsilva/XamarinWorkshopor

http://saramgsilva.github.io/XamarinWorkshop/

Xamarin WorkshopThank you!

top related