Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX...

30
Xamarin.Forms Mike James

Transcript of Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX...

Page 1: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Xamarin.FormsMike James

Page 2: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)
Page 3: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Who is this guy?

Page 4: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Cross platform developer

Page 5: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)
Page 6: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Architecting Mobile Apps

Page 7: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Build Apps Multiple Times

Page 8: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Lowest Common Denominator

Page 9: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Xamarin Standard App Architecture

▪ Business logic, data models and common code shared between all platforms.

▪ All platform-specific UI and API calls are in C# as well.

▪ Retain fine-grain control app user interface

▪ Recommended for sophisticated UX requirements (complicated gestures, animations, design)

Shared App Logic

iOS  UI Android  UI Windows  UI

Page 10: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Native Performance

.IPA .APK

Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device.

Xamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary for Apple’s App Store.

Page 11: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Windows APIs

Page 12: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

iOS APIs | 100% Coverage

Page 13: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Android APIs | 100% Coverage

Page 14: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)
Page 15: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Considerations

• Not for all types of apps • Is your app very customised? • Great for data driven apps • Utility apps • Also supports maps

Page 16: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Xamarin App Architectures

Shared App Logic

iOS C# UI Android C# UI Windows C# UI

Shared App Logic

Xamarin.Forms

Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Option for 100% code share Recommended for: forms-based, apps with a lot of data entry screens

Page 17: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Xamarin.FormsQuickly and easily build native user interfaces using shared code

Xamarin.Forms elements map to native controls and behaviours

Mix-and-match Xamarin.Forms with native APIs

Shared UI Code

Page 18: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

What’s Included

• 40+ Pages, Layouts, and Controls • Build from code behind or XAML

• Two-way Data Binding • Navigation • Animation API • Dependency Service • Messaging Center

Shared UI Code

Page 19: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Pages

Content MasterDetail Navigation Tabbed Carousel

Page 20: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Layouts

Stack Absolute Relative Grid ContentView ScrollView Frame

Page 21: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

ControlsActivityIndicator BoxView Button DatePicker Editor

Entry Image Label ListView Map

OpenGLView Picker ProgressBar SearchBar Slider

Stepper TableView TimePicker WebView EntryCell

ImageCell SwitchCell TextCell ViewCell

Page 22: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Demo

Page 23: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Pages

• Single screen of content

• ContentPage holds one visual element

ContentPage

Control

Content property

Page 24: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Layout

• Layouts handle child elements

• Layouts come in two types: managed and unmanaged

ContentPage

Layout

Content property

Control

Control

Control

Control

Children

Layout

Page 25: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Demo

Page 26: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Read the book

Charles  Petzold  Xamarin

Page 27: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Where to find some interesting samples

• https://github.com/MikeCodesDotNet/ • https://github.com/pierceboggan

Page 28: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Looking for a Forms weekend project?

beerdrink.in

Page 29: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Questions?

Page 30: Intro to Forms - GOTO Conference - GOTO Blog – GOTO ... · Option for OS – specific UI/UX elements Recommended for: Sophisticated UX (complicated gestures, animations, design)

Thanks !