Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

App windows phone in c++

631 views

Published on

A quick overview about the C++ support on a Windows Phone SDK with a particular focus about the reuse of LOB (Line Of Business) C++ code

  • Be the first to comment

  • Be the first to like this

App windows phone in c++

  1. 1. App Windows Phone in C++ #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Mirco Vanini info@proxsoft.it - @mircovanini http://mircovanini.blogspot.it/
  2. 2. Grazie a #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Sponsor
  3. 3. Agenda • How & where C++ is supported • When and why to use C++ • Introduction to the Windows (Phone) Runtime • Sharing C++ code (demo) #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  4. 4. How: Windows Phone C++ Support • Can be used in any Windows Phone App • Visual Studio Express 2012/3 for Windows Phone • Same C++ compiler & CRT used in Windows 8 • Subset of C++ 11 standard features #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  5. 5. Sampling of C++ 11 Standard Features RValue references Forward declared enums Bidirectional fences static_assert Alignment Data-dependency ordering Auto Standard-layout and trivial types exception_ptr Trailing return types Extended friend declarations Thread-local storage Lambdas Local and unnamed types as template arguments #CDays14 – Roma - 23, 24 e 25 Settembre 2014 __func__ Decltype Range-based for-loop C99 preprocessor Right angle brackets override and final long long extern templates Minimal GC support Strongly typed enums nullptr Atomics C++11 Features in Visual C++ 11 Announcing the Visual C++ Compiler November 2013
  6. 6. Why use C++ • Reusability: You have some legacy code around that you really don't want to rewrite but still use in your app • Portability: You want to use the code you're about to write on multiple platforms • Performance: You really are in need for these last bits of performance benefits and know what you're doing • Personal Preference: You are a developer who really favors C++ over e.g. C# or you have significantly better skills in C++ #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  7. 7. Where you can use C++ • All Windows Phone 8 apps can use native code…  XAML apps (8.1)  XAML apps mixed with D3D and WinRT  Pure native D3D apps/games  C++ libraries: Dynamic Link Libraries, Static Libs  WinRT C++ Components • ...not all apps need to use native code WP 7.0 Silverlight #CDays14 – Roma - 23, 24 e 25 Settembre 2014 WP 7.5 Silverlight WP 8.0 Silverlight WP 8.1 Silverlight WP 8.1 WinRT
  8. 8. Why stay on Windows Phone Silverlight? • Existing Code Investment • Existing Install Base • Not yet converged  Camera Lenses  VoIP  Lock Screen Wallpaper.  Clipboard API  Simple Sound Effects (XNA)  Run Under Lock Screen #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  9. 9. Why Retarget to Windows Phone Silverlight 8.1? • Access to SD Cards • Geofencing • App to App SSO (Single Sign-On) • App to App sharing • And much more… #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  10. 10. Windows Phone Runtime • Why learn about WinRT?  WinRT is used in the application model  C++ code called from XAML uses WinRT  Phone Platform APIs are built using WinRT  More Convergence  Latest Tooling  New Controls  Future Investment  Same ECMA-335 standard as .NET  Type-System Projections  CLR Projection  Framework Projection #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  11. 11. A Closer Look at What's Available Direct3D with XAML" C++ application actually creates a C# main project and a separate Windows Runtime Component in C++. #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  12. 12. Sharing C++ code #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  13. 13. demo Sharing C++ code #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  14. 14. Recap / Q&A Welcome back to C++! #CDays14 – Roma - 23, 24 e 25 Settembre 2014
  15. 15. Q&A Tutto il materiale di questa sessione su http://www.communitydays.it/ Lascia il feedback su questa sessione dal sito, potrai essere estratto per i nostri premi! Seguici su Twitter @CommunityDaysIT Facebook http://facebook.com/cdaysit #CDays14 #CDays14 – Roma - 23, 24 e 25 Settembre 2014

×