SlideShare a Scribd company logo
1 of 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

More Related Content

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

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