This webinar presentation covers how to use the Windows Phone SDK 8.0 in developing applications that will work for both Windows Phone 8 and Windows Phone 7. Michael Samarin of Futurice explains how to update your existing Windows Phone 7 application by adding new features using APIs available in Windows Phone 8. He also describes how to create a Windows Phone 8 application and make it work for Windows Phone 7 users. An overview of the available approaches to multirelease compatibility is provided along with useful tips and tricks to help you make the most of the Windows Phone market.
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
LUMIA APP LABS: DEVELOP APPS THAT WORK FOR BOTH WINDOWS PHONE 8 AND WINDOWS PHONE 7
1. LUMIA APP LABS #5
DEVELOP APPS THAT WORK
FOR BOTH WINDOWS
PHONE 8 AND WINDOWS
PHONE 7
Michael Samarin
Director,
Developer Training
Futurice Ltd.
http://www.futurice.com
2. LUMIA APP LABS #5
- Windows Phone 8 is new development
platform
- Opportunity for developers to target both
Windows Phone 7 and 8, because of
installed base and similarities of platforms
- Windows Phone 7 code works without
changes, but with potential alterations in
runtime behavior
- Like with any cross platform development, there is no magic, but
creative thinking and hard work for developers
- Identify unique aspects and APIs of Windows Phone 8 that are
specific to your app
- Always try to decouple UI from business logic as much as you can
3. LUMIA APP LABS #5
Important MSDN Resources when
targeting both platforms WP7 / 8:
What’s new in Windows Phone 8:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206940(v=vs.105).aspx
Multi-resolution Apps:
http://msdn.microsoft.com/en-US/library/windowsphone/develop/jj206974(v=vs.105).aspx
How to upgrade an app project to Windows Phone 8:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207030(v=vs.105).aspx
App platform compatibility:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206947(v=vs.105).aspx
4. LUMIA APP LABS #5
Multiple Resolutions on Windows Phone devices (MSDN):
Delta from
Aspect Scaled
Resolution Resolution Windows Phone
ratio resolution
OS 7.1
None. This is the
only supported
WVGA 480 × 800 15:9 resolution for 480 × 800
Windows Phone
OS 7.1.
WXGA 768 × 1280 15:9 1.6x scale 480 × 800
1.5x scale, 80
pixels taller (53
720p 720 × 1280 16:9 480 × 853
pixels, after
scaling)
Multi-resolution Apps:
http://msdn.microsoft.com/en-US/library/windowsphone/develop/jj206974(v=vs.105).aspx
5. LUMIA APP LABS #5
Option #1
• Develop Windows Phone 7 (WP7) App
• Single project with WP7 build target
• Deploy to both WP7 / 8
• Be aware of “quirks mode” and breaking changes when
deploying to WP8
• Study carefully app platform compatibility:
http://msdn.microsoft.com/en-
us/library/windowsphone/develop/jj206947(v=vs.105).aspx
6. LUMIA APP LABS #5
Option #2
• Develop Windows Phone 7 (WP7) App
• Single project with WP7 build target
• Duplicate project and upgrade to WP8
• Maintain separate projects and build to both WP7 / 8
• Study carefully potential upgrade issues:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207030(v=vs.105).aspx
7. LUMIA APP LABS #5
Option #3
• Develop and maintain separate WP7 and WP8
projects
• Isolate reusable code into separate class files
• Add classes as linked files to both projects
• Use if needed compile time and runtime
conditions:
#if WINDOWS_PHONE7 if (Environment.OSVersion.Version.Major < 8)
... {
#elif WINDOWS_PHONE8 ....
.... }
#endif
8. LUMIA APP LABS #5
Option #4 (Only with VS Pro)
• Develop and maintain separate WP7 and WP8
projects
• Create project type Portable Class Library
• Isolate reusable code into Portable Class
Library
• Add Portable Class Library as reference to
both projects
• Can be used even without recompilation
9. LUMIA APP LABS #5
HANDS-ON SESSION
To view the demonstration, please refer to
the webinar recording at the end of this
slideset.