Windows 8 Integration: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 54: | Line 54: | ||
*"Chakra" engine uses metadata to generate js/html projections of WinRT objects dynamically | *"Chakra" engine uses metadata to generate js/html projections of WinRT objects dynamically | ||
=== | === WinRT / Win32 / COM === | ||
* Win32 & COM support [http://msdn.microsoft.com/en-us/library/windows/apps/br205757%28v=VS.85%29.aspx Link] | * Win32 & COM support [http://msdn.microsoft.com/en-us/library/windows/apps/br205757%28v=VS.85%29.aspx Link] |
Revision as of 13:13, 28 October 2011
Intro
Microsoft Windows 8 will be the next version of the Windows operating system which is aimed at desktops, laptops, netbooks, tablets, servers, and media center PCs.
A major part of Windows 8 is the introduction of Metro-style applications which are based on a new application development and distribution framework. This document will summarize the changes and challenges of Metro-style development of 3rd party browsers.
Access
Everyone doing work in this area should have access to early builds. What’s needed to accomplish this?
- What type of MSDN / Connect access is needed for access to early builds and betas?
Internet Explorer 10
- TBD
Windows Store
- Big question: would we have licensing issues similar to iOS ports?
- "Store policy and various runtime restrictions automatically exclude certain types of apps, which can only be implemented as desktop apps." (link)
- We need clarification on this before we invest resources on a Metro browser.
- Automatic updating - working within the confines of Microsoft's update mechanism
Metro Architecture
- Unlike Desktop, Metro apps will ONLY be available through the Windows store.
- There are no overlapping windows, nor traditional popup windows, everything is chromeless, everything is designed to be consistent across applications.
- Some interprocess communication is possible within Metro, but it is very limited.
- Not possible to simply and easily port existing apps to Metro. A significant amount of conventional desktop functionality will not be available.
- A second app can be shown in Metro app with the snap state. It is shown side by side and you can determine the width of each window via a separator.
- The top and bottom edges are for per app toolbars. The left and right edge are reserved for system toolbars (This my require Fennec redesign if we end up using it for Metro).
- You can schedule popup notifications when your Metro app is not running.
Language support
- Based on WinRT APIs, applications can be built in Javascript, C++, C#, or VB.NET
- WinRT is available in each language through the `Windows` namespace
C++
- Compiles to native code but has some extra syntax flare.
HTML and Javascript
- WinJS library provides access to WinRT
- "Chakra" engine uses metadata to generate js/html projections of WinRT objects dynamically
WinRT / Win32 / COM
Sandboxing
- TBD
Graphics
- Subset of Direct2D, Direct3D, DirectWrite drawing apis supported. Link
Networking
Suspend/resume
- Most of this info comes from this video on Metro app suspension
- There is no multi-tasking of Metro apps: Only one app runs unsuspended at a time, apps are suspended when not in foreground
- Desktop is treated as one app; all other Metro apps are suspended when desktop is active
- Upon suspension, app gets notification that it is being suspended
- At this point, app must save state because it could be terminated later without notice
- App gets 5s to handle suspend, otherwise crashes
- During suspension
- App is not scheduled by the NT kernel
- No CPU, Disk, Network consumption
- All threads suspended
- App remains in memory
- App is instantly resumed when brought to foreground
- Suspension best practices:
- Save state quickly (<5s)
- Assume you will be terminated: Save user session data
- Update app's tile
- Release exclusive access to shared resources (files, devices, network, etc)
- Save app data incrementally before suspend
Live tiles
- Apps that have tiles implement the `Windows.Launch` contract
- Tile is specified by an XML file that follows a template (limited number of templates provided by Windows?)
- Tile (XML) can be updated while app is running
- Tile can be updated using push notifications
- Push new tile XML to a URI provided by "Windows Push Notification Service" (WNS)
- WNS pushes tile to user's device
Contracts
- There is a new concept called contracts for interconnection/sharing with different metro apps.
- Implementing contracts provides more integration with the OS (e.g. with the "charms" toolbar)
- Known contracts are:
- Windows.BackgroundTasks
- Windows.File
- Windows.FilePicker
- Windows.Launch - Apps that implement this get a tile in the Windows 8 Metro "desktop"
- Windows.Protocol
- Windows.Search
- Windows.ShareTarget
- Information about which apps fulfill each contract is maintained in the registry
- HKCU\Software\Classes\Extensions\ContractId
- One key for each type of contract, subkeys are registrations for all extensions that implement that contract
- Apps can be activated through the contracts they implement
- Event args provide context