1 / 62

Ecosystem Apps

Ecosystem Apps. INNOVATIVE CROSS-PLATFORM SOLUTIONS. Sergey Seletsky Abiliton ™ Senior Software Engineer. Agenda. Why ? What is an ecosystem? Problems? WinRT with HTML5 for other... Cross-platform frameworks Xamarin Titanium Portable apps A ppMobi Specific integrated API

Télécharger la présentation

Ecosystem Apps

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ecosystem Apps INNOVATIVE CROSS-PLATFORM SOLUTIONS Sergey Seletsky Abiliton™ Senior Software Engineer

  2. Agenda • Why? • What is an ecosystem? • Problems? • WinRT with HTML5 for other... • Cross-platform frameworks • Xamarin • Titanium • Portable apps • AppMobi • Specific integrated API • Apps integration • Apps Stores • Ecosystem architecture • Conclusions

  3. What is an ecosystem?

  4. Enterprise App Ecosystem App Hub IT organization Windows Phone 1. Registration 1. Device Enrollment 2. Signing Tools 2. Get apps 3. Cert and Enterprise ID 1. Develop App 2. Package and sign • Registration • Enterprise registers with App Hub • Enterprise downloads app tools • Microsoft notifies CA of pending enterprise registration • Vets enterprise • CA checks that vetting is complete, and generates a certificate for enterprise 3. App Catalog 4. Create Token

  5. Why ?

  6. Smartphone Market Share

  7. 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

  8. Cross-Platform Devices • Phones • iOS – iPhone, Touch • Android • Blackberry • Windows Phone 7 • Tablets • iPad • Android

  9. 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

  10. Problems?

  11. Cross-platform frameworks • Xamarin • Titanium • Portable apps • AppMobi • PhoneGap

  12. Xamarin

  13. Asynchronous code before MyApi.OnSomeMethod += () => { InvokeOnMainThread( (result) => { textView.Text = result; }); } MyApi.SomeMethodAsync();

  14. async/await textView.Text = awaitMyApi.GetUrlAsync( “http://softserveinc.com”);

  15. С# vsObjective-C Objective-C: // … [button addTarget:self action:@selector(touchHandler:) forControlEvents:UIControlEventTouchUpInside]; // … -(void) touchHandler:(id)sender { textView.text = @"some text"; }

  16. С# vsObjective-C C#: btn.TouchUpInside += (s, e) => { textView.Text = "Clicked!"; } ;

  17. C# vs Java Java: button.setOnClickListener( new View.OnClickListener() { public void onClick(View v) { textView.setText(“Clicked”); } } );

  18. C# vs Java C#: button.Click += (s, e) { textView.Text = “Clicked!”; } ;

  19. C# vs {0} • Simply • Cleaner • Develops very quickly • From Java sand pours • [[[[AfterObjective-C] world :square]as:very]and all: in the colon];

  20. 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

  21. Compilationprocess • Compile your code, libraries, BCL, wrappers over native methods in IL • Youcan use any language IL • Convertedinto machine code using AOT compilation • Added to app code with Mono Runtime and everything else

  22. 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

  23. RestrictionsAOT • 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

  24. 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

  25. C#API • Subscribe to Events • Setting Properties • Familiar names varbtn = newUIButton(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);

  26. 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)

  27. 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); } }

  28. AppStructure • Virtually same in native app • AppDelegate, UIWindows, ViewControllers • To describe UI also uses nib files

  29. Developmentenvironment – Visual Studio

  30. Cross-platform • Sharing in 30-60 percent of the code • Combining basic mobile functionality • There are various MVVM frameworks

  31. Windows Apps

  32. Use of opportunities of Windows OS Win32 API Vista Bridge Windows Bridge .NET Framework • Windows Presentation Foundation • Windows Communication Foundation • Windows Workflow Foundation

  33. Windows 8 platform Desktop Apps Metro style Apps HTML JavaScript HTML / CSS XAML View JavaScript (Chakra) C C++ C# VB Model Controller C# VB C++ WinRT APIs Devices & Printing Communication & Data Graphics & Media System Services .NET / SL Internet Explorer Win32 Application Model Windows Core OS Services Core

  34. Installation Store Apps Store backend Files / Assets Single instance store Manifest.xml Package Manager stage BlockMap Store install package Execution Engine Signature Registration Information Zip Central Directory register Extension Handler

  35. Transitions between states App are given several seconds to sleep App is not notified suspending Running App Suspended App Terminated App User Launches App Low Resources resuming App is notified with continued Splash screen Code gets to run No code runs App not running

  36. Process isolation Process2 Process1 Local context Local context Web context Web context AppData AppData Contracts Local Local Temp Temp Roaming Roaming Direct APIs Brokers OS User data Devices Communications Handlers Tiles Cryptography … …

  37. Languageprojection IInspectable Object C++ App Projection IUnknown C#/VB App CLR Projection HTML App Chakra Projection Windows Metadata

  38. Collections IInspectable C++ App STL-style Projection IUnknown IVector<T> Array IVectorView<T> IObservableVector<T> C#/VB App CLR IEnumerable (T) style Projection IInspectable IUnknown HTML App Chakra JavaScript Projection IMap<T> Associative Collection IMapView<T> IObservableMap<T>

  39. 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

  40. Threading MainUI thread Taskfactory Windows UI Object Windows Object Windows Object App Code App Code App Code

  41. Architecture WinRT Language Support (CLR, WinJS, CRT) MetroApp Languageprojection UI Pickers Controls Media Web Host (HTML, CSS, JavaScript) Windows Metadata & Namespace XAML Storage Network … DirectX Windows Runtime Core Runtime Broker Win32 Windows Core

  42. Runtime app Your App App Container + Signed & Validated code Core OS Process.exe WinRT APIs Direct API calls Broker Brokered API calls AppXManifest

  43. Brokered Objects RuntimeBroker.exe App Proxy Projection IInspectable IUnknown Windows Runtime Object

  44. Windows Runtime APIs User Interface HTML5/CSS XAML DirectX Controls Data Binding SVG Tiles Input Accessibility Printing Devices Communications & Data Contracts Local & Cloud Storage Web Geolocation Portable Sensors NFC Notifications Streams Media Memory Management XML Networking SMS Playback Capture PlayTo Visual Effects Fundamentals Application Services Threading/Timers Memory Management Authentication Cryptography Globalization

  45. Sensors Accelerometer Gyroscope Compass Agitation Turn Overturning Slope In dark Indoors Outdoors Light Orientation

  46. Apps integration

  47. Areas of integration Together Contracts: Search Share With cloud Synchronization app settings Live SDK On Windows OS Live tiles Notifications Contracts Settings Print …

  48. Pop-up notificationsToast Notifications Allow the user to go directly to the section of the app Show messages from apps and services outside the UI apps Attractattention Is disconnected Initiated locally or from cloud

  49. Windows Push Notification Service Windows 8 Cloud Service Metro Style App 2 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 Free 3 1 Notification Client Platform Windows Push Notification Service 3 Request for URL notification channel Serviceregistration Notifications

More Related