eco system apps
TRANSCRIPT
![Page 1: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/1.jpg)
www.softserve.ua
Ecosystem AppsINNOVATIVE CROSS-PLATFORM SOLUTIONS
Sergey SeletskyAbiliton™ Senior Software Engineer
![Page 2: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/2.jpg)
www.softserve.ua
Agenda1. Why?2. What is an ecosystem?3. Problems?4. WinRT with HTML5 for other...5. Cross-platform frameworks
• Xamarin• Titanium• Portable apps• AppMobi
6. Specific integrated API7. Apps integration8. Apps Stores9. Ecosystem architecture10. Conclusions
![Page 3: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/3.jpg)
www.softserve.ua
What is an ecosystem?
![Page 4: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/4.jpg)
www.softserve.ua
![Page 5: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/5.jpg)
www.softserve.ua
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
Registration1. Enterprise registers with App
Hub2. Enterprise downloads app tools3. Microsoft notifies CA of
pending enterprise registration4. Vets enterprise5. CA checks that vetting is
complete, and generates a certificate for enterprise
IT organizationApp Hub Windows Phone
![Page 6: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/6.jpg)
www.softserve.ua
Why ?
![Page 7: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/7.jpg)
www.softserve.ua
Smartphone Market SharePlatforms
Google Apple Microsoft RIM
![Page 8: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/8.jpg)
www.softserve.ua
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
![Page 9: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/9.jpg)
www.softserve.ua
Cross-Platform Devices
• Phones– iOS – iPhone, Touch– Android– Blackberry– Windows Phone 7
• Tablets– iPad– Android
![Page 10: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/10.jpg)
www.softserve.ua
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
![Page 11: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/11.jpg)
www.softserve.ua
Problems?
![Page 12: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/12.jpg)
www.softserve.ua
Cross-platform frameworks
1.Xamarin2.Titanium3.Portable
apps4.AppMobi5.PhoneGap
![Page 13: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/13.jpg)
www.softserve.ua
Xamarin
![Page 14: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/14.jpg)
www.softserve.ua
Asynchronous code before
MyApi.OnSomeMethod += () => {InvokeOnMainThread( (result) =>
{textView.Text = result;
});}
MyApi.SomeMethodAsync();
![Page 15: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/15.jpg)
www.softserve.ua
async/await
textView.Text = await MyApi.GetUrlAsync(
“http://softserveinc.com”);
![Page 16: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/16.jpg)
www.softserve.ua
С# vs Objective-C
Objective-C:
// …[button addTarget:self
action:@selector(touchHandler:) forControlEvents:UIControlEventTouchUpInside];// …
-(void) touchHandler:(id)sender {textView.text = @"some text";
}
![Page 17: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/17.jpg)
www.softserve.ua
С# vs Objective-C
C#:
btn.TouchUpInside += (s, e) => {textView.Text = "Clicked!";
} ;
![Page 18: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/18.jpg)
www.softserve.ua
C# vs Java
Java:
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) { textView.setText(“Clicked”); }
});
![Page 19: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/19.jpg)
www.softserve.ua
C# vs Java
C#:
button.Click += (s, e) {textView.Text = “Clicked!”;
} ;
![Page 20: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/20.jpg)
www.softserve.ua
C# vs {0}
• Simply• Cleaner• Develops very quickly• From Java sand pours• [[[[After Objective-C] world : square]
as: very] and all: in the colon];
![Page 21: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/21.jpg)
www.softserve.ua
What is Monotouch
• Mono framework with AOT compilation for ARM processors and Bindings to Native API
• Code is written in C #• UI is native tongue, through C #
wrapper• Development environment Visual
Studio
![Page 22: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/22.jpg)
www.softserve.ua
Compilation process
• Compile your code, libraries, BCL, wrappers over native methods in IL
• You can use any language IL • Converted into machine code using
AOT compilation• Added to app code with Mono
Runtime and everything else
![Page 23: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/23.jpg)
www.softserve.ua
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
![Page 24: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/24.jpg)
www.softserve.ua
Restrictions 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
![Page 25: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/25.jpg)
www.softserve.ua
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
![Page 26: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/26.jpg)
www.softserve.ua
C# API
• Subscribe to Events• Setting Properties• Familiar 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);
![Page 27: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/27.jpg)
www.softserve.ua
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)
![Page 28: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/28.jpg)
www.softserve.ua
Wrappers over native methods
public virtual bool Enabled{
[Export("isEnabled")]get{
// …return Messaging.bool_objc_msgSend(base.Handle,
UIControl.selIsEnabled);}[Export("setEnabled:")]set{
// …Messaging.void_objc_msgSend_bool(base.Handle,
UIControl.selSetEnabled_, value);}
}
![Page 29: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/29.jpg)
www.softserve.ua
App Structure
• Virtually same in native app• AppDelegate, UIWindows,
ViewControllers• To describe UI also uses nib files
![Page 30: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/30.jpg)
www.softserve.ua
Development environment – Visual Studio
![Page 31: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/31.jpg)
www.softserve.ua
Cross-platform
• Sharing in 30-60 percent of the code• Combining basic mobile functionality• There are various MVVM frameworks
Xamarin
Shared Specific
Titanium
Shared Specific
PhomeGap
Shared Specific
![Page 32: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/32.jpg)
www.softserve.ua
Windows Apps
![Page 33: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/33.jpg)
www.softserve.ua
Use of opportunities of Windows OS
Win32 APIVista BridgeWindows Bridge.NET Framework
– Windows Presentation Foundation– Windows Communication Foundation– Windows Workflow Foundation
![Page 34: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/34.jpg)
www.softserve.ua
Windows 8 platformMetro style Apps
HTML
JavaScript
C++C#VB
Desktop Apps
Win32
.NET / SL
Internet
Explorer
Communication
& Data
Application Model
Devices & Printing
WinRT APIs
Graphics & Media
Syste
m S
erv
ices
JavaScript(Chakra)
CC++
C#VB
XAML HTML / CSSVie
wM
od
el
Con
troll
er
Windows Core OS Services
Core
![Page 35: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/35.jpg)
www.softserve.ua
Installation Store Apps
Store backend
Package Manager
install Execution Engine
Extension Handler
stage Single instance store
register Registration Information
Store
Manifest.xml
BlockMap
Signature
Zip Central Directory
Files / Assets
package
![Page 36: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/36.jpg)
www.softserve.ua
Transitions between states
RunningApp
Suspended
App
suspendingTerminate
dApp
Low Resources
Code gets to runNo code
runs App not running
resuming
App are given several seconds to
sleep
App is not notified
App is notified with continued
User Launches App
Splash screen
![Page 37: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/37.jpg)
www.softserve.ua
Process isolation
OS
User data Devices Communications Handlers Tiles Cryptography … …
Bro
kers
Process1
Local contextWeb
contextAppData
Local Temp Roaming
Contracts
Process2
Local contextWeb
contextAppData
Local Temp Roaming
Dire
ct AP
Is
![Page 38: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/38.jpg)
www.softserve.ua
Language projection
Windows Metadata
C++ AppPro
jectio
n
CLR
C#/VB AppPro
jectio
n
HTML AppChakra
Pro
jectio
nObject
IInspectable
IUnknown
![Page 39: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/39.jpg)
www.softserve.ua
Collections
Array
IInspectable
IUnknownIVector<T>
IVectorView<T>
IObservableVector<T>
Associative Collection
IInspectable
IUnknownIMap<T>
IMapView<T>
IObservableMap<T>
C++ App
STL-style Projection
CL
R
C#/VB App
IEnumerable(T) style
Projection
HTML App
Ch
ak
ra
JavaScriptProjection
![Page 40: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/40.jpg)
www.softserve.ua
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
![Page 41: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/41.jpg)
www.softserve.ua
ThreadingMain UI thread
Task factory
App Code App Code App Code
Windows UI
Object
Windows
Object
Windows
Object
![Page 42: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/42.jpg)
www.softserve.ua
Architecture WinRTMetro App Language
Support(CLR, WinJS, CRT)
Language 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
![Page 43: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/43.jpg)
www.softserve.ua
Runtime appYour App
Brokered API calls
Direct API calls
Broker
Core
OS
AppXManifest
App Container + Signed & Validated code
Process.exe
WinRT APIs
![Page 44: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/44.jpg)
www.softserve.ua
RuntimeBroker.exe
Brokered Objects
Windows Runtime Object
IInspectable
IUnknown
App
Pro
jectio
n
Pro
xy
![Page 45: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/45.jpg)
www.softserve.ua
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
![Page 46: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/46.jpg)
www.softserve.ua
Sensors
Agitation Turn Overturning
In dark Indoors Outdoors
Accelerometer
Gyroscope
Compass
Slope
Light
Orientation
![Page 47: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/47.jpg)
www.softserve.ua
Apps integration
![Page 48: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/48.jpg)
www.softserve.ua
Areas of integration
Together
Contracts :• Search• Share
With cloud
Synchronization app settings
Live SDK
On Windows OS
Live tilesNotificationsContractsSettingsPrint…
![Page 49: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/49.jpg)
www.softserve.ua
Pop-up notificationsToast Notifications
Show messages from apps and services outside the UI apps
Attract attention
Is disconnected
Allow the user to go directly to the section of the app
Initiated locally or from cloud
![Page 50: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/50.jpg)
www.softserve.ua
Windows Push Notification ServiceServes 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
Free
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. Service registration
3. Notifications
![Page 51: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/51.jpg)
www.softserve.ua
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
![Page 52: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/52.jpg)
www.softserve.ua
How does this workTarget appsShare Broker
User selected“Share”
Activated
Registration DataTransfer
Manager
Source app
Filter apps or links
User has selected a target
ProcessingDataPackage
Completion Report
Asynchronous processing
Activation DataPackage
App start-goal
DataPackage in source app
![Page 53: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/53.jpg)
www.softserve.ua
Windows Store
![Page 54: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/54.jpg)
www.softserve.ua
Unprecedented coverage
100+ languages
Shop and Apps
200+countries
Purchase
70+ countries including 40 largest by GDP
Local prices
![Page 55: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/55.jpg)
www.softserve.ua
Income distribution
Starts with 70%new applications
Switches to 80%once you do $25,000
![Page 56: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/56.jpg)
www.softserve.ua
Best economy
To generate $ 1 million profit
Price: $4.99
~250,000 sales
0.05% users Windows from
500+ million Windows 7
![Page 57: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/57.jpg)
www.softserve.ua
Google Play
![Page 58: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/58.jpg)
www.softserve.ua
Cloud Services
![Page 59: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/59.jpg)
www.softserve.ua
![Page 60: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/60.jpg)
www.softserve.ua
Unified set of messaging capabilities Consistent management and observation capabilities
Service Bus RelayRich options for interconnecting apps across network boundaries
Service Bus Brokered MessagingQueuing, publish/subscribe
Easily build hybrid appsAvailable as PaaS & on-premise server
Azure Service Bus
![Page 61: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/61.jpg)
www.softserve.ua
Conclusions
![Page 62: Eco system apps](https://reader030.vdocuments.site/reader030/viewer/2022012922/55661670d8b42a06318b4fd0/html5/thumbnails/62.jpg)
www.softserve.ua
Thank you!