Your SlideShare is downloading. ×
Windows phone 7
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Windows phone 7

637

Published on

Mobile March 2012

Mobile March 2012

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
637
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • This presentation covers the strengths of the Windows Phone 7 platform when compared with Android and iOS. It is not an exhaustive talk on Windows Phone 7 (i.e., it won’t show you how to drop a browser control on your app or listen to accelerometer events), but it will give you a sense of how the WP7 platform compares to it’s competition.\n\n\n\n
  • In this talk, we will walk through a sample MVVM based application, focusing on the various applications layers. We then discuss Windows Phone 7 platform “shell” - the operating system features that we can use to integrate our application into the rest of the Windows Phone 7 OS. We also look into the platform tools, including the application profiler and the marketplace test tool. We conclude by looking at the roadmap of WP7, how it plays into Windows 8, and general direction that has been leaked in the press regarding Windows Phone 8.\n
  • From Visual Studio 2010, create a new data binding application.\n\nWindows Phone 7 is based on Silverlight - therefore it uses the same XAML based layout engine that is found in Silverlight and WPF. When designing XAML, you should have the mindset of an HTML developer - create the layout and data elements, use styles that are defined in resource files (i.e., CSS), and have the code-behind files control the interaction between the rest of the system and the UI (i.e., javascript).\n\nWindows Phone 7 has a box model (padding, margin) and layout is relative to it’s parent controls (think HTML).\n\nDynamic layout in iOS is a real pain. Creating a “grid” in iOS results in reams of hand written layout code. From the new data binding application, lengthen the text and illustrate the simplicity of dynamic layout.\n\n* Remove Height property on listBox - show dynamic layout\n* Add TextTrimming=Trim in title (show truncation).\n\nResources \n\nResources are containers at the application and page layers that we can use to put templates and other state that can be reused. Resources can include styles, strings, or any other object we would like.\n\nStyles | Templates\n\nSimilar to CSS, we can define styles that we can reuse across controls. We can also define templates (i.e., the layout of a listbox) that can be reused across multiple controls. iOS has no concept of control styling.\n\n \n \n\n\n
  • Binding allows us to link two objects together. In Windows Phone 7, any “DependencyProperty” on a UI control can be bound to a property on another object. For example, we can bind the TextBox “Text” property to a “FirstName” property on a “Person” object.\n\nEstablishing a binding relationship only takes a few steps:\n\n1. Create an object that implements INotifyPropertyChanged. For lists, use ObservableCollection<T>. The binding infrastructure uses the INotifyPropertyChanged event to update the other side of the binding relationship.\n2. Assign a “DataContext” of a UI element to the object. Note that DataContext cascades the object tree. A UI element will inherit the DataContext of it’s parent element if it’s DataContext property is not set.\n3. Set the “binding” property of a UI control to point to a property of the object in the data context.\n\n* Property Path: allows you to bind to nested properties.\n* Mode = OneWay (default), TwoWay, OneTime\n\nValidators and Converters:\n\nValidators allow us to validate and convert data. By specifying a validator on the binding relationship, the validator will validate the value prior to assigning it to the other side of the binding relationship.\nConverts allow us to convert the binding value when going to/from it’s original value. For example, a DateTime object can be converted to a custom string format when being presented to the UI and is converted from the custom string format when being sent back to the data source.\n\n\n
  • LINQ is a powerful language feature of C# that allows you to write queries against an object model. For example, using LINQ, we can filter and sort a collection using a custom predicate function (for filtering) and a custom comparator (for sorting). \n\nLINQ to SQL is an ORM tool that allows us to define classes that represent data and gives us the ability to query into the database via LINQ queries. \n\nLINQ to SQL cliff notes:\n\n1. Create a class attributed with [Table]. Create properties attributed with [Column].\n2. Create a DataContext that includes those tables.\n3. Write queries that use the DataContext to do CRUD operations against the tables.\n\n\nVersioning:\n\nWP7 provides a “DatabaseUpdateSchema” object which allows us to add tables and/or columns to an existing database. It also has a “Version” property that we can use to determine and change the database version.\n\nWarning:\n\nBy default, all objects obtained through a DataContext are tracked. Thus, when you call a “save” on the DataContext, all objects retrieved from the context will be updated in the database. You want to ensure only the objects you *want* updated are actually updated. Create a “write” data context that you use to retrieve and save only the objects you want. \n
  • * Shell Tiles :\n\nShell Tiles (live tiles) are really simple to implement. You can create a shell tile that has a URI pointed to a specific page in your application (MS calls this “deep linking”).\nYou can also set properties for both sides of the tile - the OS will flip the tile automatically - you can’t control the flip schedule.\n\n* Application Tiles | Secondary Tiles\n* Front | back w/ no animation.\n* In WMAppManifest.xml : the token property is what controls the main app tile (it’s a template).\n* Double wide tiles (TemplateType6) are only available to Microsoft.\n* Could update from a background task (weather | news | poll server | etc)...\n* Secondary tile : only one tile per time | URI must be unique | User taken to homepage.\n\n* Backgrounding\n* Background agent.\n* http://msdn.microsoft.com/en-us/library/hh202962(v=vs.92).aspx\n\n* Trial Mode\n* iOS and Android sorely need this functionality.\n* There is a simple “IsTrial” property that is set when the app is downloaded in trial mode. Use this flag to change the app’s functionality appropriately.\n* IsTrial will only be set properly after deployed to the marketplace.\n* Use a #if DEBUG flag to set IsTrial to true during development to test trial mode.\n\n\n\n\n
  • Profiler:\n\n* Very scaled down version of Apple’s instruments program. \n* Instruments is much better because it is real time and the statistics you can gather are *much* better.\n* You can at least drill into the call stack and see where the application is slow.\n\nMarketplace Test Kit:\n\n* A very basic set of automated (and manual) tests you can run before submitting to the Marketplace which verifies your application for known marketplace metrics.\n\n
  • Windows Phone 8 is gearing up to be a pretty big overhaul. The overall goal of WP8 seems to be aligning WP with Win8. The underlying library stack may change to WinRT, however MS is promising silverlight backwards compatibility. (They really have to provide backward compatibility or they would cut off all apps in their store). \n\nThe ecosystem is going to change. Zune will die, skydrive will become more integrated.\n\n\n
  • WP7 Marketshare is really low (estimates place it at 2% of the market). \nObviously Microsoft will be making a play to improve Windows Phone marketshare by aligning it with Windows 8 and more hardware should start to become available.\n\nThey do not offer bluetooth support - Android is by far the best at Bluetooth support - going so far as implementing some protocols (Continua for healthcare devices).\n\nOffice and Windows “back office” integration is sorely hurting - they obviously tried to position this at the consumer market.\n\n
  • Transcript

    • 1. Windows Phone 7 from zero to app Damon Allison 3/17/2012
    • 2. Agenda• Make an app - todo list.• Highlight WP7’s strengths• UI => Binding => Data => Shell => Tools• Beyond WP7 : Windows Phone Roadmap
    • 3. UI• Frames : panoramic | pivot | app bar• XAML == HTML | CSS | Box Model• Resources• Styles | Templates : CSS in HTML• User Controls
    • 4. Binding• Binding paths | syntax.• ObservableCollection<T>• INotifyPropertyChanged• Field Validation | Data Converters
    • 5. Data• LINQ => SQL• DataContext• Versioning : DatabaseUpdateSchema
    • 6. Environment• Live Tiles | Secondary Tiles• Backgrounding• Trial Mode
    • 7. Tools• Profiler• Marketplace Test Kit
    • 8. WP8 Roadmap• Hardware : “Scale and Choice” • 4 screen resolutions | multicore | removable SD | NFC• Software: • Win8 kernel (not CE) | silverlight backwards compatibility | WinRT (?)• Ecosystem • Zune gone | Skydrive integration | alignment w/ Windows 8 (store / services / etc?)
    • 9. Weaknesses• Market Share• Cross app communication• Bluetooth API• Office integration doesn’t exist (nor file viewers)

    ×