3. agenda Two part session The basics Build app from File -> New… Advanced tips and tricks Loads of content Caveat: this is NOT a marketing session on how cool the phone is… This is how to build a application end-to-end Feel free to ask questions ANY time... Windows Phone 7 App Smackdown
6. hardware foundation Capacitive touch 4 or more contact points Sensors A-GPS, Accelerometer, Compass, Light, Proximity Camera 5 mega pixels or more Multimedia Common detailed specs, Codec acceleration 800 Memory 256MB RAM or more, 8GB Flash or more GPU DirectX 9 acceleration CPU Qualcomm MSM8x55 1Ghz (800Mhz) or higher 480 Hardware buttons | Back, Start, Search Qualcomm MSM7x30 & Gyroscope
7. common platform capabilities .NET Superset of Silverlight 3.0 Input Touch Hardware buttons Media Digital media capture & playback Media library access Data Isolated storage LINQ Object XML WCF SOAP & REST services Phone Access Integrated access to phone UI Sensors Pickers for contacts and photos Integrated with Cloud Services App deployment & Updates Notifications Location Xbox LIVE
8. Two flavours of applications Silverlight XNA Modern XAML/event-driven application UI framework Rapid creation of visual stunning applications Metro-themed UI controls 500,000 developers spanning Windows and web High performance game framework Rapid creation of multi-screen 2D & 3D games Rich content pipeline Mature, robust, widely adopted technology spanning Xbox 360, Windows and Zune XNA/Silverlight Interop
9. silverlight for windows phone Silverlight for Windows Phone is… Silverlight 3 minus a few things that didn’t make sense plus a few Silverlight 4 things that did plus phone specific API & “under the hood” improvements Silverlight 4 compatibility (1500+ new APIs)
11. navigation Applications are built like web sites Functionality is split into pages Forward navigation via links Backward navigation via Back Previous applications (pages) are in the back stack Can override back button behavior (but be careful) Transient pages Payload can be send with navigation request NO back to home buttons!!! Deep linking
13. familiar web concepts Phone application Provides UI represented as XAML pages connected into cross-app flows by URI’s Web application Provide media represented as HTTP resources linked by URL’s Shell frame Requests pages, renders UI, and handles navigation across apps Web browser Requests HTTP resources, renders them, and handles navigation across sites History and tabs Groups together sequences of HTTP resources corresponding to a user’s activity across sites Sessions and back stack Groups together sequences of pages corresponding to a user’s activity across apps
14. launchers and choosers Windows Phone execution model isolates every application in its own sandbox Apps cannot directly access information stores such as contacts Cannot directly invoke other applications such as phone or messaging Launchers and Choosers allow applications indirect access to the useful phone features Launchers and Choosers APIs invoke distinct built-in applications that replace the currently running applications
15. launchers and choosers Launcher Launches one of the built-in applications though which a use completes a task No data is returned to calling application Example: PhoneCallTask Chooser Launches one of the built-in applications through which a user completes a task and which returns some data to calling application When caller completes, calling application is activated and supplied with the Chooser result Example: PhotoChooserTask
18. choosers and the execution model IMPORTANT! When you launch a Launcher or Chooser, your app is terminated When task completes, your app may be reactivated and a new app instance created (SOMETIMES) The following choosers and tasks have relaxed thombstoning policy PhotoChooserTask CameraCaptureTask MediaPlayerLaunchTask EmailAddressChooser PhoneNumberChoose
22. panorama vs pivot Pivot Panorama Filter same data on different views (the “inbox” is a great example of this) Optimized for current screen size Filter of data doesn’t have to be same view (agenda/day) Related content is ok to pivot on as long as related content is truly related Focused “Virtualized” Horizontal broad canvas, not confined to current screen size A ‘top layer’ view into underlying experiences/tasks Use white space Performance -> Panorama loads all the pages on startup Exploratory in nature
24. misuse of common controls Use the WP7 common controls appropriately. Don’t use sliders, toggles or map controls under panoramas or pivots –as they both need the same gestures to work.
25. MVVM on the Phone Singleton App.xaml Model PhoneApplicationPage ViewModel PhoneApplicationPage PhoneApplicationPage PhoneApplicationPage View Data Bindable properties Business logic PhoneApplicationFrame PhoneApplicationPage Controls Code-behind Wanna learn more? Check out Silverlight Kung-fu Starting 16:30 @ track 3
27. networking on the phone Support for networking features WCF/ASMX HttpWebRequest WebClient No cross-domain policy file required Not supported Sockets Custom WCF Bindings WCF RIA Services NTLM authentication
28. WCF/ASMX services Can “Add Reference” from Windows Phone projects to automatically generate proxy classes ASMX should just work WCF requires that you use basicHttpBinding
29. OData Server: WCF Data Services provides an extensible tool for publishing data using REST based interface Publishes and consumes data using Odata web protocol Format is XML or JSON Client: Download Odata Client Library for Windows Phone http://odata.codeplex.com/ FULL parity with Silverlight (Including LINQ and Add Service Reference support)
31. HTTPWebRequestvsWebClient Use HttpWebRequest whenever possible Use background thread and marshal back to UI thread (Using Dispatcher.BeginInvoke) WebClient is “easier” to use but happens on the UI thread no matter where it was spawned (Bug) 6 Parallel requests limit WebClient bug fixed
32. marketplace Enhanced Discovery Easy to find great applications & games Fun to browse the marketplace Simple & Reliable Acquisition Try before you buy Buying and downloading content is a breeze Payment flexibility (Monthly billing and credit card) Easy application updates South Africa WILL BE supported…
33. marketplace It costs nothing to download the Windows Phone SDK and write code using the emulator To sell applications you need to register as a developer This costs $99 a year and allows you to publish any number of fee applications and up to 99 free applications Each additional application costs $20 Students can sign up for free Revenue sharing (30/70)
34. yalla apps Are you looking for a viable alternative to publish your WP7 Apps to the Windows Phone Marketplace? Yalla Apps provides the solution by publishing your apps to the Marketplace on your behalf. Publish your apps to the Windows Phone marketplace and unlock your device for testing Share and download code in the Module Market Smooth certification process Join the developer community
35. yalla apps Updated Device Unlocking Yalla Apps offers a device unlock service which allows you to unlock your Windows Phone 7 to debug and test applications. The device unlock is accomplished using remote assistance access to your development machine and charged 0 Credits for the first device and 50 credits per additional device.