window - PACEMAKER

bluntmoaningMobile - Wireless

Dec 10, 2013 (3 years and 6 months ago)

75 views

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Ecosystem Apps

INNOVATIVE CROSS
-
PLATFORM SOLUTIONS

Sergey Seletsky

Abiliton

Senior
Software Engineer

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Agenda

1.
Why
?

2.
What is an ecosystem?

3.
Problems?

4.
WinRT with HTML5 for other...

5.
Cross
-
platform frameworks


Xamarin


Titanium


Portable apps


A
ppMobi

6.
Specific integrated API

7.
Apps integration

8.
Apps Stores

9.
Ecosystem architecture

10.
Conclusions

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
What is an
ecosystem?

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Enterprise App
Ecosystem

2. Signing Tools

3. App Catalog

1. Registration

1. Develop App

2. Package and sign

1. Device Enrollment

2. Get apps

4. Create Token

3. Cert and
Enterprise ID

Registration

1.
Enterprise registers with App Hub

2.
Enterprise downloads app
tools

3.
Microsoft notifies CA of pending
enterprise registration

4.
Vets
enterprise

5.
CA checks that vetting is complete,
and generates a certificate for
enterprise

IT
organization

App Hub

Windows Phone

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Why ?

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Smartphone Market Share

Platform
s

Google
Apple
Microsoft
RIM
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Native Wrappers


Phonegap


Titanium


appMobi


Create native apps using HTML5


Provide API’s (Hooks to get out of the sandbox)


Work across platforms (mostly)


Can be submitted to app stores

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Cross
-
Platform Devices


Phones


iOS



iPhone, Touch


Android


Blackberry


Windows Phone 7


Tablets


iPad


Android

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Mobile Capabilities That Influence Apps


GeoLocation


PIM Contacts


Camera


Barcode


Date/Time Picker


Native Menus


Tab Bar


Navigation Bar


Signature Capture



Bluetooth


Calendar


Push


Screen Rotation


Native Maps


Alert


Audio File Playback


Ringtones


NFC


w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Cross
-
platform
frameworks

1.
Xamarin

2.
Titanium

3.
Portable apps

4.
A
ppMobi

5.
PhoneGap

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Xamarin

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Asynchronous code before

MyApi.OnSomeMethod

+= () => {


InvokeOnMainThread
( (result) => {



textView.Text

= result;


});

}


MyApi.SomeMethodAsync
();

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
a
sync
/await




textView.Text

=
await

MyApi.GetUrlAsync
(










“http://softserveinc.com”
);

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
С
#
vs

Objective
-
C

Objective
-
C:


// …


[button
addTarget:self

action:@selector(
touchHandler
:)

forControlEvents:UIControlEventTouchUpInside
];

// …


-
(void)
touchHandler
:(id)sender {


textView.text

= @"some text";

}



w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
С
#
vs

Objective
-
C


C#:


btn.TouchUpInside

+= (s, e) => {


textView.Text

= "Clicked!";

} ;



w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
C#
vs

Java

Java:


button.setOnClickListener
(


new
View.OnClickListener
() {


public void
onClick
(View v) {


textView.setText
(“Clicked”);


}


}

);


w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
C#
vs

Java


C#:


button.Click

+= (s, e) {


textView.Text

= “Clicked!”;

} ;


w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
C#
vs

{0}


Simply


C
leaner


Develops very
quickly


From Java sand
pours


[[[[
A
fter

Objective
-
C
]
world :

square]

as
:

very
]

and all: in the colon
];


w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
What is
Monotouch


Mono framework with AOT compilation for
ARM processors and Bindings to
N
ative

API


Code is written in C
#


UI is
native
tongue
, through C #
wrapper


D
evelopment

environment

Visual Studio

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
C
ompilation

process


Compile your code, libraries, BCL, wrappers
over native methods in
IL


Y
ou

can use any language IL



C
onverted

into machine code using AOT
compilation


Added to app code with Mono Runtime and
everything else

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
AOT
vs

JIT


Usually in. Net and Mono native code
generated at run
-

Just In Time
compilation


In
iOS

you can not compile
code
on
JIT
,
only
static
linking


But we already know the architecture (ARM)
so you can compile the code in advance
-

Ahead Of Time compilation

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
R
estrictions

AOT


No Emit, but remains
Reflection


Some specific designs will not work, because
compiled on
JIT


Generic Virtual Methods


P/Invokes in Generic Types


Some
LINQ expressions

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Linking


At
time
of compilation of IL BCL undertakes
only
code
that is actually
used


Similarly, you can cut out unused code in
their

libraries


Need to reduce the size of
app

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
C#

API


Subscribe to
Events


Setting
Properties


F
amiliar

names


var

btn

=
new

UIButton
(
new
RectangleF
(
0
,
0
,
200
,
80
))
;

btn.Enabled

=
true
;

btn.SetTitleColor
(
UIColor
.FromRGB
(
255
,
255
,
0
),

UIControlState
.Selected
);

btn.TouchUpInside

+= delegate {


/
/
your

code

}
;

window
.Add
(
btn
);



w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Wrappers over native methods

Monotouch
:


It all comes down to
P
/
Invoke
method
objc_msgSend

with the appropriate
parameters

Mono
for Android:


Used
JNI

(
Java Native Interface)

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Wrappers over native methods

public virtual
bool

Enabled

{


[Export("
isEnabled
")]


get


{



// …



retur
n
Messaging.bool_objc_msgSend
(
base.Handle
,
UIControl.selIsEnabled
)
;


}


[Export("
setEnabled
:")]


set


{



// …



Mess
aging.void_objc_msgSend_bool
(
base.Handle
,











UIControl.selSetEnabled
_
, value)
;


}

}


w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
A
pp

Structure


Virtually
same
in
native app


AppDelegate
,
UIWindows
,
ViewControllers


To describe
UI
also uses nib files

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
D
evelopment

environment


Visual Studio

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Cross
-
platform


Sharing in 30
-
60 percent of the
code


C
ombining
basic mobile
functionality


There are various
MVVM
frameworks

Xamarin

Shared
Specific
Titanium

Shared
Specific
PhomeGap

Shared
Specific
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Use of opportunities of Windows OS

Win32 API

Vista Bridge

Windows Bridge

.NET Framework


Windows Presentation Foundation


Windows Communication Foundation


Windows Workflow Foundation

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Windows 8 platform

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Installation Store Apps

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Transitions between states

Terminated

App

Low Resources

App not running

App
are given several
seconds to sleep

App
is not notified

App
is notified with
continued

User
Launches
App

Splash
screen

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Process
isolation

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
L
anguage

projection

Windows Metadata

C++ App

P
rojection

CLR

C#/VB App

P
rojection

HTML App

Chakra

P
rojection

Object

IInspectable

IUnknown

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Collections

Array

IInspectable

IUnknown

IVector
<T>

IVectorView
<T>

IObservableVector
<T>

Associative
Collection

IInspectable

IUnknown

IMap
<T>

IMapView
<T>

IObservableMap
<T>

C++ App

STL
-
style
Projection

CLR

C#/VB App

IEnumerable

(T) style
Projection

HTML App

Chakra

JavaScript

Projection

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Asynchrony in Windows 8


All that is more than 50 milliseconds


asynchronously


Windows
Runtime:
IAsyncOperation
<
T
>


JavaScript: Promises


C++:
Parallel Patterns Library


VB/C#:
async

/
await



w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Threading

App Code

App Code

App Code

Windows

UI

Object

Windows

Object

Windows

Object

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Architecture
WinRT

Metro

A
pp

Language
Support

(
CLR,
WinJS
, CRT)

L
anguage

projection

Windows

Metadata &
Namespace

Web Host

(
HTML, CSS,
JavaScript
)

Windows Core

Runtime Broker

Windows Runtime Core

UI

Pickers

Controls

Media

XAML

Storage

Network



DirectX

Win32

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
R
untime

app

Your App

Brokered API calls

Direct API calls

Broker

Core OS

AppXManifest

App Container + Signed

& Validated code

Process.exe

WinRT APIs

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
RuntimeBroker.exe

Brokered Objects

Windows

Runtime Object

App

P
rojection

Proxy

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Windows Runtime APIs

Fundamentals

Application Services

Threading/Timers

Memory Management

Authentication

Cryptography

Globalization

Devices

Geolocation

Portable

Sensors

NFC

User Interface

SVG

Tiles

Input

Accessibility

Printing

HTML5/CSS

XAML

DirectX

Controls

Data Binding

Communications & Data

Memory
Management

XML

Networking

SMS

Notifications

Streams

Contracts

Local & Cloud Storage

Web

Media

Playback

Capture

PlayTo

Visual Effects

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
S
ensors

A
gitation

T
urn

O
verturning

In
dark

I
ndoors

O
utdoors

A
ccelerometer

G
yroscope

C
ompass

S
lope

L
ight

Orientation

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Areas of integration

Together

C
ontracts

:


S
earch


Share

With cloud

Synchronization
app settings


Live SDK

On Windows OS

L
ive

tiles

Notifications

Contracts

Settings

Print




w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
P
op
-
up
notifications

Toast Notifications

Show messages from
apps
and services outside the UI
apps

A
ttract

attention

I
s
disconnected

Allow the user to go directly to the section of
the

app

Initiated locally or from
cloud

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Windows Push Notification Service

Serves pop
-
up notifications and update live tiles
external services

Tile updated and notifications are working even when
not running
app

Takes control of communications devices

Scaled without you

F
ree

Windows 8

Cloud Service

Windows Push
Notification
Service

Metro
Style
App

Notification

Client
Platform

2

3

1

3

1.
Request for URL notification channel

2.
S
ervice

registration

3.
N
otifications

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Contracts
-

part of a large family



App to App Picking contract



Contact Picker



File activation



Play To contract



Print task settings



Protocol activation



Search contract



Settings contract



Share contract


w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
How does this work

T
arget

apps

Share Broker

U
ser

selected


Share”

A
ctivated

Registration


DataTransfer

Manager

Source
app

Filter
apps
or links

U
ser

has selected a
target

P
rocessing

DataPackage

Completion Report

A
synchronous
processing

A
ctivation

DataPackage

App
start
-
goal

DataPackage

in
source
app

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
U
nprecedented

coverage

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
I
ncome

distribution

70%

new
applications

80%

once you do
$
25,000

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Best economy

To generate $ 1 million profit

Price
:
$4.99

~250,000 sales

0.05%
users
Windows

from

500+

Windows

7



w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a

Unified set of messaging capabilities
Consistent management
and observation
capabilities


Service Bus Relay


Rich
options for interconnecting apps across network
boundaries


Service Bus Brokered Messaging


Queuing
,
publish/subscribe


Easily build hybrid
apps


Available as
PaaS

& on
-
premise server

Azure Service Bus

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Conclusions

w
w
w
.
s
o
f
t
s
e
r
v
e
.
u
a
Thank you!