300 likes | 481 Views
PLAT-877T. Leveraging existing code in Metro style apps. Jason Olson Program Manager Microsoft Corporation @jolson88. Do less work to get more done !. Agenda. Using the breadth of existing code that exists today Let the platform do the work for you where possible
E N D
PLAT-877T Leveraging existing code in Metro style apps Jason Olson Program Manager Microsoft Corporation @jolson88
Agenda • Using the breadth of existing code that exists today • Let the platform do the work for you where possible • You can use code that others have written • You can use your own code • Some tips ‘n tricks you should know about reusing existing code You’ll leave with… • Examples of reusing existing C#/C++/JS code • Most important things you need to know when reusing existing code • Pointers to more content
Three types of code reuse Platform Features Other People’s Code Your Own Code
The best code is code you never write in the first place… Platform Features
demo Using Windows contracts
Let the platform do the work for you when possible.
Content for more depth [405] Share: Your app powers the Windows 8 share experience [406] Search: Integrating into the Windows 8 search experience SDK Sample: Search Contract Sample SDK Sample: Shared Source Sample SDK Sample: Camera Capture UI Sample SDK Sample: PlayTo Sample
Why write it yourself when someone else has written it for you? Other People’s Code
jQuery jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
demo Groove – Building a drum sequencer UI
Content for more depth [381] Building beautiful and interactive apps with HTML5 & CSS3 [382] What’s new with HTML5, Javascript, and CSS3 [873] Designing Metro style apps using CSS3
There’s always a counter-example… Other People’s Code
demo Using NodaTime
demo Compiling NodaTimefor Windows 8
Content for more depth [531] Using the Windows Runtime from C# and Visual Basic [532] Using the Windows Runtime from C++ [Lab] – Using C++ to enhance your Metro style apps built using Javascript [Lab] – Using the Windows App Certification Kit to validate and prepare Metro style apps for the Store
Reusing your own code and exposing it via the Windows Runtime Your Own Code
Two ways to expose… Language Projection Language Projection WinRT Components WinRT Component WinRT Components OR Native or .NET Components Native or .NET Components
demo Groove – Playing dynamic audio
You can use your own code and expose it via the Windows Runtime.
Be mindful of the amount of communication across language Boundaries.
Sessions for more depth [PLAT-874T] Lap around the Windows Runtime [PLAT-875T] Windows Runtime internals: understanding "Hello World" [TOOL-531T] Using the Windows Runtime from C# and Visual Basic [TOOL-532T] Using the Windows Runtime from C++ Dev Center: The Windows Runtime Dev Center: C++ Language Extension Summary
Three types of code reuse Platform Features Other People’s Code Your Own Code
Key takeaways Let the platform do the work for you You can use code that others have already written You can use your own code and expose it via the Windows Runtime if necessary Use the right tool for the right job
thank you Feedback and questions http://forums.dev.windows.com Session feedbackhttp://bldw.in/SessionFeedback
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.