+ All Categories
Home > Technology > Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

Date post: 24-Jan-2017
Category:
Upload: michael-ridland
View: 153 times
Download: 6 times
Share this document with a friend
51
www.xam-consulting.com www.michaelridland.com Welcome Xamarin Hack Day Sydney 2016
Transcript
Page 1: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Welcome Xamarin Hack Day

Sydney 2016

Page 2: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Agenda9:00 - Presentations & Challenges

Michael Ridland - Introduction to XamarinMatthew Robbins - Costs and Benefits Compiled XamlJernej Kavka - Code Sharing

10:30 - Challenges / Install-Fest / Mini-Hacks / Open Hacking1:00 - Lunch1:30 - Challenges / Install-Fest / Mini-Hacks / Open Hacking4:30 - Show and Tell - Show something you’ve built or learnt

Page 3: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

How you hack is up to you!

Presenters will set challengesYou can do any of the challengesor work on your own stuffmentors will be available to assist

Page 4: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Michael Ridland

www.michaelridland.com

Page 5: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Mobile Technology Specialists

Page 6: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Thanks to our sponsors

Page 7: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Thanks to our Mentors and Presenters

Page 8: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Introduction to Xamarin

Page 9: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

What is native?

Page 10: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

The Anatomy of a Native App

Native User Interfaces Native API Access Native Performance

Page 11: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin’s (Traditional) Approach

Native With Code Sharing

Page 12: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Language Support

Functional Imperative/OOP

F#

C#

Page 13: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Base Class Libraries

Page 14: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Windows APIs

Page 15: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

iOS APIs | 100% Coverage

Page 16: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Android APIs | 100% Coverage

Page 17: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Anything you can do in Objective-C or Java

can be done in C# or F# with Xamarin

Pro Tip

Page 18: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Native Performance

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

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

Page 19: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Demos - Xamarin Traditional

Demos

Page 20: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Always Up To Date

Same day support for iOS 5, iOS 6, iOS 6.1, iOS 7, iOS 7.1, iOS 8…

Page 21: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Future Proof

Always up-to-date with the latest APIs from Apple and Google.

Full Support for Android TV, Fire TV, Android Wear, Google Glass, etc

Page 22: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Rich Library EcoSystem

Json.NET Rx

…and many more!

Page 23: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Development Environments

Page 24: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Development Environment

Xamarin StudioPC or Mac

Visual Studio PluginVS 2010/2012/2013

Page 25: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Development Environment

or even?

Page 26: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Visual Studio Integration

Page 27: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Android Designer

Page 28: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

iOS Designer

Fully integrated into Xamarin Studio & Visual Studio

iOS 6 & 7 Storyboard support

Intuitive event handling

Support for auto-layout

Live preview of custom controls

Page 29: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Component Store

Page 30: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Component Vendors

Page 31: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms

Page 32: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms

Xamarin.FormsTraditional Xamarin approach

Shared UI Code

Page 33: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin
Page 34: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin
Page 35: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms: What’s Included?

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

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

Page 36: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms: Pages

Content MasterDetail Navigation Tabbed Carousel

Page 37: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms: Layouts

Stack Absolute Relative Grid ContentView ScrollView Frame

Page 38: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

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 39: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms Real World Tips

Page 40: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Beware……

Forms is easy… Easy is also deceptively simple…..

Page 41: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Beware……

I hate Xamarin.Forms

Page 42: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Beware……

Your still on a phone with limited resources… Forms Xaml is not like WPF, Xamarin don’t own the underlying

platforms With Forms you must build pages with Performance in mind…

Page 43: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Performance Tips

Reduce nesting StackLayouts encourage nesting Grid are great for reducing nesting

Avoid relative layout Reduce layout cycles Grids with Star and Static Height avoid layout cycles

Page 44: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms Power Controls

Page 45: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Grid

Not difficult to use (nearly as easy as StackLayout)

Works well with XAML (unlike relative)Can be used to create overlays/advanced UIsEasy to reduce nestingEasy to reduce layout cycles (Star and Static

Widths/Heights)

Page 46: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

ListView with Cell Recycling

Much faster now with Cell Recycling Use the DataTemplateSelector for different cell styles Alternative to Grid when there’s a dynamic numbers of rows Avoid add/remove views when binding context change

Page 47: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Images on Android (especially in list)

Performance and Memory Issues Use FFImageLoader Image Caching Image Resizing

If the Image is local, it can still have issues in lists. We sometimes do a full custom renderer native cell for Android only.

Page 48: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Xamarin.Forms Real Apps

Page 49: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

File -> New

Page 50: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Today’s Challenge

Build a view (maybe from http://snppts.io/latest or dribble) It can be simplified or adapted depending on your experience Improve the performance http://kent-boogaart.com/blog/jason-smith's-xamarin-forms-performance-tip

s

https://evolve.xamarin.com/session/56e205b0bad314273ca4d817

https://developer.xamarin.com/guides/xamarin-forms/deployment,_testing,_a

nd_metrics/performance/

Page 51: Xamarin Hack Day - Sydney 2016 - Introduction to Xamarin

www.xam-consulting.com www.michaelridland.com

Q & AMichael Ridland

[email protected]

@rid00z

www.michaelridland.com


Recommended