Presentation is loading. Please wait.

Presentation is loading. Please wait.

Liven up your WP7 Apps with sweet “Mango” sauce

Similar presentations


Presentation on theme: "Liven up your WP7 Apps with sweet “Mango” sauce"— Presentation transcript:

1

2 Liven up your WP7 Apps with sweet “Mango” sauce
Jaime Rodriguez Microsoft @jaimerodriguez

3 A to-do app….

4 Tidy DEMO

5 http://bit.ly/WP7AppsDoMore “Apps are smarter on Windows Phone.. Where
the same apps Do more” Joe Belfiore, VP

6 Agenda

7 Local database SQL CE 4 Sandboxed LINQ to SQL Your App
Custom Data Context App Objects System.Data.Linq Identity Management Change Tracking Update Processing Object Materialization Microsoft.Phone.Data.Internal Core ADO.NET (System.Data) SQLCE ADO.NET Provider (System.Data.SqlServerCe) SQL CE DB

8 SQL CE CODE WALK-THROUGH

9 LINQ To SQL Mapping Attributes
Atrribute Example Description TableAttribute [Table] Designates a class as an entity class that is associated with a database table. ColumnAttribute [Column(IsPrimaryKey = true)] Associates a class with a column in a database table. IsPrimaryKey specifies the primary key, for which an index is created. IndexAttribute [Index(Name="LastNameIndex", Columns="LastName")] Written at the table level, designates the column of a database table as a secondary index. AssociationAttribute [Association(Storage="ThisEntityRefName", ThisKey="ThisEntityID", OtherKey="TargetEntityID")] Designates a property to represent an association, such as a foreign key to primary key association.

10 Lessons and tips MS recommends code first approach SQL Metal works too
Design object model Apply Attributes SQL Metal works too Leverage background threads Keep changes small (aka save often) Let SQL do the work

11 Multi-tasking design principles
Delightful and Responsive UX Battery Friendly Health Never Regret App Install Network Conscience UX Integrated Feel Hardened Services

12 Multi-tasking Options
Background Transfer Service Background Audio Background Agents Periodic On Idle Alarms and Reminders

13 Background Transfer Service
Start in foreground, complete in background, even if app is closed Queue (of 5) persists across reboots Single service for many apps, FIFO Download ~20 MB ( > over Wi-Fi) Upload Size ~4 MB (limit to come) Transfers to Isolated Storage Queue size limit = 5 Queue APIs (Add, Remove, Query status)

14 Background Transfer CODE WALK-THROUGH

15 Notifications Time-based, on-phone notifications Supports Alerts & Reminders Persist across reboots Adheres to user settings Consistent with phone UX

16 Alarms vs Reminders? Alarms Reminders Modal Rich information
Snooze and Dismiss Sound customization No app invocation No stacking Rich information Integrates with other reminders Snooze and Dismiss Launch app Follows the phones global settings

17 Reminders CODE WALK-THROUGH

18 Live Tile improvements
Local Tile APIs Full control of ALL properties Multiple tiles per app Create,Update/Delete/Query Launches direct to Uri Application Tile Launches main app experience Secondary Tile Launches world news page Secondary Tile Launches local news page

19 Live Tiles – Local Tile API (2)
Back of tile updates Full control of all properties when your app is in the foreground or background Content, Title, Background Flips from front to back at random interval Smart logic to make flips asynchronous Title Content Background Content string is bigger

20 Live tiles CODE WALK-THROUGH

21 Generic Agents Periodic Agents On Idle Agents Occurrence Occurrence
Every 30 min Duration ~15 seconds Constraints <= 5 MB Memory <=10% CPU On Idle Agents Occurrence External power, non-cell network Duration 10 minutes Constraints <= 5MB Memory All of this is requirements can change before RTM, but should not change too much

22 Background Agent Functionality
Allowed Restricted Tiles Toast Location Network R/W ISO store Sockets Most framework APIs Display UI XNA libraries Microphone and Camera Sensors Play audio (may only use background audio APIs)

23 Background Agents CODE WALK-THROUGH

24 Background Tips & Lessons
Renew often Known issues in beta build SQL CE & memory Debugger (prompts & memory) IsEnabled flag One agent for multiple tasks

25 A “Mango” to-do app.. Local database + LINQ to SQL
Alarms and Reminders Live tiles (secondary tiles) Navigation Background processing FAS, File transfer, Agents

26 Take on the challenge!! Windows Phone “Mango” Training Kit
Tidy Labs: SQL, Tiles BTS Background Agents Other labs Photo fun SL + XNA Choosers & Launchers Push

27 Thank You! Q&A @jaimerodriguez

28 © 2008 Microsoft Corporation. All rights reserved
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Liven up your WP7 Apps with sweet “Mango” sauce"

Similar presentations


Ads by Google