By
Mukteswar Patnaik
Lets have a Fresh thinking about…
Mobile App Development
Why to switch from traditional/web development to App Ecosystem?
Available Approaches & challenges.
Leading towards Xamarin.
What we will talk about…
• How we reached to Mobile Era & Why to Go Mobile?
• The challenges of Going Mobile.
• Development Approaches
• Silo, Web/Hybrid, Crossplatform
• Exiting solutions for Crossplatform development
• Leading towards Xamarin
13-May-17 2
How we Landed to Current Era?
13-May-17 3
Why to Go Mobile?
• Your customers expect it
• (Service exactly when the customer need)
• Your competitors already did
• (Assumption to beat the competitors)
• You’ll enhance communication in the field
• (All in the same page)
• You’ll collect better analytics
• (All live statistics without huge expenses)
• Your sales team will be more responsive
• (Opportunity strikes likes lightening & lightening never strikes twice at same place)
• You can’t afford not to
• (“going mobile” is a profound benefit in the long-term.)
13-May-17 4
The challenges of Going Mobile
• Vendor / Platform Fragmentation
• Google (Android), Apple (iOS), Microsoft (WinPhone) and BlackBerry
• Which vendor/platform to target?
• If Multiple platform, How to get the time & funds?
• Device Fragmentation
• 10+ variants of iPhone with different OS versions & hardware
• 10+ vendors manufacturing WinPhone with various hardware
• N-Number of Vendors, Unlimited types of devices with wide range of OS
version
• Development Approach
• Native, Web(HTML5/CSS/JavaScript), Hybrid, Crossplatform
13-May-17 5
Development Approaches
Silo vs Web vs Hybrid
Cross-Platform
Native to All Platform
[SIMULTANEOUSLY]
vs
13-May-17 6
Development Approaches: Silo
• Purely Native, leading to Max Performance
• Same functionality developed multiple times
• Preferably one team for each platform
• Feature & performance may differ platform
to platform
• Tough to Sync Development life cycle in
between all platforms & teams
• Difficult to extend & provide
support/maintenance
• High development cost
• Less knowledge sharing & least Code sharing
13-May-17 7
Development Approaches: Web
• Features / Pros
• Developed using mostly HTML5, CSS3, JavaScript, JQuery
• Runs in browser, Hence highly portable
• Apps are executed on the Web servers and accessible via Mobile Web browsers
• Better manageability due to web server based deployments
• Higher ease of code maintainability and reuse
• Decrease in total cost of ownership
• Limitations / Cons
• Lack of Native UI feel & fails to access Platform features
• Lower performance due to browser based dependencies
• Highly dependent on native browser implementation for access to device
capabilities
• Unpredictable performance due to higher dependency on Internet connection
13-May-17 8
Development Approaches: Hybrid
• Combination of both web based and native app development.
• Applications are built using web technologies like HTML5, CSS3 and Java Scripts
and involve the native APIs for access to device specific capabilities.
• These apps are resident on the devices as they are packaged within the browser
control of the platform and compiled using the native SDK
• Features / Pros
• Access to limited native device capabilities
• Very good portability across platforms
• Good ease of deployment like Native apps
• Decrease in total cost of ownership
• Limitations / Cons
• UI better than mobile web apps, but not on par with native
• Possible lower performance due to browser based dependencies and the extent of the web
dependency
• Dependency on the hybrid platform provider capability for native API extensions
“Facebook’s biggest mistake was
betting too much on HTML5
as opposed to native app development.”
~Mark Zuckerberg [Facebook CEO]
13-May-17 9
Development Approaches: Crossplatform
• Transform the source code compiled into the native device specific platforms,
deployed directly on devices
• Provide specific APIs that leverage deep native integration capabilities and the
apps developed through this method have a rich user experience that closely
mirrors the native UX [User eXperience]
• Features / Pros
• Richer UX like native apps
• Leverage platform specific capabilities
• Can be ported to multiple platforms though development in a single language
• Deployment on the popular app stores ecosystems is high
• Limitations / Cons [Exception: Xamarin]
• The ability to develop the app is governed by the limitations of the platform APIs
• Certain native capability usage inhibits seamless portability of the app
• Not available for all platforms and are limited to certain/few [Xamarin: iOS, Android,
WinPhone, UWP, Silverlight]
13-May-17 10
Thinking Crossplatform:
Xamarin, The most matured one till date…
• Almost 100% Code/UI sharing
• 100% API access to all
platform
• Open source & now Microsoft
owned
• Comes with Visual Studio and
a complete solution
• Assured Day-1 support for
upcoming devices & platform
releases
13-May-17 11
• Xamarin vs Hybrid-HTML
• As tested & said by Kevin Ford,
Mobile Practice Lead, Magenic
• 62% Faster in Loading large
datasets
• 50% less memory used
• 76% less CPU cycles
• 22X Faster CPU intensive
Few Questions before you switch to App…
• Are we building applications that are graphics intensive? [Native]
• Are we building applications that need a lot of algorithmic computation? [Code Sharing]
• Does the application need integration to device specifics? [Native]
• Is app security a high priority? [Security features]
• Do we need to deploy the app on multiple platforms? [Crossplatform & its support]
• What changes do we anticipate in the app and can this be addressed on a chosen
development model?
• Is there an immediate need to deliver the app to the market? [Time Factor for release]
• Are the chosen tools mature enough to provide sufficient support for development?
• Does the app need to sync with back end systems and data sources? [Compatibility]
• How frequently do we need to upgrade the app and does the app storefront deployment
plan support this requirement? [Playstore/AppStore plans]
13-May-17 12
Xamarin, a complete solution
Xamarin Native/Traditional Approach
Xamarin.Forms Approach
Code Sharing Strategies
By
Mukteswar Patnaik
Xamarin Agenda
• Going Cross platform, I Prefer Xamarin
• How Xamarin is a complete Solution for Mobile platform?
• Xamarin Studio & VS2015 with Xamarin
• Getting it, Prerequisite, Installation
• Configuring & Checking the readiness of IDE
• Xamarin.Native / Traditional
• Xamarin.Forms
• Code Sharing Strategies
• PCL & SAP in detail with Pros & Cons
• [Libraries] [NuGet, Xamarin Components]
13-May-17 14
Over 15,000 companies rely on Xamarin
13-May-17 15
Xamarin – A Complete Mobile Solution
• Open Source & Acquired by
Microsoft
• Native as well as Cross platform
Mobile Application Development
• 100% API support for all
platform[iOS, Android, WinPhone]
• Support from Day-1 for iOS, Android
& WinPhone
• Available with All edition of Visual
Studio 2015 onwards
• Test Cloud & Hockey… for testing &
Monitoring Mob Apps
Not just a platform, rather a Complete Mobile Development Solution
13-May-17 16
Xamarin – A Complete Mobile Solution
• Enroll/Login to https://university.xamarin.com/
• Free trial, learn A-Z of Xamarin
• Live, online classes
• Self-guided learning
• Guest lectures
• Affordable tuition
Learn from Xamarin University
Earn the Xamarin Certified
Mobile Developer designation13-May-17 17
Xamarin – A Complete Mobile Solution
• Xamarin apps look and feel
native because they are
• Native UI, API Access,
Performance
• More Types, Less Typing
• Stronger Types, Smarter Tools
• Language-level Async
• First-class Functions
• Share code/UI everywhere
[SAP/PCL/Forms]
Deliver Native Android, iOS, Windows using existing skills and code.
13-May-17 18
Xamarin – A Complete Mobile Solution
• Xamarin enables you to develop a single solution and deploy it to Android,
iOS, and Windows devices.
• After you define three [Each for every platform with all configurations / customization]
CI builds, you can build the app whenever your team checks in code.
• Upload your Xamarin solution to VSTS or your TFS. Either push your code to
Git or check in your code to TFVC[Team Foundation Version Control].
TFS / VSTS – CI Build
13-May-17 19
Xamarin – A Complete Mobile Solution
• Automate your app testing on 2,000 real devices in the cloud.
• Use any device feature[GPS, Camera, sensors]
• TestRecorder : test everything your users can do, from pinching and swiping
to double-tapping and scrolling. Trigger Test from CI Builds too.
• Analyze detailed reports with results, screenshots, and performance metrics.
• Learn more on https://www.xamarin.com/test-cloud
Xamarin Test Cloud [XTC] - Mobile app testing made easy.
13-May-17 20
Xamarin – A Complete Mobile Solution
• Bring Mobile DevOps to your apps with beta distribution
• crash reporting, user metrics, feedback, and powerful workflow integrations
• VS Mobile Center (In Preview state) combines the features of HockeyApp with
cloud-based development, testing, and analytics
Xamarin.Insights + HockeyApp
13-May-17 21
Xamarin – A Complete Mobile Solution
• Learn >> Develop >> Build Automation >> Auto Testing >> Mobile DevOps
Xamarin - A COMPLETE MOBILE SOLUTION
13-May-17 22
About XS & VS2015 with Xamarin
VS2015(U3)
• If you have VS, stick to it as this
gives much more i.e. WinForms
/ WPF, ASP.NET, Cordova, and so
on…
• On windows you can develop
UWP, Android and iOS(With Mac
Agent)
• VS Preview on Mac, Expecting
production release soon.
Xamarin Studio
• XS, cross platform for iOS,
Android and UWP
• XS for Windows further
production stopped.
• On Windows only Android &
WinPhone apps supported
• On Mac, Android & iOS can be
targeted
13-May-17 23
Prerequisite for VS with Xamarin
• A Xamarin Sign-in ID at https://www.xamarin.com/ [Free]
• A Physical Computer [Not VM] either with
• Windows
• Preferably Windows 8 or Later with Hyper-V enabled
• A Mac on Network to be used as an Mac agent for building iOS apps
• Mac : With OS X Yosemite running OS X 10.10.5 or later with Apple-ID
• Preferably Visual Studio 2015 (Update 3) or Later
[Community/Professional/Enterprise]
• Make sure to Check for the internet connection with needed whitelists
13-May-17 24
Installation
• Download the Visual Studio installer from
http://VisualStudio.com & launch installer.
• If VisualStudio already installed, Modify the
installer from Program & Features >
VisualStudio> Change
• Select Custom installation & Choose ‘C#/.NET
(Xamarin)’
• Also select the templates you need to install i.e.
UWP etc
• Select the Emulators needed
13-May-17 25
Configuring the IDE
• Open Visual Studio & Go to Tools>Xamarin Account
• Add Xamarin account details
• Go to Tools > Options > Xamarin or Tools > Options > Xamarin > Other,
where you’ll find a Check Now link. You may update the Xamarin if needed.
• Go to Tools > Android > Android SDK Manager and install the newest
version of the Android SDK Tools, Android SDK Platform-tools, and Android
SDK Build-tools components.
• Select suitable Emulators for Android, iOS, WP & UWP.
• Preferably continue with Hyper-V. Avoid running multiple Emulators & VMs
simultaneously
13-May-17 26
Checking the readiness of IDE
• Create a Xamarin Native PCL Project [Default Hello Xamarin App]
• Build & Run
• Create a Xamarin.Form PCL Project [Default Hello Xamarin App]
• Build & Run
13-May-17 27
Starting with App Development
with Visual Studio 2015(U3)
Enterprise with Xamarin
CreatingNewProject
13-May-17 28
CreatingNewProject
13-May-17 29
Basic Idea About Xamarin Approaches
Blank/XAML
Code sharing strategies
Approaches for App development
Complete Crossplatform Mobile
App Development Solution Xamarin
Xamarin Native/Traditional
PCL
Blank
App
SAP
Blank
App
Xamarin.Forms
PCL
Blank
App
With
XAML
SAP
Blank
App
With
XAML
13-May-17 30
Which Approach to Choose?
Xamarin.Forms Xamarin Traditional/Native
Apps with common interactions
across device platforms
Apps with interaction that
require native behavior
Apps where code sharing is more
important than custom UI
Apps that use
many platform-specific APIs
Apps that require
little platform-specific functionality
Apps where custom UI is more
important than code sharing
Learn more:
xamarin.com/forms
Learn more:
xamarin.com/platform
13-May-17 31
Xamarin – Crossplatform & Code Sharing
• Xamarin apps look and feel native because they are
• Native UI, API Access, Performance
• Crossplatform, here “Native” means Native to every platform
• Both Code as well as UI can be shared [Native vs Forms]
• Code sharing
• Shared Assets Project
• Portable Class Library
13-May-17 32
Shared Projects / Shared Assets Projects(SAP)
• Features/Pros
• Allows to share at source code level
• Single copy of source/assets complied for individual platform
• Maximum API support
• Platform specific logic can be added directly(Conditional compiling)
• Cons
• Leads to spaghetti code
• Harder to unit test
• Must be shipped in source form
13-May-17 33
SAP Architecture
13-May-17 34
13-May-17 35
public static string DatabaseFilePath
{
get
{
var sqliteFilename = "TaskDatabase.db3";
#if NETFX_CORE
var path =
Path.Combine(Windows.Storage.ApplicationData.Curr
ent.LocalFolder.Path, sqliteFilename);
#else
#if SILVERLIGHT
// Windows Phone
var path = sqliteFilename;
#else
#if __ANDROID__
string libraryPath =
Environment.GetFolderPath(Environment.SpecialFold
er.Personal); ;
#else
// we need to put in /Library/ on iOS5.1 to meet
Apple's iCloud terms
// (they don't want non-user-generated data in
Documents)
string documentsPath = Environment.GetFolderPath
(Environment.SpecialFolder.Personal);
// Documents folder
string libraryPath = Path.Combine (documentsPath,
"..", "Library"); // Library folder
#endif
var path = Path.Combine (libraryPath, sqliteFilename);
#endif
#endif
return path;
}
}
SAP Continued… [Solution Explorer]
13-May-17
Right Click on Each platform project,
Add Reference to the
Shared project.
[Done by Default]
36
Portable Class Library - PCL
• Features/Pros
• Shared as binary ( .dll)
• Based on the selection of platforms, APIs will be available (The more platform
you choose, the better the support)
• Enforces architectural design
• Can be Unit tested separately as binary
• Can be shared on NuGet as binary
• Cons
• Limited API support (Dependency Injection/Service Overcomes most…)
• Requires more work to integrate platform specific code
13-May-17 37
PCL Architecture
13-May-17 38
PCL Continued… [Solution Explorer]
13-May-17 39
Handling the Platform Specifics in PCL
Dependency Injection / Services
13-May-17 40
Thank you all
13-May-17 41

More Related Content

PDF
Building Cross Platform Mobile Applications
PPTX
Cross Platform Mobile Application Architecture
PPSX
Multiplatform App Architecture
PPTX
Rapid Prototyping and Usability Testing - HUXPA
PPTX
Mobile architecture options
PPT
Mobile Cross Platform
PPTX
Top 4 Cross Platform tools for Mobile App Development
PPTX
Xamarin COE by Mukteswar Patnaik
Building Cross Platform Mobile Applications
Cross Platform Mobile Application Architecture
Multiplatform App Architecture
Rapid Prototyping and Usability Testing - HUXPA
Mobile architecture options
Mobile Cross Platform
Top 4 Cross Platform tools for Mobile App Development
Xamarin COE by Mukteswar Patnaik

What's hot (20)

PDF
Comparing multi-platform mobile apps frameworks
PPSX
Cross platform mobile application architecture for enterprise
PDF
Building Cross-Platform Mobile Apps with PhoneGap and Sencha Touch
PDF
Lublin Startup Festival - Mobile Architecture Design Patterns
PPTX
Cross platform mobile application devlopment
PDF
Cross platform app development a complete guide
PPTX
Mobile application architecture
PPT
Uncovering Windows - Silverlight Seminar
PPTX
Promoting your business on mobile devises
PDF
Progressive Web Apps are here!
PDF
BBM Social Platform and App Monetization
PPTX
IBM MobileFirst - Agile Application Infrastructure New Paradigm for new Workl...
PPT
DevBeat 2013 IBM Master Class presentation
PPTX
Mobile Application Development: Hybrid, Native and Mobile Web Apps
PPTX
Introduction to Hybrid Application Development
PPTX
Evolve 19 | Benjie Wheeler | Intro to Adobe Experience Manager 6.5
PDF
Mobile application development strategy and execution
PDF
Connect 2016 - IBM Mobile Connect - Real World Usage Scenarios
PPTX
Evolve 19 | Amol Anand & Daniel Gordon | Author in AEM Once - Deliver Everywhere
PPTX
Mobile applications chapter 4
Comparing multi-platform mobile apps frameworks
Cross platform mobile application architecture for enterprise
Building Cross-Platform Mobile Apps with PhoneGap and Sencha Touch
Lublin Startup Festival - Mobile Architecture Design Patterns
Cross platform mobile application devlopment
Cross platform app development a complete guide
Mobile application architecture
Uncovering Windows - Silverlight Seminar
Promoting your business on mobile devises
Progressive Web Apps are here!
BBM Social Platform and App Monetization
IBM MobileFirst - Agile Application Infrastructure New Paradigm for new Workl...
DevBeat 2013 IBM Master Class presentation
Mobile Application Development: Hybrid, Native and Mobile Web Apps
Introduction to Hybrid Application Development
Evolve 19 | Benjie Wheeler | Intro to Adobe Experience Manager 6.5
Mobile application development strategy and execution
Connect 2016 - IBM Mobile Connect - Real World Usage Scenarios
Evolve 19 | Amol Anand & Daniel Gordon | Author in AEM Once - Deliver Everywhere
Mobile applications chapter 4
Ad

Similar to Mobile App Development and Xamarin as a Complete Mobile Solution (20)

PPTX
Mobile next 2013 petru jucovschi
PDF
Cross platform mobile approaches
PDF
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
PPTX
Xamarin Platform
PPTX
Introduction to xamarin
PDF
Using Xamarin for your Mobile +Apps - Xamarin Experience 2017
PPTX
Mobile App Landscape for the Non-Technical
PDF
How Xamarin Is Revolutionizing Mobile Development
PDF
FirstMeetupSlides
PDF
Eindhoven Mobile Development First Meetup Slides
PDF
[XamarinDay] Xamarin History - From 0 to microsoft acquisition !
PDF
IRJET- Cross Platform User Compatible System with Specific Application
PDF
Cross Platform Mobile Development
PPT
Developing Cross-platform Native Apps with Xamarin
PDF
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
PDF
The Great Mobile Debate: Native vs. Hybrid App Development
PPTX
Trending mobile application Development
PPTX
Mobility today & what's next. Application ecosystems.
PPTX
Presentation
PPTX
Android | Xamarin | Mobile Application development
Mobile next 2013 petru jucovschi
Cross platform mobile approaches
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
Xamarin Platform
Introduction to xamarin
Using Xamarin for your Mobile +Apps - Xamarin Experience 2017
Mobile App Landscape for the Non-Technical
How Xamarin Is Revolutionizing Mobile Development
FirstMeetupSlides
Eindhoven Mobile Development First Meetup Slides
[XamarinDay] Xamarin History - From 0 to microsoft acquisition !
IRJET- Cross Platform User Compatible System with Specific Application
Cross Platform Mobile Development
Developing Cross-platform Native Apps with Xamarin
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
The Great Mobile Debate: Native vs. Hybrid App Development
Trending mobile application Development
Mobility today & what's next. Application ecosystems.
Presentation
Android | Xamarin | Mobile Application development
Ad

Recently uploaded (20)

PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Modernising the Digital Integration Hub
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
The various Industrial Revolutions .pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PPT
What is a Computer? Input Devices /output devices
PDF
August Patch Tuesday
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Architecture types and enterprise applications.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Chapter 5: Probability Theory and Statistics
DOCX
search engine optimization ppt fir known well about this
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Modernising the Digital Integration Hub
sustainability-14-14877-v2.pddhzftheheeeee
The various Industrial Revolutions .pptx
DP Operators-handbook-extract for the Mautical Institute
What is a Computer? Input Devices /output devices
August Patch Tuesday
observCloud-Native Containerability and monitoring.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
O2C Customer Invoices to Receipt V15A.pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Web Crawler for Trend Tracking Gen Z Insights.pptx
Architecture types and enterprise applications.pdf
Hindi spoken digit analysis for native and non-native speakers
A contest of sentiment analysis: k-nearest neighbor versus neural network
Chapter 5: Probability Theory and Statistics
search engine optimization ppt fir known well about this
Group 1 Presentation -Planning and Decision Making .pptx
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Univ-Connecticut-ChatGPT-Presentaion.pdf

Mobile App Development and Xamarin as a Complete Mobile Solution

  • 1. By Mukteswar Patnaik Lets have a Fresh thinking about… Mobile App Development Why to switch from traditional/web development to App Ecosystem? Available Approaches & challenges. Leading towards Xamarin.
  • 2. What we will talk about… • How we reached to Mobile Era & Why to Go Mobile? • The challenges of Going Mobile. • Development Approaches • Silo, Web/Hybrid, Crossplatform • Exiting solutions for Crossplatform development • Leading towards Xamarin 13-May-17 2
  • 3. How we Landed to Current Era? 13-May-17 3
  • 4. Why to Go Mobile? • Your customers expect it • (Service exactly when the customer need) • Your competitors already did • (Assumption to beat the competitors) • You’ll enhance communication in the field • (All in the same page) • You’ll collect better analytics • (All live statistics without huge expenses) • Your sales team will be more responsive • (Opportunity strikes likes lightening & lightening never strikes twice at same place) • You can’t afford not to • (“going mobile” is a profound benefit in the long-term.) 13-May-17 4
  • 5. The challenges of Going Mobile • Vendor / Platform Fragmentation • Google (Android), Apple (iOS), Microsoft (WinPhone) and BlackBerry • Which vendor/platform to target? • If Multiple platform, How to get the time & funds? • Device Fragmentation • 10+ variants of iPhone with different OS versions & hardware • 10+ vendors manufacturing WinPhone with various hardware • N-Number of Vendors, Unlimited types of devices with wide range of OS version • Development Approach • Native, Web(HTML5/CSS/JavaScript), Hybrid, Crossplatform 13-May-17 5
  • 6. Development Approaches Silo vs Web vs Hybrid Cross-Platform Native to All Platform [SIMULTANEOUSLY] vs 13-May-17 6
  • 7. Development Approaches: Silo • Purely Native, leading to Max Performance • Same functionality developed multiple times • Preferably one team for each platform • Feature & performance may differ platform to platform • Tough to Sync Development life cycle in between all platforms & teams • Difficult to extend & provide support/maintenance • High development cost • Less knowledge sharing & least Code sharing 13-May-17 7
  • 8. Development Approaches: Web • Features / Pros • Developed using mostly HTML5, CSS3, JavaScript, JQuery • Runs in browser, Hence highly portable • Apps are executed on the Web servers and accessible via Mobile Web browsers • Better manageability due to web server based deployments • Higher ease of code maintainability and reuse • Decrease in total cost of ownership • Limitations / Cons • Lack of Native UI feel & fails to access Platform features • Lower performance due to browser based dependencies • Highly dependent on native browser implementation for access to device capabilities • Unpredictable performance due to higher dependency on Internet connection 13-May-17 8
  • 9. Development Approaches: Hybrid • Combination of both web based and native app development. • Applications are built using web technologies like HTML5, CSS3 and Java Scripts and involve the native APIs for access to device specific capabilities. • These apps are resident on the devices as they are packaged within the browser control of the platform and compiled using the native SDK • Features / Pros • Access to limited native device capabilities • Very good portability across platforms • Good ease of deployment like Native apps • Decrease in total cost of ownership • Limitations / Cons • UI better than mobile web apps, but not on par with native • Possible lower performance due to browser based dependencies and the extent of the web dependency • Dependency on the hybrid platform provider capability for native API extensions “Facebook’s biggest mistake was betting too much on HTML5 as opposed to native app development.” ~Mark Zuckerberg [Facebook CEO] 13-May-17 9
  • 10. Development Approaches: Crossplatform • Transform the source code compiled into the native device specific platforms, deployed directly on devices • Provide specific APIs that leverage deep native integration capabilities and the apps developed through this method have a rich user experience that closely mirrors the native UX [User eXperience] • Features / Pros • Richer UX like native apps • Leverage platform specific capabilities • Can be ported to multiple platforms though development in a single language • Deployment on the popular app stores ecosystems is high • Limitations / Cons [Exception: Xamarin] • The ability to develop the app is governed by the limitations of the platform APIs • Certain native capability usage inhibits seamless portability of the app • Not available for all platforms and are limited to certain/few [Xamarin: iOS, Android, WinPhone, UWP, Silverlight] 13-May-17 10
  • 11. Thinking Crossplatform: Xamarin, The most matured one till date… • Almost 100% Code/UI sharing • 100% API access to all platform • Open source & now Microsoft owned • Comes with Visual Studio and a complete solution • Assured Day-1 support for upcoming devices & platform releases 13-May-17 11 • Xamarin vs Hybrid-HTML • As tested & said by Kevin Ford, Mobile Practice Lead, Magenic • 62% Faster in Loading large datasets • 50% less memory used • 76% less CPU cycles • 22X Faster CPU intensive
  • 12. Few Questions before you switch to App… • Are we building applications that are graphics intensive? [Native] • Are we building applications that need a lot of algorithmic computation? [Code Sharing] • Does the application need integration to device specifics? [Native] • Is app security a high priority? [Security features] • Do we need to deploy the app on multiple platforms? [Crossplatform & its support] • What changes do we anticipate in the app and can this be addressed on a chosen development model? • Is there an immediate need to deliver the app to the market? [Time Factor for release] • Are the chosen tools mature enough to provide sufficient support for development? • Does the app need to sync with back end systems and data sources? [Compatibility] • How frequently do we need to upgrade the app and does the app storefront deployment plan support this requirement? [Playstore/AppStore plans] 13-May-17 12
  • 13. Xamarin, a complete solution Xamarin Native/Traditional Approach Xamarin.Forms Approach Code Sharing Strategies By Mukteswar Patnaik
  • 14. Xamarin Agenda • Going Cross platform, I Prefer Xamarin • How Xamarin is a complete Solution for Mobile platform? • Xamarin Studio & VS2015 with Xamarin • Getting it, Prerequisite, Installation • Configuring & Checking the readiness of IDE • Xamarin.Native / Traditional • Xamarin.Forms • Code Sharing Strategies • PCL & SAP in detail with Pros & Cons • [Libraries] [NuGet, Xamarin Components] 13-May-17 14
  • 15. Over 15,000 companies rely on Xamarin 13-May-17 15
  • 16. Xamarin – A Complete Mobile Solution • Open Source & Acquired by Microsoft • Native as well as Cross platform Mobile Application Development • 100% API support for all platform[iOS, Android, WinPhone] • Support from Day-1 for iOS, Android & WinPhone • Available with All edition of Visual Studio 2015 onwards • Test Cloud & Hockey… for testing & Monitoring Mob Apps Not just a platform, rather a Complete Mobile Development Solution 13-May-17 16
  • 17. Xamarin – A Complete Mobile Solution • Enroll/Login to https://university.xamarin.com/ • Free trial, learn A-Z of Xamarin • Live, online classes • Self-guided learning • Guest lectures • Affordable tuition Learn from Xamarin University Earn the Xamarin Certified Mobile Developer designation13-May-17 17
  • 18. Xamarin – A Complete Mobile Solution • Xamarin apps look and feel native because they are • Native UI, API Access, Performance • More Types, Less Typing • Stronger Types, Smarter Tools • Language-level Async • First-class Functions • Share code/UI everywhere [SAP/PCL/Forms] Deliver Native Android, iOS, Windows using existing skills and code. 13-May-17 18
  • 19. Xamarin – A Complete Mobile Solution • Xamarin enables you to develop a single solution and deploy it to Android, iOS, and Windows devices. • After you define three [Each for every platform with all configurations / customization] CI builds, you can build the app whenever your team checks in code. • Upload your Xamarin solution to VSTS or your TFS. Either push your code to Git or check in your code to TFVC[Team Foundation Version Control]. TFS / VSTS – CI Build 13-May-17 19
  • 20. Xamarin – A Complete Mobile Solution • Automate your app testing on 2,000 real devices in the cloud. • Use any device feature[GPS, Camera, sensors] • TestRecorder : test everything your users can do, from pinching and swiping to double-tapping and scrolling. Trigger Test from CI Builds too. • Analyze detailed reports with results, screenshots, and performance metrics. • Learn more on https://www.xamarin.com/test-cloud Xamarin Test Cloud [XTC] - Mobile app testing made easy. 13-May-17 20
  • 21. Xamarin – A Complete Mobile Solution • Bring Mobile DevOps to your apps with beta distribution • crash reporting, user metrics, feedback, and powerful workflow integrations • VS Mobile Center (In Preview state) combines the features of HockeyApp with cloud-based development, testing, and analytics Xamarin.Insights + HockeyApp 13-May-17 21
  • 22. Xamarin – A Complete Mobile Solution • Learn >> Develop >> Build Automation >> Auto Testing >> Mobile DevOps Xamarin - A COMPLETE MOBILE SOLUTION 13-May-17 22
  • 23. About XS & VS2015 with Xamarin VS2015(U3) • If you have VS, stick to it as this gives much more i.e. WinForms / WPF, ASP.NET, Cordova, and so on… • On windows you can develop UWP, Android and iOS(With Mac Agent) • VS Preview on Mac, Expecting production release soon. Xamarin Studio • XS, cross platform for iOS, Android and UWP • XS for Windows further production stopped. • On Windows only Android & WinPhone apps supported • On Mac, Android & iOS can be targeted 13-May-17 23
  • 24. Prerequisite for VS with Xamarin • A Xamarin Sign-in ID at https://www.xamarin.com/ [Free] • A Physical Computer [Not VM] either with • Windows • Preferably Windows 8 or Later with Hyper-V enabled • A Mac on Network to be used as an Mac agent for building iOS apps • Mac : With OS X Yosemite running OS X 10.10.5 or later with Apple-ID • Preferably Visual Studio 2015 (Update 3) or Later [Community/Professional/Enterprise] • Make sure to Check for the internet connection with needed whitelists 13-May-17 24
  • 25. Installation • Download the Visual Studio installer from http://VisualStudio.com & launch installer. • If VisualStudio already installed, Modify the installer from Program & Features > VisualStudio> Change • Select Custom installation & Choose ‘C#/.NET (Xamarin)’ • Also select the templates you need to install i.e. UWP etc • Select the Emulators needed 13-May-17 25
  • 26. Configuring the IDE • Open Visual Studio & Go to Tools>Xamarin Account • Add Xamarin account details • Go to Tools > Options > Xamarin or Tools > Options > Xamarin > Other, where you’ll find a Check Now link. You may update the Xamarin if needed. • Go to Tools > Android > Android SDK Manager and install the newest version of the Android SDK Tools, Android SDK Platform-tools, and Android SDK Build-tools components. • Select suitable Emulators for Android, iOS, WP & UWP. • Preferably continue with Hyper-V. Avoid running multiple Emulators & VMs simultaneously 13-May-17 26
  • 27. Checking the readiness of IDE • Create a Xamarin Native PCL Project [Default Hello Xamarin App] • Build & Run • Create a Xamarin.Form PCL Project [Default Hello Xamarin App] • Build & Run 13-May-17 27 Starting with App Development with Visual Studio 2015(U3) Enterprise with Xamarin
  • 30. Basic Idea About Xamarin Approaches Blank/XAML Code sharing strategies Approaches for App development Complete Crossplatform Mobile App Development Solution Xamarin Xamarin Native/Traditional PCL Blank App SAP Blank App Xamarin.Forms PCL Blank App With XAML SAP Blank App With XAML 13-May-17 30
  • 31. Which Approach to Choose? Xamarin.Forms Xamarin Traditional/Native Apps with common interactions across device platforms Apps with interaction that require native behavior Apps where code sharing is more important than custom UI Apps that use many platform-specific APIs Apps that require little platform-specific functionality Apps where custom UI is more important than code sharing Learn more: xamarin.com/forms Learn more: xamarin.com/platform 13-May-17 31
  • 32. Xamarin – Crossplatform & Code Sharing • Xamarin apps look and feel native because they are • Native UI, API Access, Performance • Crossplatform, here “Native” means Native to every platform • Both Code as well as UI can be shared [Native vs Forms] • Code sharing • Shared Assets Project • Portable Class Library 13-May-17 32
  • 33. Shared Projects / Shared Assets Projects(SAP) • Features/Pros • Allows to share at source code level • Single copy of source/assets complied for individual platform • Maximum API support • Platform specific logic can be added directly(Conditional compiling) • Cons • Leads to spaghetti code • Harder to unit test • Must be shipped in source form 13-May-17 33
  • 35. 13-May-17 35 public static string DatabaseFilePath { get { var sqliteFilename = "TaskDatabase.db3"; #if NETFX_CORE var path = Path.Combine(Windows.Storage.ApplicationData.Curr ent.LocalFolder.Path, sqliteFilename); #else #if SILVERLIGHT // Windows Phone var path = sqliteFilename; #else #if __ANDROID__ string libraryPath = Environment.GetFolderPath(Environment.SpecialFold er.Personal); ; #else // we need to put in /Library/ on iOS5.1 to meet Apple's iCloud terms // (they don't want non-user-generated data in Documents) string documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.Personal); // Documents folder string libraryPath = Path.Combine (documentsPath, "..", "Library"); // Library folder #endif var path = Path.Combine (libraryPath, sqliteFilename); #endif #endif return path; } }
  • 36. SAP Continued… [Solution Explorer] 13-May-17 Right Click on Each platform project, Add Reference to the Shared project. [Done by Default] 36
  • 37. Portable Class Library - PCL • Features/Pros • Shared as binary ( .dll) • Based on the selection of platforms, APIs will be available (The more platform you choose, the better the support) • Enforces architectural design • Can be Unit tested separately as binary • Can be shared on NuGet as binary • Cons • Limited API support (Dependency Injection/Service Overcomes most…) • Requires more work to integrate platform specific code 13-May-17 37
  • 39. PCL Continued… [Solution Explorer] 13-May-17 39
  • 40. Handling the Platform Specifics in PCL Dependency Injection / Services 13-May-17 40

Editor's Notes

  • #5: Your customers expect it the expectation among consumers and businesses alike is that mobile solutions will be available when the need arises. failing to do so will likely lead to brand damaging frustration. YOUR COMPETITORS ALREADY DID If your customers expect it, then your competitors already fulfilled their wishes. Even if not explicitly true, this assumption should be the modus operandi of businesses wishing to stay abreast of the market. YOU’LL ENHANCE COMMUNICATION IN THE FIELD With mobile capabilities, such as cloud storage and mobile enabled IM, everyone from product developers to salespeople to managers can stay on the same page YOUR SALES TEAM WILL BE MORE RESPONSIVE Opportunities arise on a moment’s notice, and capitalizing on them requires agility. mobile solutions offer unparalleled responsiveness not only in communications, but in logistics as well YOU’LL COLLECT BETTER ANALYTICS you can leverage the power of Big Data without the expense of distributed, Internet enabled devices. In essence, your teams become the collection devices, and their performance reaps the benefit. YOU CAN’T AFFORD NOT TO it is the natural progression of technology to be more convenient, more adaptable to our circumstances, and more responsive to our needs. The change will benefit your business in the long-run, outweighing the initial investment by a considerable margin.
  • #19: More Types, Less Typing C# uses type inference to give developers more safety in fewer keystrokes, without boilerplate or verbose type annotations Stronger Types, Smarter Tools Generics guarantee that collections and other compound types are used safely, without the need for casts or comments. Xamarin tools understand intent better thanks to richer types, with benefits like ubiquitous code completion. Language-level Async Asynchronous programming (async) keeps apps responsive. In Objective-C, Swift and Java, async requires callbacks and manual bookkeeping. C#’s language-level support makes async a breeze. First-class Functions In Java for Android, lambdas are unavailable. In Objective-C, lambdas are extremely cumbersome. In C#, lambdas couldn’t be simpler, making functional programmers feel right at home. Share code everywhere Use the same language, APIs and data structures to share an average of 75% of app code across all mobile development platforms. Build user interfaces with Xamarin.Forms and share nearly 100%.
  • #32: Source : http://cdn1.xamarin.com/Architecture%20Selector.pdf
  • #37: All BusinessLogic/Code in Shared project. SharedProject code referred in each project Bug in IDE… Sometimes it does not shows link but still works fine NuGet package installation issues with SAP: You need to install NuGet to individual platform projects, not to shared Project All dependencies also need to be individually installed Updating a single package may halt the whole build
  • #41: https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/