Firefox/Windows 8 Integration: Difference between revisions
< Firefox
Jump to navigation
Jump to search
(→Links) |
No edit summary |
||
Line 3: | Line 3: | ||
[[file:WIndows8Breakdown.png|sreenshot]] | [[file:WIndows8Breakdown.png|sreenshot]] | ||
= 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 | |||
= Metro support in Windows 8 = | = Metro support in Windows 8 = | ||
*Unlike Desktop, Metro apps will ONLY be available through the Windows store. | *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. | *There are no overlapping windows, nor traditional popup windows, everything is chromeless, everything is designed to be consistent across applications. | ||
*Interprocess communication is not possible. (no electrolysis?) | *Interprocess communication is not possible. (no electrolysis?) | ||
*Not possible to simply and easily port Firefox as a Metro application. A significant amount of Win32 APIs will not be available in Metro. | *Not possible to simply and easily port Firefox as a Metro application. A significant amount of Win32 APIs will not be available in Metro. | ||
*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. | *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). | *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. | *You can schedule popup notifications when your Metro app is not running. | ||
== | == Contracts == | ||
*There is a new concept called contracts for interconnection/sharing with different metro apps. | |||
*The 5 main contracts are: Search, Share, Start, Devices, and Settings. | |||
*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 | |||
== 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 | |||
== Suspend/resume == | |||
* | *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 | *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 | *Upon suspension, app gets notification that it is being suspended |
Revision as of 21:16, 28 September 2011
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 the new WinRT APIs. This page will cover both Windows Metro integration and changes for existing Desktop integration.
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
Metro support in Windows 8
- 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.
- Interprocess communication is not possible. (no electrolysis?)
- Not possible to simply and easily port Firefox as a Metro application. A significant amount of Win32 APIs will not be available in Metro.
- 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.
Contracts
- There is a new concept called contracts for interconnection/sharing with different metro apps.
- The 5 main contracts are: Search, Share, Start, Devices, and Settings.
- 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
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
Suspend/resume
- 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
Registering callbacks for suspend and resume (JS)
//Register for the Suspending event and call suspendingHandler when received Windows.UI.WebUI.WebUIApplication.addEventListener("suspending", suspendingHandler); //Handle the suspending event and save the current user sesssion using WinJS sessionState function suspendingHandler(eventArgs) { //We are getting suspended } //Register for the Resuming event and call resumingHandler when received Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler); function resumingHandler() { //We are getting resumed, in general do nothing }
Desktop changes in Windows 8
- The start menu is removed. Clicking it now takes you to the Metro interface.
- It is unclear whether or not there will be Desktop support for ARM. If there is support, there will NOT be an emulation layer like WOW64 for x86 apps.
- Desktop apps do not get suspended when switching to Metro.
- There are taskbar imporvements for multi monitor (taskbar spanning)