2012 mct summit presentation final
DESCRIPTION
TRANSCRIPT
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
Deep Dive into WinJS
Dmitri Artamonov
@dartamon
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Your name• Web, client or other?• What’s drawing you towards WinJS?
Introductions
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Introductions• Under the hood• Place in the universe• Patterns and practices• Integration with enterprise systems• Managing WinJS development
Agenda
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Language projections• Connected to same WinRT components• Hardware-accelerated JS technology from IE• Will WinJS evolve away?• Windows Phone 8
Under the hood
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Rapid Development• Reuse web monkeys• Better view surface on top of C# logic• Large existing ecosystem for developers• Cheaper UI design process
Where does it fit?
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• jQuery• Graphing and Charting• Knockout.js• You can even create apps without WinJS
Other Libraries
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Async pattern• function – then – done• Still a single thread!• Careful accessing resources not yet returned
Patterns - Promises
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• No encapsulation of actions• Bloated VMs• Implementation – one context per view• No two-way bindings in WinJS• Bindings in WinJS require knowledge of View
Patterns – MVVM…
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Standard web pattern for ~17 years• Controllers for user input• AM/DM conversion with namespaces and
classes• Classes and namespaces are observable• Multiple contexts – regions…
Patterns - MVC
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
Demo - MVC
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Data contexts defined for individual DOM elements
• data-win-bind and data-win-bindsource• Declarative and programmatic ways
Patterns - Regions
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Information hiding done via modules• Anonymous self-executing function with
parameters• Code inside module is private• Parameters allow dependency injection and
testing• Data exposed via namespaces and classes
Patterns – Modules and DI
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• C# good at logic and model manipulation• Use it, expose data via component to WinJS• Access it as normal namespace/class• Take advantage of performance of C++/C#
Patterns – .winmd components
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Deploy once, keep updating• Forbidden by security for the Windows Store• Uses execUnsafeLocalFunction• Alternatives – iframe, Fragments API
Patterns - Dynamic code loading
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Blend with WinJS• No broken module references or .targets files• True handoff from designer to developer
Practices – Blend design process
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
Demo – Blend with Javascript
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• File Picker API - fluid file system• Roaming API – unified experience• Share Contract – enterprise workflows• Tiles – enterprise dashboards• Windows Push Notification Services for
communication through tile updates
Integration with Enterprise Systems
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
Demo – Executive Dashboard
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Private store for the enterprise• Enterprise machines can deploy from fixed set
of apps• Enforce security policies• Restores controlled enterprise environment
Enterprise Store (unofficial)
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• Training• Design – Blend!• Development• Testing• Deployment• Maintenance
Managing WinJS - Costs
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• What happens to legacy C# apps?• How to migrate legacy web applications to
Windows 8?• Writing cross-platform apps
Managing WinJS (cont’d)
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
A Big Thanks to our Sponsors
Platinum Sponsor
Gold Sponsors
MCT Summit North America | October, 17th – October 20th, 2012 | Redmond
• WinJS Samples: http://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-App-Samples
• BlueMetal Blog: http://blog.bluemetal.com• [email protected]• @dartamon
Questions?