Cross-Platform App Development in C#

Post on 14-Jan-2015

491 views 3 download

Tags:

description

Mobile Pundits is a full service provider company that provides strategic, design, development, enterprise, testing and outsourcing services to our clients. Our specialty in product to build awesome apps for mobile and web platforms. The Mobile Pundits team work, where entrepreneurs and start-ups come to grow and be surrounded by like-minded people who are building amazing technology products. With mobile application development turning mainstream, developers are progressively looking at cross-platform mobile application development tools to develop apps using C# to help reduce cost of development and improve time-to-market. Cross-platform mobile application development tools attempt to deliver these benefits by providing a neutral way of writing applications using their own particular language/dialect/tools that is then translated into the multiple forms required for deployment to each mobile platform. These slides learn how to build cross-platform mobile applications using technologies like HTML5, C#, PhoneGap, Adobe Flash Builder, Appcelerator Titanium and Applause.

transcript

Cross-Platform Mobile App Development Using C#

By: Mobile Pundits

Overview According to the Global Developer Survey ’13 conducted by Telerik, over

5000 developers said that they developed apps using HTML5 in 2012 and 90% of them plan to do so in 2013.

Only 15% of developers said they would prefer to use a native-only approach.

What Platform Developers Wants?

Windows 8

Chrome OS

Firefox OS

Blackberry 10

Tizen

0 10 20 30 40 50 60 70

13%

36%

47%

66%

Development Difficulty

Blackberry and iOS are the most difficult platforms to develop for Windows 8 and Windows Phone 8 ranked as the easiest with Android falling in the middle.

Usage Apple’s iOS is the leading mobile OS in 30 countries. Canada-83.7%, United

States at 35.2%. Android accounts for more than 50% of the mobile web traffic with South

Korea at 78.3% and United States at 23.3%. Blackberry is the leading mobile OS in four countries, Dominican Republic,

57.1% and United States, 32.0% Symbian is the leading mobile OS in more than 100 countries, Nokia’s Symbian-

based phones are widely used in developing nations. However, it has almost no foothold in the US market.

“I think the biggest mistake that we made as a company is betting too much on HTML5 as opposed

to native” (Mark Zuckerberg, Sept. 2012)

HTML5 is indeed a great technology and is here to

stay

Promise: write once, run everywhere

JavaScript engines are getting faster, and you can

use JavaScript on client and server

But…

But HTML5 ?

You have to program in JavaScript

Write once, deploy everywhere not 100% true

UI paradigms are different on each platform

No access to native libraries

But HTML5 ?

Types of Apps Built Using HTML5

The most important modern web technologies right now include forms and validation, databases and flexible layouts (grids, flexbox, etc.)

But HTML5 ?

iOS Android Windows Phone

C# As A Multiple Platform Alternative

C# As a Multiplatform Alternative

Mono makes it possible to run C# code on the most

widespread platforms

All Windows variants

Linux

OSX

iOS

Android

Architecture Overview

C# As a Multiplatform Alternative

Plus a few nice additions

Playstation Mobile (PS VITA)

The Unity 3d Engine uses C# as a scripting

language (and Unity runs on Wii and WiiU, PS3,

XBOX, Flash)

PS4 will definitely run C# code

BSD, Solaris, Wii, PS3CPU architecture is not an issue: x86, x64, IA64,

PowerPC, SPARC, ARM…

Useful C# Libraries

TinyIoC / TinyMessenger

WaveEngine

MonoGame (XNA)

EmguCv (open CV)

NetTopologySuite

MVVMCross

SQLite-Net

ServiceStack

Log4Net

Many more

We have loC containers, MVVM, 2D and 3D game engines, ORM, Image processing library, Logging, Web services, GIS tools…

Native UI Layer

Key Promise Add a feature to the service layer and the other

layers do not have to change

Create Tasky with out shared data layer Introduce new cloud service that syncs list data

across devices after the fact

Presto: new cloud sync version How hard to deploy through the upgrade to

shared data.

Case Study Cross Platform Task Management

Familiar ground Evolves from iPhone, to Android, to shared data

with customer requirements.

Iterations Version 1 is iPhone Version 1.1 is Android Version 2.0 is Shared Tasks

Communication with backend server (i.e. Promise)

Version 2.1 is WinPhone

Multiplatform Tasky Solution

Advantages In Using C#

Linq / Lamda, Parallel Linq, Tasks

Memory management (no pointers, but leaks are still a problem)

Strongly typed implicit variable declaration

Extension methods

Strongly typed

Generics

WCF

Async/await

ReSharper(This applies only if using Visual Studio)

Tips & Tricks

Developing for iOS requires a Mac

Emulators are good but:

iOS provides an x86 simulator

Android provides both ARM and x86 emulators

iOS deployment still requires the usual certificates and

some Xcode

Memory leaks

Git support in TFS / Xamarin Studio

Conclusion

It all sounds great, isn’t it?

Sometimes is not straightforward as it seems

Relying on semi-closed platform

Specific platform knowledge is still a must: get ready

to learn some Java and objective-c

Mobile is not only coding, UI and UX are crucial for a

successful app

Mobile Developme

nt

Contact Us

www.mobilepundits.com

Mobile Pundits