windows phone 7 developer guide
DESCRIPTION
Windows Phone 7 Developer Guide. A guide to 3 screens and the cloud. Scott Densmore Sr. Software Development Engineer Microsoft patterns & practices. About you (an assumption). You… are a developer know C# are building applications for Windows Phone 7 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/1.jpg)
WINDOWS PHONE 7 DEVELOPER GUIDE
A guide to 3 screens and the cloud
Scott DensmoreSr. Software Development Engineer
Microsoft patterns & practices
![Page 2: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/2.jpg)
ABOUT YOU (AN ASSUMPTION)
• You… • are a developer• know C#• are building applications for Windows Phone 7• are building applications for other mobile platforms• want to connect your mobile application to the cloud
![Page 3: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/3.jpg)
GOALS FOR THIS SESSION
• Intro Windows Phone 7• How to build applications for Windows Phone 7
• Simple examples• How to connect your Windows Phone 7
application to the cloud• TailSpin survey application connected to Windows
Azure
![Page 4: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/4.jpg)
WINDOWS PHONE 7
![Page 5: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/5.jpg)
METRO
![Page 6: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/6.jpg)
METRO
• Clean, light, open, fast• Celebrate typography• Alive & in motion• Content not chrome• Authentically digital
Metro Principals
![Page 7: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/7.jpg)
WHAT ARE YOU BUILDING?Silverlight vs XNA
![Page 8: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/8.jpg)
WHAT ARE YOU BUILDING?
• Performance is impressive, especially in 3D• Hardware based graphics acceleration
• There are some very interesting input options• You can use all the hardware and sensors in
your Windows Phone games• Potential for Xbox Live integration
• Support for Avatars and Achievements• Support for in-game advertising
• Viable alternative to charging for your code
XNA
![Page 9: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/9.jpg)
WHAT ARE YOU BUILDING?
• Do not try to adapt an existing UI design directly to the phone
• Design for both portrait and landscape• Place menus and other options at the bottom so
the users hand does not obstruct the rest of the content
• Provide feedback to actions• Set the InputScope for text controls• Follow the Windows Phone 7 Design Guidelines
Considerations
![Page 10: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/10.jpg)
DEMO
What are you building?
![Page 11: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/11.jpg)
CONNECTIVITY
![Page 12: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/12.jpg)
CONNECTIVITY
• Device is occasionally connected• Signal can switch between Wi-Fi to GPRS
(General Packet Radio Service)• Have an offline experience
Considerations
![Page 13: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/13.jpg)
DEMO
Connectivity
![Page 14: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/14.jpg)
SHARED ENVIRONMENT
![Page 15: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/15.jpg)
SHARED ENVIRONMENT
• Minimize device resource usage• e.g. Only enable GPS when you need it
• Use async programming techniques • Reactive Extensions
• Optimize memory usage• Maximize GPU usage• Do not use all of the storage for your application• Mango – Multi-tasking
Considerations
![Page 16: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/16.jpg)
STORAGE
![Page 17: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/17.jpg)
STORAGE
• Isolated storage is used to store data
• 256 MB of memory and to 8 GB of flash
• Serializable collections is a good way to store data
• Third party databases are available
• Mango – includes SQL CE
hardware
phone storage
![Page 18: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/18.jpg)
STORAGE
• Use the DeviceExtendedProperties to check for memory installed and avialble
• Clean up resources that are no longer needed• Consider using a cache to improve performance• Compress data or use data formats that are
compact (JSON / Binary)
Considerations
![Page 19: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/19.jpg)
SECURITY
![Page 20: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/20.jpg)
SECUIRTY
• Use HTTPS when connecting to services• Encrypt data that you store on the phone• User HTTPS when communicating with the Push
Notification Service• Do not store sensitive data and keys on the
device• Mango – DPAPI
Considerations
![Page 21: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/21.jpg)
INTERRUPTIONS
![Page 22: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/22.jpg)
INTERRUPTIONS
• Many events can cause interruptions on the phone• Camera task• Email task• A phone call
• Handle the events exposed by the operating system to save state of the application (Tombstoning)
Considerations
![Page 23: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/23.jpg)
DEMO
Tombstoning
![Page 24: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/24.jpg)
TAILSPINWhy Phone + Cloud?
![Page 25: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/25.jpg)
BUILDING THE CLIENT
![Page 26: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/26.jpg)
BUILDING THE CLIENTOverview
![Page 27: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/27.jpg)
BUILDING THE CLIENTMVVM
![Page 28: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/28.jpg)
DEMO
Building the Client
![Page 29: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/29.jpg)
CONNECTING TO THE CLOUD
Why Phone + Cloud?
• The cloud levels the playing field
• The cloud provides a larger pool of resources from which to pull
• The cloud provides a way to reach across device platforms
![Page 30: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/30.jpg)
CONNECTING TO THE CLOUD
• HTTP-based, request/response• Framework choices (WCF, OData, WebRequest,
etc.)• Wire format choices (SOAP, JSON, POX, etc.)
Services
![Page 31: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/31.jpg)
CONNECTING TO THE CLOUDTailSpin Services
![Page 32: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/32.jpg)
CONNECTING TO THE CLOUDPush Notifications
HTTP Post to URI with payloadPush URI request/response
Push enabled application
Push client service
1
Push client/server negotiation
2
3
Push URI to Cloud Service 4
5
Push notification to device6
Cloud Service
MPNS
Windows Phone 7
![Page 33: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/33.jpg)
CONNECTING TO THE CLOUDTailSpin Push Notifications
![Page 34: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/34.jpg)
DEMO
Connecting to the Cloud
![Page 35: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/35.jpg)
RESOURCES
• WP7 Book• http://wp7guide.codeplex.com
• Windows Phone 7• http://www.windowsphone.com
• Me• [email protected]• @scottdensmore• http://scottdensmore.typepad.com
![Page 36: Windows Phone 7 Developer Guide](https://reader035.vdocuments.site/reader035/viewer/2022062501/5681623d550346895dd27293/html5/thumbnails/36.jpg)
QUESTIONS?After the session please fulfil the questionnaire.
Questionnaires will be sent to you by e-mail and will be available in the profile section of the NT Conference website www.ntk.si .
Thank you!