Multitasking and    Local Dababase inWindows Phone Mango                        Radu Vunvulea
Windows Phone Mango    Multitasking
Multitasking               Fast App Switching
Multitasking and Phone Health
Application Lifecycle           Reload / refresh           state only if           neededApplication is resident inmemory;...
Application Lifecycle           Reload / refresh           state only if           neededApplication is resident inmemory;...
Background transfer          20                      20 MB          MB          100     Unlimited          MB
End-to-End ArchitectureDeveloper          Application                    OSMyApp Solution           MyApp.dll MyApp Projec...
Demo
Background AgentsCe ne este permis:   Ce nu ne este permis:• Base API           • Librarii XNA• Update de tile     • Audio...
Differences Between AgentsPeriodic Agent•    Runs every 30 minutes     •   Runs on external power•    Any network connecti...
Windows Phone Mango   Local Database
Where is database stored  Application                                Isolated                                             ...
Good to know• Isolated Storage is used to store database files• LINQ to SQL is used as the ORM engine• LINQ is used to que...
Database design• Custom connection string format:   Data Source=isostore:/MyDir/DbName.sdf  "Data Source=isostore:/MyDir/D...
Limitations• ADO.NET Objects are not supported• Skip() and Take() require an ordered list and  constants values• Only Micr...
Process to follow to use SQL CE        Implement all database classes:          Create a new database (.sdf) file in Isola...
Code Sample
Questions
Multumesc                  Radu Vunvulea           vunvulear@gmail.com       vunvulearadu.blogspot.com
Upcoming SlideShare
Loading in...5
×

Windows Phone: multitasking and local database

1,258

Published on

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
1,258
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Windows Phone: multitasking and local database

  1. 1. Multitasking and Local Dababase inWindows Phone Mango Radu Vunvulea
  2. 2. Windows Phone Mango Multitasking
  3. 3. Multitasking Fast App Switching
  4. 4. Multitasking and Phone Health
  5. 5. Application Lifecycle Reload / refresh state only if neededApplication is resident inmemory; system detaches Save state butresources and pauses threads do not discard it
  6. 6. Application Lifecycle Reload / refresh state only if neededApplication is resident inmemory; system detaches Save state butresources and pauses threads do not discard it
  7. 7. Background transfer 20 20 MB MB 100 Unlimited MB
  8. 8. End-to-End ArchitectureDeveloper Application OSMyApp Solution MyApp.dll MyApp Project UX SingleWMAppManifest Logic App Cloud ISO Store System Services MyAppAgent Project MyAppAgent.dll
  9. 9. Demo
  10. 10. Background AgentsCe ne este permis: Ce nu ne este permis:• Base API • Librarii XNA• Update de tile • Audio• Toasts • Senzori• Location • Microfon• Networking • Camera• Storage • UI
  11. 11. Differences Between AgentsPeriodic Agent• Runs every 30 minutes • Runs on external power• Any network connection • Non-cell network• Runs for 25 seconds connection• Used for location, data • Runs for 10 mins, recurring sync, etc. • Used for daily tasks, large data syncs, etc.
  12. 12. Windows Phone Mango Local Database
  13. 13. Where is database stored Application Isolated Storage LINQ to SQL Runtime Data Context (Sistem.Data.Linq) Local Database
  14. 14. Good to know• Isolated Storage is used to store database files• LINQ to SQL is used as the ORM engine• LINQ is used to query data• Only System.Data.Linq assembly must be added to the project.
  15. 15. Database design• Custom connection string format: Data Source=isostore:/MyDir/DbName.sdf "Data Source=isostore:/MyDir/DbName.sdf"• T-SQL queries are not supported• The code-first approach to defining the database schema is preferred in this version of Windows Phone 7.1 Mango.
  16. 16. Limitations• ADO.NET Objects are not supported• Skip() and Take() require an ordered list and constants values• Only Microsoft SQL CE data types are supported• BinaryFormatter is not supported by default (hack: CustomType and implement ToString() and Parse() in your custom class)• ExecuteCommand is not suported – NO T- SQL, NO DML statement, NO DDL
  17. 17. Process to follow to use SQL CE Implement all database classes: Create a new database (.sdf) file in Isolated Populate the database stored in the Isolated tables, columns, relations, datacontext, etc Storage(by default the database is empty) Storage with data
  18. 18. Code Sample
  19. 19. Questions
  20. 20. Multumesc Radu Vunvulea vunvulear@gmail.com vunvulearadu.blogspot.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×