Building and testing Windows 8Metro Style Applications using     C++,C# and JavaScript                                    ...
Who am I?        {            “name” : “Radu Vunvulea,            “company” : “iQuest”,            “userType” : “enthusias...
Agenda•   WinRT•   Windows 8 Architecture I•   WinMD•   Windows 8 Architecture II•   Windows 8 Profiles•   Mixing Componen...
•WinRT• WinMD• Chakra• Windows Kernel Service• Windows Runtime API•   CLR, CRT, WinJS
•WinRT• WinMD• Chakra• Windows Kernel Service• Windows Runtime API•   CLR, CRT, WinJS
What exactly is WinRT• WinRT – Windows Runtime• Allow us to build app that use Windows functionalities• We can use any kin...
What exactly is WinRT• WinRT – Windows Runtime• Allow us to build app that use Windows functionalities• We can use any kin...
Why WinRT is good•   We don’t need to use COM and Win32 anymore – for “Metro Apps”•   Easy access to Windows features•   O...
Why WinRT is good•   We don’t need to use COM anymore•   Easy access to Windows features•   Object lifetime management•   ...
What about WinMD•   WinMD – Windows Metadata•   Describe what a WinRT component can do•   Separate file, not included in t...
Windows 8 and WinRT architecture
Windows 8 and WinRT Architecture
Windows 8 and WinRT Architecture•   Only one CLR for all application (desktop and “Metro Apps”)•   Different instances for...
Windows 8 Profiles                   .NET               Silverlight                       .NET   Windows                  ...
What should I use?• JavaScript with HTML 5 and CSS   + Well Known   + IndexdDB   + Dynamic language   - WinRT not fully av...
How to mix different components           C#                  C++                 Java Script
How to mix different components           C#                  C++                                It is not possible       ...
How to mix different components• .WinMD describes all the public API exposed by the component• For JavaScript, the system ...
How to create reusable C# components• Our class that will be exposed have to:   • Be sealed   • Be public   • No virtual  ...
How to create reusable C# components• Asynchronous calls are supported• An asynchronous call need to return an IAsyncOpera...
Demo
What about extensibility…• It is an important feature for LoB applications• Dynamic components loading (reflection)• JS lo...
What about extensibility…• It is an important feature for LoB applications• Dynamic components loading (reflection)• JS lo...
Demo
Unit tests• For code written in C/C++, C# and Visual Basic we have build in  support for unit tests
Unit tests• For code written in C/C++, C# and Visual Basic we have build in  support for unit tests• What about Java Scrip...
Unit tests• For code written in C/C++, C# and Visual Basic we have build in  support for unit tests• What about Java Scrip...
Demo
Windows 8 App Package• A package contains all the files that are required by our application  to run• An update of our app...
Windows 8 App Package• Every package contains a Package Manifest• Package Manifest:   • Package identity       (package na...
Windows 8 App Package• Each package contains a Power Shell script• A normal user can install a package only from Marketpla...
Demo
THE END                        Radu Vunvulea                 vunvulear@gmail.com     http://vunvulearadu.blogspot.com
Radu vunvulea  building and testing windows 8 metro style applications using c++,c# and java script
Upcoming SlideShare
Loading in...5
×

Radu vunvulea building and testing windows 8 metro style applications using c++,c# and java script

1,045

Published on

In this session you will discover how you can develop applications that use components written in different programming language (C++, C# and JavaScript). A brief introduction in WinRT Components and testing tools will also be presented.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,045
On Slideshare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Chakra – JSEngine, communicareprincerucir, princanale, o comunicareprinenergieintreoricefel de canale
  • Chakra – JSEngine, communicareprincerucir, princanale, o comunicareprinenergieintreoricefel de canale
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • COM
  • Radu vunvulea building and testing windows 8 metro style applications using c++,c# and java script

    1. 1. Building and testing Windows 8Metro Style Applications using C++,C# and JavaScript Radu Vunvulea vunvulear@gmail.com http://vunvulearadu.blogspot.com
    2. 2. Who am I? { “name” : “Radu Vunvulea, “company” : “iQuest”, “userType” : “enthusiastic” “technologies” : [ “.NET”, “JS”, “Azure”, “Web”, “Mobile”, “SL” ], “w8experience” : [ “2 LoB App”, “1 Travel App”], “blog” : “vunvulearadu.blogspot.com”, “email” : ”vunvulear@gmail.com”, “socialMedia” : { “twitter” : “@RaduVunvulea”, “fb” : “radu.vunvulea” } }
    3. 3. Agenda• WinRT• Windows 8 Architecture I• WinMD• Windows 8 Architecture II• Windows 8 Profiles• Mixing Components• Extensibilities points• Unit tests• Windows 8 App Package
    4. 4. •WinRT• WinMD• Chakra• Windows Kernel Service• Windows Runtime API• CLR, CRT, WinJS
    5. 5. •WinRT• WinMD• Chakra• Windows Kernel Service• Windows Runtime API• CLR, CRT, WinJS
    6. 6. What exactly is WinRT• WinRT – Windows Runtime• Allow us to build app that use Windows functionalities• We can use any kind of language (managed or not) • C# • C++ • JavaScript • Visual Basic• Language projection for any kind of language• Expose Windows functionalities• Native for any supported language
    7. 7. What exactly is WinRT• WinRT – Windows Runtime• Allow us to build app that use Windows functionalities• We can use any kind of language (managed or not) • C# • C++ • JavaScript • Visual Basic• Language projection for any kind of language• Expose Windows functionalities• Native for any supported language
    8. 8. Why WinRT is good• We don’t need to use COM and Win32 anymore – for “Metro Apps”• Easy access to Windows features• Object lifetime management• Same API on different languages• A lot of things are supported by default, we don’t need to write code for that: • Image capture • IO access • Geolocation • Contracts • Networking • … and so on
    9. 9. Why WinRT is good• We don’t need to use COM anymore• Easy access to Windows features• Object lifetime management• Same API on different languages• A lot of things are supported by default, we don’t need to write code for that: • Image capture • IO access • Geolocation • Contracts • Networking • … and so on
    10. 10. What about WinMD• WinMD – Windows Metadata• Describe what a WinRT component can do• Separate file, not included in the WinRT file• Compatible metadata - .NET ECMA-355 (not IDL) • This is the secret which make it possible a WinRT object to be consumed by - native C++ - managed C# - JavaScript using Chakra JS Engine
    11. 11. Windows 8 and WinRT architecture
    12. 12. Windows 8 and WinRT Architecture
    13. 13. Windows 8 and WinRT Architecture• Only one CLR for all application (desktop and “Metro Apps”)• Different instances for desktop and “Metro Apps”• Only one IL for all applications (desktop and “Metro Apps”)• Only one MSIL for all applications• The same .NET Framework 4.5 is used for all applications, but it used different profiles • .NET Client Profile – desktop • .NET Metro Profile – “Metro Apps”• Framework contains rules that define what parts are available for each profile
    14. 14. Windows 8 Profiles .NET Silverlight .NET Windows Phone Windows 8 Apps
    15. 15. What should I use?• JavaScript with HTML 5 and CSS + Well Known + IndexdDB + Dynamic language - WinRT not fully available• C# with XAML + Full access to WinRT + some custom libraries + async/await, async calls supported at language level + Component written for SL or WP7 can be reused + Well known - XAML can be a hell sometimes• C++ + Very fast + DirectX (games)
    16. 16. How to mix different components C# C++ Java Script
    17. 17. How to mix different components C# C++ It is not possible Java Script
    18. 18. How to mix different components• .WinMD describes all the public API exposed by the component• For JavaScript, the system will manage the class instances• We don’t need to configure the project that will generate the shared component• Be aware that you cannot have/use • XAML controllers in a Java Script app • Java Script components in a XAML/C# project • Even if we have a WebView, we don’t have full access• We can have a C# component that use XAML and use it in a C++ application that use DirectX
    19. 19. How to create reusable C# components• Our class that will be exposed have to: • Be sealed • Be public • No virtual • The class should not be empty • The class should not be abstract • All the input and output of collection types need to be interfaces (IList) • Interfaces are not supported in this moment to be exposed • Windows.Foundation.Metadata.DefaultOverload– for overloading
    20. 20. How to create reusable C# components• Asynchronous calls are supported• An asynchronous call need to return an IAsyncOperationTReturn> • We can obtain it calling “AsAsyncOperation()” method.• A Task<T> is automatically converted into Promise• Don’t forget to named your method accordingly• Any method that’s take longer than 50ms
    21. 21. Demo
    22. 22. What about extensibility…• It is an important feature for LoB applications• Dynamic components loading (reflection)• JS loaded and compiled at runtime• MEF (Managed Extensibility Framework)• Prims
    23. 23. What about extensibility…• It is an important feature for LoB applications• Dynamic components loading (reflection)• JS loaded and compiled at runtime• MEF (Managed Extensibility Framework)• Prims• Non-official response • Wait, have patience, in 6-9 months we may have something for you
    24. 24. Demo
    25. 25. Unit tests• For code written in C/C++, C# and Visual Basic we have build in support for unit tests
    26. 26. Unit tests• For code written in C/C++, C# and Visual Basic we have build in support for unit tests• What about Java Script? • Should we write unit tests for it? • Can I run unit tests from Visual Studio 2012? • Can I integrate Java Script unit tests to the build machine?
    27. 27. Unit tests• For code written in C/C++, C# and Visual Basic we have build in support for unit tests• What about Java Script? • Should we write unit tests for it? YES • Can I run unit tests from Visual Studio 2012? YES • Can I integrate Java Script unit tests to the build machine? YES• There are a lot of frameworks and plugins for this: • Chutzpah Test Adapter for Visual Studio 2012 • QUnit
    28. 28. Demo
    29. 29. Windows 8 App Package• A package contains all the files that are required by our application to run• An update of our app represent a new version of package that contains all the files (not the delta)• Each package is sign by the author using a unique key• A package can be created using • Visual Studio • MakeAppX.exe (command line)
    30. 30. Windows 8 App Package• Every package contains a Package Manifest• Package Manifest: • Package identity (package name, version, publisher, processor architecture, resource ID) • Package properties information about package • Capabilities a list of application capabilities • Extensions used to communicate with system and other application • Visual elements default tile, logo images, background color, and splash screen
    31. 31. Windows 8 App Package• Each package contains a Power Shell script• A normal user can install a package only from Marketplace• Using a developer account any package can be installed on a computer (even the packages that are not signed)• Corporate devices – Windows 8 Enterprise • Windows 8 App packages that can be pushed from the corporate network without the need to publish the application on the Marketplace.
    32. 32. Demo
    33. 33. THE END Radu Vunvulea vunvulear@gmail.com http://vunvulearadu.blogspot.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×