1 / 61

Windows 7

Windows 7. Make your application compatible. Paul van Wingerden Developer & Platform Group paulvanw@microsoft.com. Agenda. Analyzing and fixing Appverifier Virtualizing UAC properties/ TaskMan Demo Open VS2008, import, change code,run setup Show Compatibility Administrator Logo.

mansour
Télécharger la présentation

Windows 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows 7 Make your application compatible Paul van Wingerden Developer & Platform Group paulvanw@microsoft.com

  2. Agenda • Analyzing and fixing • Appverifier • Virtualizing UAC properties/TaskMan • Demo • Open VS2008, import, change code,run setup • Show Compatibility Administrator • Logo

  3. Incompatible by Design • Version checking for a specific OS release • Structure of private data and data types • Patching OS calls • Using Registry Values instead of APIs • Redistributing Windows Updates • Device Drivers without hardware

  4. Version Checking • Applications check Windows OS version and block themselves • If absolutely needed, check for >= OS version • Don’t block. • Present a warning message • Allow applications to continue • Check for existence of specific features if that is important • Windows 7 is version 6.1

  5. Version Checks – Stop doing this LPCWSTR lpwzDll = NULL; OSVERSIONINFOW osvi; ZeroMemory(&osvi, sizeof(osvi)); osvi.dwOSVersionInfoSize = sizeof(osvi); if (!GetVersionEx(&osvi)) { return FALSE; } // Determine which dll to load if (osvi.dwMajorVersion >= 5 && osvi.dwMinorVersion >= 1) { lpwzDll = L"Apphelp.dll"; // XP and newer OS, use Apphelp } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) { lpwzDll = L“SdbApiu.dll"; // Windows 2000, use sdbapiu } else { lpwzDll = L“SdbApi.dll"; // Older Version, use sdbapi } return LoadLibraryFromSystem32(lpwzDll);

  6. Do This: HMODULE hMod; hMod = LoadLibraryFromSystem32(L"Apphelp.dll"); if (hMod) return hMod; hMod = LoadLibraryFromSystem32(L"sdbapiu.dll"); if (hMod) return hMod; hMod = LoadLibraryFromSystem32(L"sdbapi.dll"); if (hMod) return hMod;

  7. “Contoso Contacts” Demo Fixing the application

  8. ALPHA RELEASE WALK-THROUGH Windows 7 software logo TOOLKIT

  9. Overview Alpha Release Objectives: Provide software publishers a quick and agile, automated, light weight command-line tool to verify their application’s compliance against the Windows 7 Software Logo requirements. Minimum System Requirements: • 1GHz 64bit (x64) Processor • 1gb Ram • 40gb hard drive with a minimum of 15gb free space • Clean, 64bit, Windows 7 installation

  10. To Get Help c:\Program Files\Microsoft Logo Tool\logtest.exe /? Note: Logotest.exe must be run in a command window with administrative permissions

  11. HOW TO TEST AN APPLICATION

  12. Step 1: Invoke LOGOTEST With /PREINSTALL Flag c:\Program Files\Microsoft Logo Tool\logotest.exe /preinstall /32bit or /64bit

  13. Step 2: Install Your Application

  14. Step 3: Invoke LOGOTEST with /POSTINSTALL Flag c:\Program Files\Microsoft Logo Tool\logotest.exe /postinstall

  15. Step 4: Run Your App To Check/Verify Functionality* • * Note: Restart manager tests can report false positives with run-once and auto-updater modules. Best to disable any.

  16. Step 5: Invoke LOGOTEST with /PREUNISTALL Flag c:\Program Files\Microsoft Logo Tool\logotest.exe /preuninstall

  17. Step 6: Uninstall Your Application

  18. Step 7: Invoke LOGOTEST with /POSTUNINSTALL Flag c:\Program Files\Microsoft Logo Tool\logotest.exe /postuninstall

  19. Step 8: Generate The XML Report c:\Program Files\Microsoft Logo Tool\logotest.exe /createreport <path\filename.xml>

  20. Interpreting The Results Verify the result (pass/fail) for each requirement and their corresponding tests via the generated .xml log file created in step #8. Results as raw .xml results Results with applied .xsl stylesheet

  21. Internet Explorer 8

  22. Internet Explorer 8.0The Enterprise Ready Browser • The richest experience on the web • Web Slices • Accelerators • Visual Search • InPrivate Users Developers • Develop, test and debug without leaving the browser • Built-in developer toolbar and code profiler • Change Internet Explorer layout version on the fly • Compatibility and Interoperability IT Pros • Built for the Enterprise • Trust • Security • Supportability • Manageability

  23. What’s New For Developer • CSS Improvements • CSS 2.1 compliance. • Limited CSS 3.0 compliance • Data URI Support • W3C's ARIA Support for Accessibility • Alternate style sheets support • DOM Core Improvements

  24. What’s New For Developer • Improved HTML 4.01 support • jscript improvements • Big improvements in array and string operations in engine • Better memory improvement • Native support for JSON • Results in 10X performance gain while serialization/ 3X performance for deserialization

  25. What’s New For Developer • AJAX Improvements • AJAX Navigation- back and forth navigation within AJAX • DOM Storage- simple store and retrieve key-value pairs • Network Connectivity Events • Number of connections per host increased from 2 to 6 • Enhanced XMLHTTPRequest with timeout support • Cross-domain request(XDR) and Cross-Domain Messaging(XDM)

  26. Developing for Standards Mode • Author pages against latest web standards supported by IE 8 • Use a standards mode DOCTYPE • Example : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> • Make sure you use condition comments for legacy versions of IE • Version Vector or CSS 2.1 <!--[if gte IE 8]> <link rel="stylesheet" type="text/css"href="/stylesheets/standards.css" /> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css"href="/stylesheets/ie.css" /> <![endif]--> 

  27. Compatibility

  28. IE History And Compatibility • IE5.5 and earlier • Very little standards supports. Most pages were coded for a browser- what we call the “quirks mode” • Microsoft released IE6 in 2001 • Very few pages were built for standards • DOCTYPE was used to differentiate standards pages and “quirks mode” pages • Microsoft released IE7 in 2006 • Improved standards compliance • Standards compliance was limited to “standards mode” to allow sites to opt-in for standards and minimize compatibility problem • IE8 • Most standards compliant browser • Supports ability to run in standards mode or compatibility mode (IE7 standards or quirks mode)

  29. Standards Compliance • CSS 2.1 compliance • DOM Improvements • HTML Improvements • Acid2 Test compliance • This means • Data URI Support • Improved Namespace Support • And more CSS 2.1 HTML ACID 2

  30. Today Developers Build Multiple Versions of Websites 1. Identify browser 2. Serve right page Page Built For IE7 Page Built To Standards Page Built For IE6 I’m Safari I’m Firefox I’m IE6 I’m IE7 7 6

  31. Internet Explorer 8 Interoperability 1. Identify browser 2. Serve right page Page Built To Standards I’m Safari I’m Firefox I’m IE8 8

  32. Compatibility Support Positive User Experience Undefined User Experience More Developer Resources Fewer developer resources 4. Rely on the Compatibility List 2. Implement the X-UA-Compatible Tag 1. Code to IE8 Standards 3. Display Intranet Sites in Compatibility Mode or rely on group policy settings 5. Rely on User Pressing Compat Button

  33. IE8 Backwards Compatibility • IE8 ships with both IE8 and IE7 rendering engine • Ensures that applications render the same as in IE7 • Many ways to enable compatibility view • Per Site: Custom HTTP Header X-UA-Compatible: IE=EmulateIE7 • Per Page: <meta http-equiv=X-UA-Compatible” content=“IE=EmulateIE7”/> • User Opt-in • Compatibility View button • Group Policy • Standards mode vs. IE7 Emulation • Enable updated compatibility web site list from Microsoft • New feature in RC1

  34. Compatibility Button • Allows user to toggle between IE8 mode and compatibility view mode through a simple click!

  35. Compatibility Elements • Browser Compatibility determined by • Browser mode • Meta tag • Compatibility Mode effected by • Valid DOCTYPE • Meta tag set in page or site • Compatibility view button

  36. Meta Tag Document Mode <meta http-equiv=X-UA-Compatible” content=“IE=XXX”/> • Reported by document.documentMode property. Content can have following values: • IE=5 - quirks mode – similar to IE5.5 rendering • IE=7 - IE7 standards (strict) mode • IE=8 – IE8 Standards mode • IE=EmulateIE7 - Emulate IE7 mode • Honors DOCTYPE - IE 7 Standards/quirks mode • Emulate IE8 mode [IE=EmulateIE8] • Honors DOCTYPE- IE 8 Standards/quirks mode • Removes application from compatibility list • IE=edge- uses latest standards of IE8 and future versions • Not recommended for production sites.

  37. User Agent String • User Agent String • Browser’s identity as reported via HTTP traffic • navigator.userAgent property • Used mostly by server side script or code to emit appropriate document to client based on browser • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; Tablet PC 2.0; InfoPath.2; .NET CLR 3.5.21022; MS-RTC LM 8; .NET CLR 3.5.30729; .NET CLR 3.0.30618)

  38. Version Vector • Version Vector • IE version number used in conditional comments • Used mostly by client side script in the browser • <!—[if gte IE 8]> • <p> IE8 and greater will receive this markup</p> • <![endif]>

  39. Version Detection • Setting to emulate IE7 mode changes the rendering engine/ version vector • …but not the user agent string • Page logic may emit markup meant for IE8 • Even though emulate IE7 is turned on • End result is that “emulated” pages can still break

  40. Loosely Coupled Internet Explorer • Architectural change to improve reliability, performance, and scalability • Internet explorer Process model has changed • Improves reliability of browser with broken toolbars and add-ins • Changes IE Window Hierarchy • Could effect compatibility of extensions- UI toolbar, BHO and ActiveX controls that rely on window position or IE process window hierarchy

  41. IE7 Process Model

  42. IE8 LCIE Process Model

  43. Tools

  44. Integrated Developer Tools Developer Toolbar • No additional install. Just press F12! • Eases development and troubleshooting • Allows real-time testing, editing, debugging: • CSS and HTML • Script performance • DOM • Enables developers to rapidly prototype, test, and deploy web sites

  45. Improved Debugging Break Point Debugging Toolbar JavaScript Debugging Window JavaScript Debugging Tools

  46. Robust Tracing

  47. Code Profiling

  48. Demo Internet Explorer developer Tools

  49. Call To Action • Short Term • Test a site in IE8 standards mode. • Check if the site works with compatibility button • Medium Term • Use developer tools to switch browser mode and test the different site behavior • Add the meta tag in pages/across site to get it working in previous rendering modes- • IE=EmulateIE7 is the preferred mode. Works for most sites. • Long Term • Use developer tools to identify IE8 standards compliance issues and fix them • Remove meta tag / compatibility setting and move the pages/site to IE8 standards mode

  50. Windows Error Reporting Services Make your app more robust Paul van Wingerden paulvanw@microsoft.com Microsoft B.V.

More Related