Vous êtes sur la page 1sur 7

White Paper

Xamarin Technical Assessment


Against Native for Cross
Platform Mobile Development .
Background Comparative Technical Assessment
With an aim to become competitive and responsive of Xamarin vs. iOS
in the market, mobile application development
companies are trying to deliver applications on as
many platforms as possible and within budget. Since Methodology
the mobile market is dominated by iOS, Android and (Comparative Feasibility Check)
Windows devices, if one wants to develop a particular
A survey on cross-platform mobile development
application, it must atleast be developed for one of
shows that he grew by more than 200% in 2016.
these three devices unless you can afford to ignore
Considering this surge, businesses have started using
one or all these devices. The standard approach
latest cross-platform application development tools
that companies follow for developing applications is
like Xamarin. These tools allow developers to create
native development.
basic native apps using a single codebase which in
What modern companies and app developers are turn saves their time, energy and money.
doing is write once and run anywhere with cross-
platform development, as it allows to develop The primary purpose of this comparative assessment
applications that can run on multiple platforms. With is to determine if Xamarin tool can be an alternative
cross-platform development, you can reduce the cost to developing native mobile applications. For
of development below the threshold of the total sum this assessment, a proof of concept application is
of native development costs for each platform. developed in both iOS (representing native application
approach) and Xamarin (representing cross-platform
application development approach) and then
compared against a list of criteria mentioned below.
Introduction
Objective C, Swift, and Java are a natural choice for The criteria selected fell under the following broad
the development of mobile applications on iOS and areas:
Android platforms. Its impossible to ignore Xamarin Architecture & Design
when talking about the important approaches
to mobile application development. Xamarin is a Development Methodology
cross-platform framework that has picked up the
development market with its own IDE. It works on C# Infrastructure and Performance
within the NET framework and allows you to create
native apps by utilizing native APIs and UIs of each Support and Costs
platform.

Xamarin is unique in this space as it offers single C#


Use Cases
class library and runtime library that works across all The use cases were carefully selected to demonstrate
three mobile platforms while still compiling native key technical implementation strategies. Following
(non-interpreted) applications that are performant use case scenarios are used for this comparative
for applications like demanding games. assessment.
This research report is based on findings in regards Login/Authentication process
to the evaluation of Xamarin v/s Native platforms and
their development methodologies. Read data from a secured web service
Update data via a secured web service
Send/Receive an alert to a mobile device
Architecture & Design

High Level Architecture

Criteria Xamarin iOS

Web Services are consumed using NSURL. Web Services are consumed using
Integration with back-end services Additional step is required for parsing the NSURL classes.
data using NewtonSoft.JSON Data is parsed using JSON Framework.

Separation of presentation from


business logic
Uses MVVM Uses MVC architecture.

Security *
All iOS Security features are available. IOS supports whole set of security
All Android Security features are available. features (see references).

Local storage *
iOS using SQL Lite DB and android using
SQLite DB
Android File System and SQL Lite.

Authentication using service method call,


Authentication achieved using service
Authentication additional step is required for parsing the
method call.
data.

Authorization *
Authorization is typically embedded in Authorization is typically embedded in
Middle ware. Middle ware.

Maintained using NSURLConnection and


Session Management
NSURLSession in IOS Maintained using NSURLConnection
Maintained using Shared preferences in and NSURLSession
Android.
User Experience

Criteria Xamarin iOS

All the UI elements have the same look and feel like This is native development (X-Code,
Native look & feel native app as Xamarin uses Native UI controls for objective-c and iOS SDK) so the
rendering on each platform. application has rich look and feel.

Action Sheet* Based on iOS UIAlertControllerStyleActionSheet.


Based on
UIAlertControllerStyleActionSheet.

Xamarin.Forms can be used for basic form input

Form Inputs*
applications UIView and its Subclasses are used to
Based on iOS UIView and its Subclasses , forms are create forms in the application.
created in the application

Based on iOS UIGestureRecognizer Class. Supports Gestures based on UIGestureRecognizer


recognizing tap, pinch, pan, rotate, swipe etc,. Custom Class
gestures can also be added.
Gestures and Events* Events based on UIEvent Class touch
Based on iOS UIEvent Class, Supports touch events, events, motion events, and remote-
motion events, and remote-control events control events.

Keyboard* Based on iOS UIKeyBoard Based on UIKeyBoard.

Based on iOS UITableView


Lists Based on UITableView.
List view with custom list adapter for Android.

Modal*
Based on iOS ViewController and Based on UIViewController and
ModalPresentationStyle. ModalPresentationStyle.

Based on iOS UINavigationController and

Navigation
ViewControllers. Based on UINavigationController and
Activity lifecycle for Android are used for controlling ViewControllers.
Navigation.

Popover* Based on iOS UIPopOverviewController. Based on UIPopOverviewController.

Popup* Based on iOS UIViewController, popups can displayed.


Based on UIViewController, popups can
displayed.

Scroll* Based on iOS UIScrollView. Based on UIScrollView.

Based on iOS UITabBarController.


Tabs Based on UITabBarController.
Tabhost for Android.

Based on iOS UITapGestureRecognizer, supports


Based on UITapGestureRecognizer,
Tap & Click* supports recognizing Tap and Click
recognizing Tap and Click events.
events.

Side Menu*
Container view controllers can be used for creating Side Container view controllers can be used
Menu. for creating Side Menu.
Device Specific Features

Criteria Xamarin iOS


Based on iOS AV Foundation Framework.
Camera * Based on AV Foundation framework.
Uses native library API in Android.

Based on iOS Core Location framework.


GPS * Based on Core Location framework.
Uses native library API in Android.

NFC (Near Field NFC is not supported in iOS.


Not Supported.
Communication) * Limited support for Android phones using Android Beam.
Using Core Motion for iOS.
Accelerometer * Based on UI Accelerometer.
Native library API in Android.
Multi-Touch Based on iOS UI Kit
Based on UI Kit.
support* Native device framework for Android.

Development

Criteria Xamarin iOS

For the PoC we deployed Tamarin as follows IDE: X-Code.


Install Xamarin.iOS on Mac machine. Programming language: objective-C/
Swift.
Development Inst Xamarin. Windows on Windows 7.
SDK: iOS SDK 8.x.
Infrastructure Pairing of Windows and Mac machine achieved with
Bonjour service. Instruments to debug memory, battery,
time and network related performance
Install X-Code on Mac machine for .Xib changes. parameters.
Xcode Interface Builder for Xamarin.iOS
Xamarin studio for Xamarin.Android X Code
IDE Xamarin studio for Xamarin.Forms targeting windows Photoshop or any other image editing
apps & Windows store apps software.
Photoshop or any other image editing software.
http://xamarin.com/test-cloud iPad and iPhone simulators are available
Testing Tools except
This is in addition to simulators and provides access and updated with every version of
TDD
to 300 + device types. X-Code.
An approval process on app store takes
Short update cycles
This is based on the target platform, Ex. iOS updates can around two weeks. Here, we can provide
take 2 weeks while Android can be 24 hrs. update for apps every two weeks if
required.

Defect Management GitHub, Bugzilla,TFS GitHub, Bugzilla

Ease of maintaining Shared business logic serves the purpose of maintaining Sharing Business logic is not applicable
multiple Platforms multiple platforms (iOS, Android, Windows). as it is native development for iOS only.

Xamarin has integration with Source Management tools


X-Code has integration with Source
Source Management Management tools like GitHub, SVN or
like GitHub, Bugzilla, TFS.
Bit-bucket).
Ad hoc Distribution for beta testing.
App-store for IOS and Play store distribution for Android
Deployment Process apps. App-store distribution for users.
Apps can be deployed to the enterprise store also. Apps can be deployed to enterprise
store also.
Push Updates to the application can be done using Push Updates to the application can be
APNS for iOS if distributed through App-Store. done using APNS if distributed through
Push Updates Play store for Android App-Store.
For enterprise program/stores, licensee needs to send out For enterprise program / stores, licensee
updates to the users. needs to send out updates to the users.

Using App Store for iOS and Play Store for Android Using App Store
Distribution Channel
Enterprise deployment. Enterprise deployment
Performance

Criteria Xamarin iOS

Tested initial load time of PoC application for


Tested initial load time of PoC
Speed at Start up/ application for 6 runs. Average
6 runs. Average launch time + login screen
Run time launch time + login screen
display time ~ 300 ms.
display time ~ 200 ms.

Responsiveness of Xamarin app is same as that of native Asynchronous calls on background


Responsiveness on app. thread do not block the user interface
user interaction Involves additional effort as the UI files (.xib) need to be and provides excellent user experience
edited with X-Code to resemble iOS Native app. and responsiveness.

Performance
and robustness
Based on iOS. Core Telephony Framework
To handle Call interruptions iOS uses
to support Core Telephony Framework
interruptions *

Support

Criteria Xamarin iOS

Major updates rolled out annually, beta preview releases


in June/July to developers to test their apps for the latest
Support of newest iOS versions and for end users the updates are released in
versions of mobile
Xamarin releases a newer API for September giving 2-3 months to check and update our apps
target OS within couple of days. on the app-store.
operating systems
Changes in API are updated in the related framework
documents.

Developer.apple.com,
Active community https://forums.xamarin.com/ is WWDC Video Sessions,
with many the forum for Xamarin developers Stanford University lectures.
developers community. http://www.raywenderlich.com/tutorial-archive
http://www.objc.io

Commercial Xamarin is not an open source


supporters for the developer plwatform. Apple provides support for the new development through
Apple website (developer.apple.com); also the above links can
framework's on- developer.xamarin.com and other be used to stay updated.
going development reference sites are available.

Apps targeting IOS , Android, Windows Apps Targeting iPad/IPhone devices can be developed using
Target OS/ Devices.
can be developed XCode IDE

Xamarin framework is not updated too Normally once a year, new iOS SDK is released and supporting
Frequency of
frequently. But the API are updated as documentation and updated libraries are available on the
frameworks updates.
per iOS and Android updates developer community site.

Costs & Overheads

Criteria Xamarin iOS

Three types of licenses are available:


Indie[Individual]-
Licensing Free
Business
Commercial

Development
System Size
64 Bit Processor + 8 GB Ram MAC OS Based devices (Mac Pro , Mac Book , Mac Mini)
Reliability & performance of the assessment
During implementation and testing of the sample application, no
relevant crashes were found with any of the frameworks and native
SDKs, apart from the memory management of loaded thumbnails
from large pictures.

Key findings based on comparative assessment


There is still a discussion going on about Xamarin vs native
app development. Yet, any technology has its own benefits and
drawbacks. To make an informed decision about your technology
choice, lets weigh all the pros and cons of Xamarin application
development.

Xamarin provides a single codebase and hence


reduces the cost for support and new functionalities
that need to be introduced.
Conclusion
Xamarin test cloud allows you to automatically test
your iOS and android apps on hundreds of devices, To summarize, for native apps tool
test for performance, UI testing, integration testing or cross-platform development
and UI and UX testing. tool, there are diverse ways to
Xamarin allows building applications on C# and cater to the needs of the mobile
C# is a simple, modern, general-purpose, object- user. There is no unique best
oriented programming language. solution: each of these has their
strengths and weaknesses. The
Xamarin provides a simple development
choice of one versus the other
environment for cross-platform mobile apps.
depends on each companys
Xamarin delivers high performance compiled code individual needs.
with full access to all the native APIs so you can
create native apps with device-specific experiences. This comparative assessment
can serve as a baseline research
Using Xamarin technology allows you to keep native
document for deciding on which
UI across all major Mobile platforms, therefore
mobile application development
providing excellent performance.
tool/platform is the most suitable
Xamarin is integrated with the SDKs of leading to choose.
mobile OS for developers to utilize native controls
that exist for the iOS, android or windows.

For more information contact YASH today at info@yash.com or visit www.yash.com

About YASH Technologies


YASH Technologies focuses on customer success. As a leading technology services and outsourcing partner for large and fast growing
global customers, the company leverages technology and flexible business models to drive innovation and value throughout its customers
enterprise. YASH customer centric engagement and delivery framework integrates specialized domain and consulting capabilities with
proprietary methodologies and solution offerings to provision application, infrastructure and end user focused Right-Sourcing services.
YASH is a SEI CMMI (Level 3) and an ISO 9001:2015 certified company with U.S. and India headquarters and regional sales and development
offices globally with customers spread across 6 continents.
YASH-Xamarin-Mobile-WP-0517

YASH Technologies Global Presence www.yash.com/contactus


AMERICAS | EUROPE | APAC | MEA

World HQ: 605-17th Avenue East Moline IL 61244 USA | Toll Free: 877-766-8934 | Tel: 309-755-0433 | Fax: 309-796-1242 .

2017 YASH Technologies. All rights reserved. Referred products/ services may be registered trademarks of belonging companies.

Vous aimerez peut-être aussi