Mobile is still Fresh

Post on 10-May-2015

447 views 1 download

Tags:

description

In this talk Alexey will once again compare Web and Mobile, but this time with a little twist. Alexey will be talking about the problems he encountered in Mobile, which does not arise in the Web, and what solutions were found. Talk will have a number of plot twist and will include the following topics: - Why Web and Mobile are so different? - Common pitfalls in Mobile projects - Comparison of Mobile solutions - How can we improve Mobile

Transcript of Mobile is still Fresh

Mobile FreshAlexey Buzdin

January 2014

Speaker

Android and Java enthusiast at

@AlexeyBuzdin! alex.buzdin@gmail.comLArchaon

Table of Content• Mobile vs Web++

• What makes Web simple and attractive

• What are the pitfalls developing mobile apps

• Android vs iOS

• Interesting Android facts

@AlexeyBuzdin! alex.buzdin@gmail.comLArchaon

DISCLAIMER

All characters, events, thoughts and ideas used in this presentation — even those based on real life —

are entirely fictional and purely subjective to speaker opinion.

:)

Round 1

0:0Growth

1995 to Present Day

Web had >20 years to evolve

Mobile as we know it today

June 29, 2007 - 7 years ago

July 9, 2008 - 6 years ago

2008 to Present Day

Number of mobile phones to exceed world population by 2014

http://www.digitaltrends.com/mobile/mobile-phone-world-population-2014/

iOS and Android - 1 million+ apps

Mobile

1:0[Grows faster]

Round 2

1:0Learning Curve

Mobile vs Web

Technologies

<span id="button"> Button </span> !

var button = document.getElementById("button"); button.addEventListener("onclick",function() { window.alert( “Hello World." ); });

!

<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/button" android:text="Button" android:onClick=“click"/> !

public void click(View button) { Toast.makeText(context, "Hello World", 0).show(); }

<Button x:Name="Button" Content="Button" Click=“Button_Click"/> !private void Button_Click(object sender, RoutedEventArgs e) { MessageBox.Show(“Hello World", "Caption", MessageBoxButton.OK); }

!- (IBAction)buttonClick:(id)sender { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Caption" message:@"Hello World" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; ! [alert show]; }

@property (weak, nonatomic) IBOutlet UIButton *button;

I smell trouble• @property (weak, nonatomic) IBOutlet UIButton *button !

• Every time Xcode opens a XIB / Storyboard, it will also change a minute detail in the XML format. Are you using version control system? !

• Merges on XIBs and Storyboards can go horribly wrong, because their XML formats were not meant to be merged.

Web has some ‘Standards'And at least

3 platforms vs 1Cross Platform?

Cross platformers• Must be a native app-store app

• Must use native-looking UI controls.

• Must perform, even last-gen phones

• Must support at least iPhone & Android & WP

• Must have extensive documentation and community

• Must upgrade to new OS releases in time

Available Options

• Embedded WebView • Build to native code • VM

mGWT Codename One RoboVM

Apportable Xamarin

Corona

!

RhoMobile

!

DolphinPHP

!

Adobe Air

Sencha Touch

PhoneGap

Titanium

Not Mentioned*

*Game Engines

Embedded WebViewAs of Android 4.4 - WebView is now built on Chromium

Embedded WebViewiOS UIWebView lacks Nitro Javascript engine. This makes executing Javascript much slower compared to Safari.

Native UI?

Native UI

Releases

Cross platformers• Must be a native app-store app

• Must use native-looking UI controls.

• Must perform, even last-gen phones

• Must support at least iPhone & Android & WP

• Must have extensive documentation and community

• Must upgrade to new OS releases in time

[Plausible][Confirmed]

[Plausible]

[Plausible][Plausible][Confirmed]

Web

1:1[Easier to Learn]

Round 3

1:1Ease of Development

Web frameworks

and countless others JS and CSS frameworks in the wild

Android libraries?• HoloEverywhere - backport Holo theme & widgets from

Android 4.* to 2.1+

• Robolectric - run test inside the JVM on your workstation in seconds.

• RoboGuice - framework that brings the simplicity and ease of Dependency Injection to Android

• AndroidAnnotations - framework that speeds up Android development using annotations.

• ActionBarSherlock - backport ActionBar from Android 4.* to 2.1+

Android - January 2013

Android - January 2014

That’s basically it folks

Android libraries?

Dev Environment

Dev Environment

jsbin.com jsfiddle.net

hongkiat.com/blog/cloud-ide-developers

Pitfalls

• Adaptive design

• Backport functionality

• Optimisation for markets

• Memory management

• Besting speed

Adaptive?

Mobile

Should be adaptive by default

Should be adaptive by default

Also problems with images

Pitfalls

• Adaptive design

• Backport functionality

• Optimisation for markets

• Memory management

• Besting speed

Backport and optimisation

• No ActionBar in Android < 3.0

• No Fragments in Android < 3.0

• Kindle, OUYA, etc markets require additional configs

• iOS7 features does not work on <iOS7 (3G, 3GS)

• Supporting iPhones and iPads require additional work

Support libraries

No proper packet management!

github.com/mosabua/maven-android-sdk-deployer

Pitfalls

• Adaptive design

• Backport functionality

• Optimisation for markets

• Memory management

• Besting speed

Memory management

Image

Screen 2

Image

Screen 1

Memory leak!

Passing image from one screen to another …

Memory management

Memory leak!

Changing orientation and not handling ongoing request …

Pitfalls

• Adaptive design

• Backport functionality

• Optimisation for markets

• Memory management

• Besting speed

Images and HTTPBottleneck candidates:

Web

1:2[Easier to Develop]

Round 4

1:2Ease of Testing

Mobile vs Web

Testing Web

2-3caniuse.comhtml5test.com

Test online

appthwack.com AppThwack

developer.samsung.com/remotetestlab

testdroid.com

perfectomobile.com

Web

1:3[Easier to Test]

thus …

Mobile is still Fresh

1:3

Save Mobile,get involved

:)