590 likes | 681 Views
Stories from B uilding the Windows Mail A pp. Jeremy Epling Principal Program Manager Lead, Windows Mail App 3-104. //build/. Powerful on all devices Leverage Windows and existing code Nailing performance. //build/. Powerful on all devices Leverage Windows and existing code
E N D
Stories from Building the Windows Mail App • Jeremy Epling • Principal Program Manager Lead, Windows Mail App • 3-104
//build/ • Powerful on all devices • Leverage Windows and existing code • Nailing performance
//build/ • Powerful on all devices • Leverage Windows and existing code • Nailing performance
Powerful on all devices All-in-one Laptop 2-in-1 Tablet
Optimize for all types of input • Touch • Easy thumb access • Reduce posture changes • Mouse • Show actions on hover • Reduce mouse distance • Keyboard • Fewer tabs for key scenarios • Shortcuts for everything
Optimize for all sizes • Work great from 7in to 30in, portrait and landscape • Use Hub, ListView, and CSS Media Queries to adjust orientation and size • Design the scenarios when you launch other apps • Use protocol handlers to specify launch size
//build/ • Powerful on all devices • Leverage Windows and existing code • Nailing performance
HTMLor XAML? • Do you have an existing investment in either? • Where is the expertise of your team? • Are your scenarios better enabled in one platform?
HTML or XAML? • Do you have an existing investment in either? • Where is the expertise of your team? • Are your scenarios better enabled in one platform?
HTML or XAML? • Do you have an existing investment in either? • Where is the expertise of your team? • Are your scenarios better enabled in one platform? • Almost all email is sent and received as HTML • Accurate email rendering and editing
HTML or XAML? • Do you have an existing investment in either? • Where is the expertise of your team? • Are your scenarios better enabled in one platform? • Almost all email is sent and received as HTML • Accurate email rendering and editing • Leverage the latest and greatest in HTML standards • Huge community of frameworks
New UI built in HTML • Use Windows controls • Custom controls for your unique experiences • Leverage web tools like LESS and JSHint
C#, CX, or C++? • Do you have an existing investment in either?
C#, CX, or C++? • Do you have an existing investment in either? • Desktop and Windows Phone
C#, CX, or C++? • Do you have an existing investment in either? • Desktop and Windows Phone • Where is the expertise of your team?
C#, CX, or C++? • Do you have an existing investment in either? • Desktop and Windows Phone • Where is the expertise of your team? • C++ and COM
C#, CX, or C++? • Do you have an existing investment in either? • Desktop and Windows Phone • Where is the expertise of your team? • C++ and COM • Are your scenarios better enabled in one platform?
C#, CX, or C++? • Do you have an existing investment in either? • Desktop and Windows Phone • Where is the expertise of your team? • C++ and COM • Are your scenarios better enabled in one platform? • Fast background sync for great battery life
Mail app architecture Mail UI (View) • Diagram example • WWA • Platform Mail UI (View model) Mail Object Cache (WinRT) Process Mail Object Model (WinRT) Media Foundation Mail Data Store (JET DB) Search (.EML files on disk) Sync host Exchange Active Sync (EAS) IMAP WNS
Leverage Windows and existing code • Use Windows controls • Leverage existing code as WinRT components • Store enables rapid release of updates
//build/ • Powerful on all devices • Leverage Windows and existing code • Nailing performance
Build in performance from the beginning • Define the scenarios performance up front • Analyze often and on ARM devices • Use Visual Studio and Windows Performance Analyzer
Faster Performance 36% savings
Scheduler • WinJS.Utilities.Scheduler • Enables a responsive experience • Allows you to pre-build UI you’ll need later
Scheduling Today ? Task App Code Task setImmediate(); Task Task WinJS Code Task setImmediate(); Task Task System Code Task setImmediate(); Task
Scheduling Today ? Task App Code Task Task Task WinJS Code Task Task Task System Code Task Task
Scheduling with WinJS Scheduler Task App Code Task schedule(func, pri); Task Task WinJS Code Task schedule(func, pri); Task Task System Code Task schedule(func, pri); Task
Scheduling with WinJS Scheduler Task App Code Task Task Task WinJS Code Task Task Task System Code Task Task
Using WinJS Scheduler • setImmediate(foo); • varS = WinJS.Utilities.Scheduler; • S.schedule(foo, S.Priority.normal); • or • S.schedule(foo, S.Priority.high); • or • S.schedule(foo, S.Priority.idle);
Web workers • Great for computation and data access • Can’t access the UI thread • Consider building large custom controls as a string
default.js • varworker = new Worker(“worker.js”); • varcontentElement = document.getElementByID(“mainContent”); • worker.onmessage= function(e) { • contentElement.innerHTML = e.data; • };