universal apps 101 goran karačić. agenda who am i? introduction to universal apps universal apps...
TRANSCRIPT
AgendaWho am I?
Introduction to Universal AppsUniversal Apps DemoQuestions
Who am I?Goran KaracicPolytechnic ZagrebWindows Phone developerIce cream addictLady Gaga > Ke$a
Universal Apps Overview
Universal appsApplications that use the overlapping code of theWindows 8.1 and the Windows Phone 8.1 platform
Create new apps or add a WP8.1 app to your existing Windows 8.1 project
Supported for C#, C++ and HTML5/CSS/JS
How much code is shared?
Classes Structs Interfaces
Windows 8.1 SDK 566 119 59
Windows Phone 8.1 SDK
624 131 57
+58 +12 -2
Converting a Windows 8.1 projectAs simple as addinga new project to thesolution
Shared ProjectAllows sharing items between application projects
No binary output
Supports all items:XAMLCode filesImagesXML/JSON
Code Sharing Architecture
Separation of ConcernsDecouple UI from App Logic
Logic in Shared Project+some XAML that makes sense
UI goes into the Windows/WP project+some platform specific logic (geolocation, sensors…)
#if Compiler ConditionalsWindows = WINDOWS_APP
Example: hardware back button (WP only)Windows Phone = WINDOWS_PHONE_APP
#if WINDOWS_PHONE_APP
Windows.Phone.UI.Input.HardwareButtons.BackPressed += this.HardwareButtons_BackPressed;
#endif
Demo
Questions?
Thank you, come again! :D