SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Multitasking and
    Local Dababase in
Windows Phone Mango


                        Radu Vunvulea
Windows Phone Mango
    Multitasking
Multitasking
               Fast App Switching
Multitasking and Phone Health
Application Lifecycle
           Reload / refresh
           state only if
           needed




Application is resident in
memory; system detaches        Save state but
resources and pauses threads   do not discard
                               it
Application Lifecycle
           Reload / refresh
           state only if
           needed




Application is resident in
memory; system detaches        Save state but
resources and pauses threads   do not discard
                               it
Background transfer


          20
                      20 MB
          MB




          100     Unlimited
          MB
End-to-End Architecture
Developer          Application                    OS
MyApp Solution           MyApp.dll

 MyApp Project
                          UX                     Single
WMAppManifest            Logic                    App


                 Cloud           ISO Store      System
                                                Services
  MyAppAgent
    Project
                               MyAppAgent.dll
Demo
Background Agents
Ce ne este permis:   Ce nu ne este permis:
• Base API           • Librarii XNA
• Update de tile     • Audio
• Toasts             • Senzori
• Location           • Microfon
• Networking         • Camera
• Storage            • UI
Differences Between Agents

Periodic 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.
Windows Phone Mango
   Local Database
Where is database stored


  Application                                Isolated
                                             Storage
                       LINQ to SQL Runtime
     Data Context
  (Sistem.Data.Linq)                            Local
                                              Database
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.
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.
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
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
Code Sample
Questions
Multumesc

                  Radu Vunvulea
           vunvulear@gmail.com
       vunvulearadu.blogspot.com

Weitere ähnliche Inhalte

Andere mochten auch

Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...
Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...
Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...Radu Vunvulea
 
Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016
Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016
Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016Radu Vunvulea
 
What’s new in azure from an enterprise perspective by Radu Vunvulea
What’s new in azure from an enterprise perspective by Radu VunvuleaWhat’s new in azure from an enterprise perspective by Radu Vunvulea
What’s new in azure from an enterprise perspective by Radu VunvuleaRadu Vunvulea
 
Why you should believe in cloud - ITCluster iQuest Cluj Napoca
Why you should believe in cloud - ITCluster iQuest Cluj Napoca Why you should believe in cloud - ITCluster iQuest Cluj Napoca
Why you should believe in cloud - ITCluster iQuest Cluj Napoca Radu Vunvulea
 
Mobile services on windows azure (part1)
Mobile services on windows azure (part1)Mobile services on windows azure (part1)
Mobile services on windows azure (part1)Radu Vunvulea
 
Real time fluent communication using SignalR and Cloud (Windows Azure)
Real time fluent communication using SignalR and Cloud (Windows Azure)Real time fluent communication using SignalR and Cloud (Windows Azure)
Real time fluent communication using SignalR and Cloud (Windows Azure)Radu Vunvulea
 
First 13 steps to be able to design an application for Azure Service Fabric ...
First 13 steps to be able to design an application for Azure Service Fabric  ...First 13 steps to be able to design an application for Azure Service Fabric  ...
First 13 steps to be able to design an application for Azure Service Fabric ...Radu Vunvulea
 
Mobile services on windows azure (part3)
Mobile services on windows azure (part3)Mobile services on windows azure (part3)
Mobile services on windows azure (part3)Radu Vunvulea
 
Asp.net mvc bad practices
Asp.net mvc   bad practicesAsp.net mvc   bad practices
Asp.net mvc bad practicesRadu Vunvulea
 
Database and Public Endpoints redundancy on Azure (CloudBrew)
Database and Public Endpoints redundancy on Azure (CloudBrew)Database and Public Endpoints redundancy on Azure (CloudBrew)
Database and Public Endpoints redundancy on Azure (CloudBrew)Radu Vunvulea
 
Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...
Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...
Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...Radu Vunvulea
 
Load tests using Visual Studio 2013 and Azure
Load tests using Visual Studio 2013 and AzureLoad tests using Visual Studio 2013 and Azure
Load tests using Visual Studio 2013 and AzureRadu Vunvulea
 

Andere mochten auch (12)

Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...
Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...
Service Fabric – Microservices in Microsoft World, Radu Vunvulea 30 may 2016 ...
 
Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016
Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016
Azure Microservices in Practice, Radu Vunvulea, ITCamp 2016
 
What’s new in azure from an enterprise perspective by Radu Vunvulea
What’s new in azure from an enterprise perspective by Radu VunvuleaWhat’s new in azure from an enterprise perspective by Radu Vunvulea
What’s new in azure from an enterprise perspective by Radu Vunvulea
 
Why you should believe in cloud - ITCluster iQuest Cluj Napoca
Why you should believe in cloud - ITCluster iQuest Cluj Napoca Why you should believe in cloud - ITCluster iQuest Cluj Napoca
Why you should believe in cloud - ITCluster iQuest Cluj Napoca
 
Mobile services on windows azure (part1)
Mobile services on windows azure (part1)Mobile services on windows azure (part1)
Mobile services on windows azure (part1)
 
Real time fluent communication using SignalR and Cloud (Windows Azure)
Real time fluent communication using SignalR and Cloud (Windows Azure)Real time fluent communication using SignalR and Cloud (Windows Azure)
Real time fluent communication using SignalR and Cloud (Windows Azure)
 
First 13 steps to be able to design an application for Azure Service Fabric ...
First 13 steps to be able to design an application for Azure Service Fabric  ...First 13 steps to be able to design an application for Azure Service Fabric  ...
First 13 steps to be able to design an application for Azure Service Fabric ...
 
Mobile services on windows azure (part3)
Mobile services on windows azure (part3)Mobile services on windows azure (part3)
Mobile services on windows azure (part3)
 
Asp.net mvc bad practices
Asp.net mvc   bad practicesAsp.net mvc   bad practices
Asp.net mvc bad practices
 
Database and Public Endpoints redundancy on Azure (CloudBrew)
Database and Public Endpoints redundancy on Azure (CloudBrew)Database and Public Endpoints redundancy on Azure (CloudBrew)
Database and Public Endpoints redundancy on Azure (CloudBrew)
 
Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...
Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...
Radu Vunvulea - Microsoft TechDay Baltic 2016 | First 13 steps to be able to ...
 
Load tests using Visual Studio 2013 and Azure
Load tests using Visual Studio 2013 and AzureLoad tests using Visual Studio 2013 and Azure
Load tests using Visual Studio 2013 and Azure
 

Ähnlich wie Windows Phone: multitasking and local database

Android Architecture
Android ArchitectureAndroid Architecture
Android ArchitectureLope Emano
 
Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in ChandigarhArcadian Learning
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application FrameworkYong Heui Cho
 
android vs symbian
android  vs symbianandroid  vs symbian
android vs symbianAJAL A J
 
Application layering vs Application Isolation
Application layering vs Application IsolationApplication layering vs Application Isolation
Application layering vs Application IsolationMarius Sandbu
 
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS SummitDiscover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS SummitAmazon Web Services
 
VMware ThinApp 4.5
VMware ThinApp 4.5VMware ThinApp 4.5
VMware ThinApp 4.5netlogix
 
redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)Peter Presnell
 
ApacheCon BigData - What it takes to process a trillion events a day?
ApacheCon BigData - What it takes to process a trillion events a day?ApacheCon BigData - What it takes to process a trillion events a day?
ApacheCon BigData - What it takes to process a trillion events a day?Jagadish Venkatraman
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
 
Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1Marlon Luz
 
Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1Marlon Luz
 
Java Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,CoimbatoreJava Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,CoimbatoreGateway Software Solutions
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to TitaniumGraham Weldon
 

Ähnlich wie Windows Phone: multitasking and local database (20)

Android OS
Android OSAndroid OS
Android OS
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in Chandigarh
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application Framework
 
android vs symbian
android  vs symbianandroid  vs symbian
android vs symbian
 
Application layering vs Application Isolation
Application layering vs Application IsolationApplication layering vs Application Isolation
Application layering vs Application Isolation
 
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS SummitDiscover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
 
VMware ThinApp 4.5
VMware ThinApp 4.5VMware ThinApp 4.5
VMware ThinApp 4.5
 
Android OS
Android OSAndroid OS
Android OS
 
redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)
 
ApacheCon BigData - What it takes to process a trillion events a day?
ApacheCon BigData - What it takes to process a trillion events a day?ApacheCon BigData - What it takes to process a trillion events a day?
ApacheCon BigData - What it takes to process a trillion events a day?
 
Foss con2011
Foss con2011Foss con2011
Foss con2011
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1
 
Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1
 
Java Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,CoimbatoreJava Training at Gateway Software Solutions,Coimbatore
Java Training at Gateway Software Solutions,Coimbatore
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to Titanium
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 

Kürzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Windows Phone: multitasking and local database

  • 1. Multitasking and Local Dababase in Windows Phone Mango Radu Vunvulea
  • 2. Windows Phone Mango Multitasking
  • 3. Multitasking Fast App Switching
  • 5. Application Lifecycle Reload / refresh state only if needed Application is resident in memory; system detaches Save state but resources and pauses threads do not discard it
  • 6. Application Lifecycle Reload / refresh state only if needed Application is resident in memory; system detaches Save state but resources and pauses threads do not discard it
  • 7. Background transfer 20 20 MB MB 100 Unlimited MB
  • 8. End-to-End Architecture Developer Application OS MyApp Solution MyApp.dll MyApp Project UX Single WMAppManifest Logic App Cloud ISO Store System Services MyAppAgent Project MyAppAgent.dll
  • 10. Background Agents Ce 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. Differences Between Agents Periodic 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. Windows Phone Mango Local Database
  • 13. Where is database stored Application Isolated Storage LINQ to SQL Runtime Data Context (Sistem.Data.Linq) Local Database
  • 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. 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. 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. 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
  • 20. Multumesc Radu Vunvulea vunvulear@gmail.com vunvulearadu.blogspot.com