lessons learned: 4 months of xamarin.forms

23
Intro to Xamarin.Forms: Lessons learned Eric Polerecky - @detroitpro

Upload: eric-polerecky

Post on 02-Jul-2015

3.766 views

Category:

Software


1 download

DESCRIPTION

Presented at the 2014 DogFoodConf, this is my story on what it was like eating Xamarin.Forms for 4 months.

TRANSCRIPT

Page 1: Lessons Learned: 4 Months of Xamarin.Forms

Intro to Xamarin.Forms: Lessons learned

Eric Polerecky - @detroitpro

Page 2: Lessons Learned: 4 Months of Xamarin.Forms

Building Apps with Xamarin

Page 3: Lessons Learned: 4 Months of Xamarin.Forms

Building Apps with Xamarin.Forms

Page 4: Lessons Learned: 4 Months of Xamarin.Forms

Xamarin.Forms: What’s in the boxPages

Layouts

Controls

Code behind or XAML

Two-Way Data Binding

Navigation

Animation API

Dependency Service

Messaging Center

Page 5: Lessons Learned: 4 Months of Xamarin.Forms

Xamarin.Forms: What we usedPages

Layouts

Controls

Code behind or XAML

Two-Way Data Binding

Navigation

Animation API

Dependency Service

Messaging Center

Page 6: Lessons Learned: 4 Months of Xamarin.Forms

Xamarin.Forms: Controls!

ActivityIndicator

BoxView

Button

DatePicker

Editor

Entry

Image

Label

!

ListView

Map

OpenGLView

Picker

ProgressBar

SearchBar

Slider

Stepper

TableView

TimePicker

WebView

EntryCell

ImageCell

SwitchCell

TextCell

ViewCell

Page 7: Lessons Learned: 4 Months of Xamarin.Forms

Xamarin.Forms: Controls we used!

ActivityIndicator

BoxView

Button

DatePicker

Editor

Entry

Image

Label

!

ListView

Map

OpenGLView

Picker

ProgressBar

SearchBar

Slider

Stepper

TableView

TimePicker

WebView

EntryCell

ImageCell

SwitchCell

TextCell

ViewCell

Page 8: Lessons Learned: 4 Months of Xamarin.Forms

Control Explanation: Entry

Page 9: Lessons Learned: 4 Months of Xamarin.Forms

Xamarin.Forms: Layouts

Page 10: Lessons Learned: 4 Months of Xamarin.Forms

Xamarin.Forms: Layouts we used

Page 11: Lessons Learned: 4 Months of Xamarin.Forms

Demo Time!: TODO: Create App! and REPO!

Page 12: Lessons Learned: 4 Months of Xamarin.Forms

Our Application: Wantify Lessons Learned

Page 13: Lessons Learned: 4 Months of Xamarin.Forms

What was goodRelative Layouts

Stack Layouts

Custom Renderers

Commands/Events

Page 14: Lessons Learned: 4 Months of Xamarin.Forms

What was badList editing

Borders

Creating custom renderers for components

Custom Renderer learning curve

List view API learning curve

no strong typed context for lists

Page 15: Lessons Learned: 4 Months of Xamarin.Forms

List Editing Pains

Page 16: Lessons Learned: 4 Months of Xamarin.Forms

Custom Renderers We BuiltiOS Segmented Control

Truncated Label Render

Rounded Button

Table Separator Style

Facebook Login for Component

Borderless Entry

Strikethrough

17 Total. !

Most controls are very simple and extend basic Xamarin forms functionality.

Page 17: Lessons Learned: 4 Months of Xamarin.Forms

Infrastructure we built

Local Cache - (in memory)

HTTP message handling

Navigation Abstraction - goto:

Image Cache

The Formatter!

Page 18: Lessons Learned: 4 Months of Xamarin.Forms

Xamarin Components

Raygun4net Azure Messaging Xamarin.Auth

Page 19: Lessons Learned: 4 Months of Xamarin.Forms

Tip and TricksAsync/Await all the things

Async in OnAppearing

Can’t put async in ctor. Get view model/data in OnAppearing and hydrate form controls on page.

Strong type:

Colors

Images

Fonts

Routes

Shared PCL

Share mobile PCL with server, holds view models and services to call back to server.

Page 20: Lessons Learned: 4 Months of Xamarin.Forms

Non-Forms Awesome Stuff

Nuget!

Components

Xamarin Studio

Mono Updates

Forums - http://forums.xamarin.com/

Page 21: Lessons Learned: 4 Months of Xamarin.Forms

What we want to do more of:MVVM

XAML

Azure Mobile Services (OAuth, Identity)

Auth0

Page 22: Lessons Learned: 4 Months of Xamarin.Forms

Questions…and maybe answers.

Page 23: Lessons Learned: 4 Months of Xamarin.Forms

The End