SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Designing Mobile Applications
with Xamarin
A best practices guide for optimum mobile cross
platform development.
Who?
Jerel R Hass
@agies1
jhass@quicksolutions.com
What is Xamarin?
Xamarin the product is about writing code in a single language (C#) to support the
major development platforms, such as; iOS, Android and WP8.
Xamarin the Company can be read about at the end of this http://xamarin.com/faq
A Tour Around Xamarin
Downloading Xamarin - http://xamarin.com/
Looking for Hype - http://xamarin.com/tour
Need more help - http://developer.xamarin.com/
Why Xamarin?
C# + .Net Now backed by Open .Net
Modern Language
Modern IDE
Native API Access
Native Look and Feel
You can still use Html!
Nuget
Components
90% Code Reuse
How Xamarin Works
How XamarinWorks?Put C# in one side and Applications pop out the other side, and get
paid for it. Done!
How Xamarin Really Works
iOS, Xamarin’s Ahead-of-Time ( AOT) Compiler compiles Xamarin.iOS applications
directly to native ARM assembly code.
Android, Xamarin’s compiler compiles down to Intermediate Language ( IL), which is
then Just-in-Time ( JIT) compiled to native assembly when the application launches.
By Exposing a .Net like Native Layer
Installing Xamarin
Endpoint Whitelist - http://developer.xamarin.com/guides/cross-
platform/getting_started/installation/firewall/
Installing On PC
Installing On Mac
Requirements
iOS Development: Mac + iOS Device
Android Development: (PC or Mac) + Android Device
WP8 Development: PC + WP8 Device
Xamarin Studio PC
MAC
Visual Studio: Extension
Ensure Everything is
Ready
Proper preparation
Pre-Dev Check List
1. Xamarin Account is Ready
2. Solutions are Deploy Ready
3. Emulators/Devices are Awake
1. If Using Devices are they provisioned?
Building a Cross
Platform Application
Mobile Project Log
Example Stories
Mobile Project Log
As a User I should be able to run my application on the three major platforms
As a User we should be able to view a List of our Projects
As a User we should be able to view our Team
As a User we should be able to use the Camera to Upload “Status Reports”
As a User we should be able to use the Microphone to Record “Note”
As a User we should be able to store data locally to synchronize later
Laying out the Solution
Typical Architecture
XXXX.Core (Portable Class Library)
XXXX.Touch (MonoTouch iOS App)
XXXX.Droid (MonoDroid Android App)
XXXX.WP8 (Windows Phone 8 app)
Adding the
Portable Class
Library
Adding a Test Library
Adding the iOS
Application
Adding the
Android
Application
Adding the WP8
Application
Structure
Completed
We are ready to start writing some
code.
Building the Business
Here comes the fun
One of Many Architectures
Simple Architecture
Future:
IoC
Binding
Why Portable Class
Here is an example implementation of a Service with the Portable Class model.
IFoo
AndroidFoo
AppleFoo
WPFoo
Why Portable
Class Cont…
Shared Class
Example
Plug the Service in
using ProjectLog.Core.Services;
namespace ProjectLog.Core.ViewModels
{
public class ShellViewModel
{
private readonly IMessageBoxService _messageBoxService;
public ShellViewModel(IMessageBoxService messageBoxService)
{
_messageBoxService = messageBoxService;
}
}
}
Building Native Views
Time to Get Designee
Creating an iOS View in XCode
The Plan
Switch to the Mac
Open Xamarin Studio
Create a Generic iOS View
Build the View In Xcode
Creating an iOS View in VS
The Plan
Stay on PC
Create Storyboard View
Edit in Visual Studio
Creating an Android View
The Plan
Create an Activity
Create a Layout File
Build
Bind the two together
Creating a WP8 View
The Plan
Create a new WP8 view
Whistle a tune, to fill time
Driving the Views with our ViewModel
iOS
Controller Actions are passed through the VMs Commands
Controller View Changes Update the VMs properties
Android
Controller Actions are passed through the VMs Commands
Controller View Changes Update the VMs properties
WP8
Databind the VM to the View
Xamarin.Forms
Xamarin.Forms is a cross-platform natively backed UI toolkit abstraction that allows
developers to easily create user interfaces that can be shared across Android, iOS,
and Windows Phone. The user interfaces are rendered using the native controls of
the target platform, allowing Xamarin.Forms applications to retain the appropriate
look and feel for each platform.
Xamarin.Forms Advantages
Write One UI
Supported by Native Controls
Databinding Supported out of the box
Third Party Support
Xamarin.Forms Disadvantages
Can be slow with complex UIs
Is not supported within the Free License
Limited Design Options
Creating a Xamarin.Forms App
Create a
Xamarin.Form View
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ProjectLogForms.ShellView">
<Label Text="{Binding MainText}" VerticalOptions="Center" HorizontalOptions="Center" />
</ContentPage>
Adding Components
Adding Components Cont…
Why?
Wrap Native Code, make a more neutral API
Offer Productivity Add-in
Normal Third Party Reasons
Native APIs
Keep Platform specifics on that Platform
Avoid Compiler Directives
Wrap Native calls for better testing
Neutralizing Platform
Differences with
MVVMCross
Now for the Good Stuff

Weitere ähnliche Inhalte

Was ist angesagt?

Getting started with flash mobile development
Getting started with flash mobile developmentGetting started with flash mobile development
Getting started with flash mobile development
Mihai Corlan
 

Was ist angesagt? (20)

Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4
 
Getting Started with iOS & Android Development Using Xamarin & Visual Studio
Getting Started with iOS & Android Development Using Xamarin & Visual StudioGetting Started with iOS & Android Development Using Xamarin & Visual Studio
Getting Started with iOS & Android Development Using Xamarin & Visual Studio
 
Xamarin Platform
Xamarin PlatformXamarin Platform
Xamarin Platform
 
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and BeyondState of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
 
Cross platform apps using Xamarin
Cross platform apps using XamarinCross platform apps using Xamarin
Cross platform apps using Xamarin
 
Xamarin Forms, MVVM and Testing
Xamarin Forms, MVVM and TestingXamarin Forms, MVVM and Testing
Xamarin Forms, MVVM and Testing
 
Mobile Development With Flash Platform
Mobile Development With Flash PlatformMobile Development With Flash Platform
Mobile Development With Flash Platform
 
An introduction to Xamarin
An introduction to XamarinAn introduction to Xamarin
An introduction to Xamarin
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Flash Builder for PHP and Mobile development
Flash Builder for PHP and Mobile developmentFlash Builder for PHP and Mobile development
Flash Builder for PHP and Mobile development
 
C# everywhere: Xamarin and cross platform development
C# everywhere: Xamarin and cross platform developmentC# everywhere: Xamarin and cross platform development
C# everywhere: Xamarin and cross platform development
 
Getting started with flash mobile development
Getting started with flash mobile developmentGetting started with flash mobile development
Getting started with flash mobile development
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Cross Platform Development with Xamarin
Cross Platform Development with XamarinCross Platform Development with Xamarin
Cross Platform Development with Xamarin
 
Xamarin cross platform
Xamarin cross platformXamarin cross platform
Xamarin cross platform
 
Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to Xamarin
 
Future of Mobile Development -Xamarin
Future of Mobile Development -XamarinFuture of Mobile Development -Xamarin
Future of Mobile Development -Xamarin
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
 
Cross platform development with c# and xamarin
Cross platform development with c# and xamarinCross platform development with c# and xamarin
Cross platform development with c# and xamarin
 
Highlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conferenceHighlights from the Xamarin Evolve 2016 conference
Highlights from the Xamarin Evolve 2016 conference
 

Andere mochten auch

Website pp
Website ppWebsite pp
Website pp
ipockat
 
Presentacion ingles 1
Presentacion ingles 1Presentacion ingles 1
Presentacion ingles 1
jfkcollege
 
คีย์บอร์ด..
คีย์บอร์ด..คีย์บอร์ด..
คีย์บอร์ด..
Paristha Oum
 
Catalogo Dekocasa Yois
Catalogo Dekocasa YoisCatalogo Dekocasa Yois
Catalogo Dekocasa Yois
aldozam
 
Maria montessori ppt
Maria montessori pptMaria montessori ppt
Maria montessori ppt
nunziafesta
 

Andere mochten auch (19)

Website pp
Website ppWebsite pp
Website pp
 
Steam punk runner
Steam punk runnerSteam punk runner
Steam punk runner
 
Unity 2d sharp
Unity 2d sharpUnity 2d sharp
Unity 2d sharp
 
Mobile CI
Mobile CIMobile CI
Mobile CI
 
Cross platform game development
Cross platform game developmentCross platform game development
Cross platform game development
 
As
AsAs
As
 
Presentacion ingles 1
Presentacion ingles 1Presentacion ingles 1
Presentacion ingles 1
 
реляционная модель данных
реляционная модель данныхреляционная модель данных
реляционная модель данных
 
Open Innovation - The future of crowdfunding, Conference, Berlin 2013-04-17
Open Innovation - The future of crowdfunding, Conference, Berlin 2013-04-17Open Innovation - The future of crowdfunding, Conference, Berlin 2013-04-17
Open Innovation - The future of crowdfunding, Conference, Berlin 2013-04-17
 
Comatelier : les relations presse et les réseaux sociaux
Comatelier : les relations presse et les réseaux sociauxComatelier : les relations presse et les réseaux sociaux
Comatelier : les relations presse et les réseaux sociaux
 
Schum beta willfort-20120616
Schum beta willfort-20120616Schum beta willfort-20120616
Schum beta willfort-20120616
 
Présentation3
Présentation3Présentation3
Présentation3
 
3 g technology
3 g technology3 g technology
3 g technology
 
Napoleone lim
Napoleone limNapoleone lim
Napoleone lim
 
Technology 3 g
Technology 3 gTechnology 3 g
Technology 3 g
 
Napoleone lim
Napoleone limNapoleone lim
Napoleone lim
 
คีย์บอร์ด..
คีย์บอร์ด..คีย์บอร์ด..
คีย์บอร์ด..
 
Catalogo Dekocasa Yois
Catalogo Dekocasa YoisCatalogo Dekocasa Yois
Catalogo Dekocasa Yois
 
Maria montessori ppt
Maria montessori pptMaria montessori ppt
Maria montessori ppt
 

Ähnlich wie Designing mobile applications with xamarin

Ähnlich wie Designing mobile applications with xamarin (20)

Why is xamarin the most popular framework for business app development
Why is xamarin the most popular framework for business app developmentWhy is xamarin the most popular framework for business app development
Why is xamarin the most popular framework for business app development
 
Xamarin the good, the bad and the ugly
Xamarin  the good, the bad and the uglyXamarin  the good, the bad and the ugly
Xamarin the good, the bad and the ugly
 
Why Xamarin is the Best to Build Cost-Effective Mobile Apps
Why Xamarin is the Best to Build Cost-Effective Mobile AppsWhy Xamarin is the Best to Build Cost-Effective Mobile Apps
Why Xamarin is the Best to Build Cost-Effective Mobile Apps
 
Xamarin Mobile App Development Features & Benefits.pdf
Xamarin Mobile App Development Features & Benefits.pdfXamarin Mobile App Development Features & Benefits.pdf
Xamarin Mobile App Development Features & Benefits.pdf
 
Dot net universal apps
Dot net universal appsDot net universal apps
Dot net universal apps
 
How To Hire A Team To Develop WebRTC Based Applications_.pdf
How To Hire A Team To Develop WebRTC Based Applications_.pdfHow To Hire A Team To Develop WebRTC Based Applications_.pdf
How To Hire A Team To Develop WebRTC Based Applications_.pdf
 
Why is xamarin the preferred app development platform among app developers
Why is xamarin the preferred app development platform among app developersWhy is xamarin the preferred app development platform among app developers
Why is xamarin the preferred app development platform among app developers
 
Dia 1 intro to mobile and xamarin
Dia 1   intro to mobile and xamarinDia 1   intro to mobile and xamarin
Dia 1 intro to mobile and xamarin
 
Xamarin Development
Xamarin DevelopmentXamarin Development
Xamarin Development
 
Top 8 Alternatives Of Xamarin.pdf
Top 8 Alternatives Of Xamarin.pdfTop 8 Alternatives Of Xamarin.pdf
Top 8 Alternatives Of Xamarin.pdf
 
The Ultimate Guide to Cross Platform App Development Frameworks in 2023
The Ultimate Guide to Cross Platform App Development Frameworks in 2023The Ultimate Guide to Cross Platform App Development Frameworks in 2023
The Ultimate Guide to Cross Platform App Development Frameworks in 2023
 
Best mobile app development framework
Best mobile app development frameworkBest mobile app development framework
Best mobile app development framework
 
Xamarin Open House talk - Sela Group - Ofir Makmal
Xamarin Open House talk - Sela Group - Ofir MakmalXamarin Open House talk - Sela Group - Ofir Makmal
Xamarin Open House talk - Sela Group - Ofir Makmal
 
Xamarin.docx
Xamarin.docxXamarin.docx
Xamarin.docx
 
Reasons to Choose Xamarin for Cross Platform Development
Reasons to Choose Xamarin for Cross Platform DevelopmentReasons to Choose Xamarin for Cross Platform Development
Reasons to Choose Xamarin for Cross Platform Development
 
Most Useful features of Xamarin as a Cross-platform framework.pdf
Most Useful features of Xamarin as a Cross-platform framework.pdfMost Useful features of Xamarin as a Cross-platform framework.pdf
Most Useful features of Xamarin as a Cross-platform framework.pdf
 
Intro to Building Mobile Apps with Xamarin
Intro to Building Mobile Apps with XamarinIntro to Building Mobile Apps with Xamarin
Intro to Building Mobile Apps with Xamarin
 
Xamarin 4 - the future of apps
Xamarin 4  - the future of appsXamarin 4  - the future of apps
Xamarin 4 - the future of apps
 
Xamarin vs. React Native Choosing the Right Software in 2023.pdf
Xamarin vs. React Native Choosing the Right Software in 2023.pdfXamarin vs. React Native Choosing the Right Software in 2023.pdf
Xamarin vs. React Native Choosing the Right Software in 2023.pdf
 
Hybrid Mobile App
Hybrid Mobile AppHybrid Mobile App
Hybrid Mobile App
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Designing mobile applications with xamarin

Hinweis der Redaktion

  1. Installing on a PC, you will need to configure a Mac Build Host, if doing iOS Development.