SlideShare a Scribd company logo
1 of 26
acasquete
The applications require a local storage
File System

App Data Store

C# / JavaScript

SQLite

IndexedDB

Javascript
Windows Azure Mobile Services are ideal for:
Optimistic Concurrency Control
File System

App Data Store

C# / JavaScript

SQLite

IndexedDB

Javascript
many browsers
// Opening a Database
var
// Assume db is a database variable opened earlier
var
var
// Define a person
var
// Perform the add
var
// Opening a Database
var db = new PouchDB('dbname');
// Add an object
db.put({ _id: ’me@email.com', name: ’Alex', age: 66 });
// Subscripbe to changes
db.changes({
onChange: function() {
console.log('Ch-Ch-Changes');
}
});
// Replicate to external DB
db.replicate.to('http://example.com/mydb');
http://www.windowsazure.com/en-us/develop/mobile/tutorials/handle-databasewrite-conflicts-dotnet/
http://msdn.microsoft.com/en-us/library/windowsazure/hh456371.aspx
http://www.sqlite.org/docs.html
http://pouchdb.com
Working with disconnected data in Windows Store apps
Working with disconnected data in Windows Store apps

More Related Content

What's hot

Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)Woonsan Ko
 
Replicating application data into materialized views
Replicating application data into materialized viewsReplicating application data into materialized views
Replicating application data into materialized viewsZach Cox
 
Scaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSScaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSMax Neunhöffer
 
Electron, databases, and RxDB
Electron, databases, and RxDBElectron, databases, and RxDB
Electron, databases, and RxDBBen Gotow
 
Updating materialized views and caches using kafka
Updating materialized views and caches using kafkaUpdating materialized views and caches using kafka
Updating materialized views and caches using kafkaZach Cox
 
Polyglot persistence with Spring Data
Polyglot persistence with Spring DataPolyglot persistence with Spring Data
Polyglot persistence with Spring DataCorneil du Plessis
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDBvaluebound
 
Creating data centric microservices
Creating data centric microservicesCreating data centric microservices
Creating data centric microservicesArangoDB Database
 
Client Server Communication on iOS
Client Server Communication on iOSClient Server Communication on iOS
Client Server Communication on iOSMake School
 
Introduction à DocumentDB
Introduction à DocumentDBIntroduction à DocumentDB
Introduction à DocumentDBMSDEVMTL
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBArangoDB Database
 
Олексій Калініченко — Configuration Management in Drupal8
Олексій Калініченко — Configuration Management in Drupal8Олексій Калініченко — Configuration Management in Drupal8
Олексій Калініченко — Configuration Management in Drupal8LEDC 2016
 
N hidden gems in hippo forge and experience plugins (dec17)
N hidden gems in hippo forge and experience plugins (dec17)N hidden gems in hippo forge and experience plugins (dec17)
N hidden gems in hippo forge and experience plugins (dec17)Woonsan Ko
 
Azure sql database limitations
Azure sql database limitationsAzure sql database limitations
Azure sql database limitationsBRIJESH KUMAR
 
N hidden gems in forge (as of may '17)
N hidden gems in forge (as of may '17)N hidden gems in forge (as of may '17)
N hidden gems in forge (as of may '17)Woonsan Ko
 
In-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascriptIn-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascriptThéodore Biadala
 

What's hot (20)

Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)
 
Replicating application data into materialized views
Replicating application data into materialized viewsReplicating application data into materialized views
Replicating application data into materialized views
 
Scaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSScaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOS
 
Electron, databases, and RxDB
Electron, databases, and RxDBElectron, databases, and RxDB
Electron, databases, and RxDB
 
Updating materialized views and caches using kafka
Updating materialized views and caches using kafkaUpdating materialized views and caches using kafka
Updating materialized views and caches using kafka
 
Polyglot persistence with Spring Data
Polyglot persistence with Spring DataPolyglot persistence with Spring Data
Polyglot persistence with Spring Data
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
Creating data centric microservices
Creating data centric microservicesCreating data centric microservices
Creating data centric microservices
 
your browser, my storage
your browser, my storageyour browser, my storage
your browser, my storage
 
Grails Controllers
Grails ControllersGrails Controllers
Grails Controllers
 
MeteorJS Introduction
MeteorJS IntroductionMeteorJS Introduction
MeteorJS Introduction
 
Client Server Communication on iOS
Client Server Communication on iOSClient Server Communication on iOS
Client Server Communication on iOS
 
Introduction à DocumentDB
Introduction à DocumentDBIntroduction à DocumentDB
Introduction à DocumentDB
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDB
 
Олексій Калініченко — Configuration Management in Drupal8
Олексій Калініченко — Configuration Management in Drupal8Олексій Калініченко — Configuration Management in Drupal8
Олексій Калініченко — Configuration Management in Drupal8
 
N hidden gems in hippo forge and experience plugins (dec17)
N hidden gems in hippo forge and experience plugins (dec17)N hidden gems in hippo forge and experience plugins (dec17)
N hidden gems in hippo forge and experience plugins (dec17)
 
Azure sql database limitations
Azure sql database limitationsAzure sql database limitations
Azure sql database limitations
 
N hidden gems in forge (as of may '17)
N hidden gems in forge (as of may '17)N hidden gems in forge (as of may '17)
N hidden gems in forge (as of may '17)
 
Asp.net
Asp.netAsp.net
Asp.net
 
In-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascriptIn-depth changes to Drupal 8 javascript
In-depth changes to Drupal 8 javascript
 

Viewers also liked

Eficientizarea IT - Temperfield
Eficientizarea IT - TemperfieldEficientizarea IT - Temperfield
Eficientizarea IT - TemperfieldTemperfield
 
тезисы к докладу по электронной аутентификации в государственных системах
тезисы к докладу по электронной аутентификации в государственных системахтезисы к докладу по электронной аутентификации в государственных системах
тезисы к докладу по электронной аутентификации в государственных системахMikhail Vanin
 
Nuxeo World Session: Nuxeo Distributions
Nuxeo World Session: Nuxeo DistributionsNuxeo World Session: Nuxeo Distributions
Nuxeo World Session: Nuxeo DistributionsNuxeo
 

Viewers also liked (6)

Everyday - mongodb
Everyday - mongodbEveryday - mongodb
Everyday - mongodb
 
Eficientizarea IT - Temperfield
Eficientizarea IT - TemperfieldEficientizarea IT - Temperfield
Eficientizarea IT - Temperfield
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
тезисы к докладу по электронной аутентификации в государственных системах
тезисы к докладу по электронной аутентификации в государственных системахтезисы к докладу по электронной аутентификации в государственных системах
тезисы к докладу по электронной аутентификации в государственных системах
 
Nuxeo World Session: Nuxeo Distributions
Nuxeo World Session: Nuxeo DistributionsNuxeo World Session: Nuxeo Distributions
Nuxeo World Session: Nuxeo Distributions
 
Sso every where
Sso every whereSso every where
Sso every where
 

Similar to Working with disconnected data in Windows Store apps

Couchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problemCouchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problemdelagoya
 
Docker Java App with MariaDB – Deployment in Less than a Minute
Docker Java App with MariaDB – Deployment in Less than a MinuteDocker Java App with MariaDB – Deployment in Less than a Minute
Docker Java App with MariaDB – Deployment in Less than a Minutedchq
 
Local data storage for mobile apps
Local data storage for mobile appsLocal data storage for mobile apps
Local data storage for mobile appsIvano Malavolta
 
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenDavid Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenPostgresOpen
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalystsvilen.ivanov
 
Deploying configurable frontend web application containers
Deploying configurable frontend web application containersDeploying configurable frontend web application containers
Deploying configurable frontend web application containersJosé Moreira
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actionsAren Zomorodian
 
CouchDB : More Couch
CouchDB : More CouchCouchDB : More Couch
CouchDB : More Couchdelagoya
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Deploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkDeploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkJulien SIMON
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingBertrand Delacretaz
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...Ivanti
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowKarsten Dambekalns
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's CodeWildan Maulana
 
Google App Engine Developer - Day4
Google App Engine Developer - Day4Google App Engine Developer - Day4
Google App Engine Developer - Day4Simon Su
 

Similar to Working with disconnected data in Windows Store apps (20)

Couchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problemCouchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problem
 
Sqllite
SqlliteSqllite
Sqllite
 
Docker Java App with MariaDB – Deployment in Less than a Minute
Docker Java App with MariaDB – Deployment in Less than a MinuteDocker Java App with MariaDB – Deployment in Less than a Minute
Docker Java App with MariaDB – Deployment in Less than a Minute
 
Local data storage for mobile apps
Local data storage for mobile appsLocal data storage for mobile apps
Local data storage for mobile apps
 
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenDavid Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
 
Refreshing mule cache using oracle database change notification
Refreshing mule cache using oracle database change notificationRefreshing mule cache using oracle database change notification
Refreshing mule cache using oracle database change notification
 
Deploying configurable frontend web application containers
Deploying configurable frontend web application containersDeploying configurable frontend web application containers
Deploying configurable frontend web application containers
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actions
 
Lecture12
Lecture12Lecture12
Lecture12
 
CouchDB : More Couch
CouchDB : More CouchCouchDB : More Couch
CouchDB : More Couch
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
phptut4
phptut4phptut4
phptut4
 
phptut4
phptut4phptut4
phptut4
 
Deploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkDeploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalk
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's Code
 
Google App Engine Developer - Day4
Google App Engine Developer - Day4Google App Engine Developer - Day4
Google App Engine Developer - Day4
 

More from Alex Casquete

Redis no es solo una caché
Redis no es solo una cachéRedis no es solo una caché
Redis no es solo una cachéAlex Casquete
 
Functional Programming with F#: Getting Started & Basic Concepts
Functional Programming with F#: Getting Started & Basic ConceptsFunctional Programming with F#: Getting Started & Basic Concepts
Functional Programming with F#: Getting Started & Basic ConceptsAlex Casquete
 
45 F#antastic minutes!
45 F#antastic minutes!45 F#antastic minutes!
45 F#antastic minutes!Alex Casquete
 
JavaScript no es Vietnam
JavaScript no es VietnamJavaScript no es Vietnam
JavaScript no es VietnamAlex Casquete
 
Aplicaciones robustas con Programación Orientada a Aspectos
Aplicaciones robustas con Programación Orientada a AspectosAplicaciones robustas con Programación Orientada a Aspectos
Aplicaciones robustas con Programación Orientada a AspectosAlex Casquete
 
Entity Framework 4 desde cero
Entity Framework 4 desde ceroEntity Framework 4 desde cero
Entity Framework 4 desde ceroAlex Casquete
 

More from Alex Casquete (6)

Redis no es solo una caché
Redis no es solo una cachéRedis no es solo una caché
Redis no es solo una caché
 
Functional Programming with F#: Getting Started & Basic Concepts
Functional Programming with F#: Getting Started & Basic ConceptsFunctional Programming with F#: Getting Started & Basic Concepts
Functional Programming with F#: Getting Started & Basic Concepts
 
45 F#antastic minutes!
45 F#antastic minutes!45 F#antastic minutes!
45 F#antastic minutes!
 
JavaScript no es Vietnam
JavaScript no es VietnamJavaScript no es Vietnam
JavaScript no es Vietnam
 
Aplicaciones robustas con Programación Orientada a Aspectos
Aplicaciones robustas con Programación Orientada a AspectosAplicaciones robustas con Programación Orientada a Aspectos
Aplicaciones robustas con Programación Orientada a Aspectos
 
Entity Framework 4 desde cero
Entity Framework 4 desde ceroEntity Framework 4 desde cero
Entity Framework 4 desde cero
 

Recently uploaded

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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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...
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Working with disconnected data in Windows Store apps

Editor's Notes

  1. Hello everyone. Thank you for coming at the last session of MCT Summit.In this talk I want to show you how to deal with connected and disconnected scenarios using Windows Store apps and how to synchronize data between a local and an external database.
  2. Againefore I start, I want to thanks Sponsors:Aplixure, Microsoft Learning, Virsoft. Withoutthem, this Summit wouldn’t be posible!
  3. As I said, I thistalk I wanttotalkdisconnectedscenarios. And I wantto show youhowto store local data usingSQLite and IndexedDB. And thenhowtosynchronizewithexternal server. We’llseehowtosyncrhonizeSQLitewith Mobile Services, and theIndexedDBwithanexternalCouchDBdatabase.
  4. I’m Alex Casquete I’m working in Spain as a developer and trainer in a consultant company specialized in Microsoft Technologies. The last two years I have been involved in developing mobility solutions using windows store apps and Windows azure, in particular I’m developing business store apps. Apps related with an specific business of a company. I think is in this kind of application where dealing with connected and disconnected and with how to synchronize data became important. Here you have my email address and my twitter if you want to ask me after this talk or stay in contact.
  5. Thisisthecommonmessagethatweseewhenanaplicattionisnotsupporting offline navigation. That means that we cant use the application if we are not connected.In manybusiness store apps, thisisnotanoption, weneedtheapplicationsalwaysrunning.
  6. Ok, let’sgowiththefirsttopic. The key thing is that Mobiles phone and tablets are not always connected and so experience latencies with getting data that we don’t have in on promise clients. But the application always needs to be running.
  7. Besides, when working in disconnected apps we need to consider other additional aspects. First, mobile devices and phones have less storage and processing capacity than a desktop or notebook computer. We need to use the local storage properly. We cant store locally a complete database.we need to use Wi-Fi connections when possible To keep down the cost of running a mobile application, and we should use a compact data format like JSON.Another consideration when working offline is that we are not working alone. Probably another disconnected user is working with the same data at the same time, and in some cases we need to resolve conflicts.All this is important, but the most important is that we need to have a local storage for the applications.
  8. And the options we have many options to store data locally.We can store data using the file system, we can create files in any folder to store settings or whatever.Another option is to store the data using the app local storage, and isolated storage for the app. And another solution is to use third parties databases as SQLite.But besides, if we are using JavaScript to developing Store Apps or even HTML apps, we can use IndexedDB that allow us to store a pair key/value in a local database.These last options are the recommended when we need to manipulate a large quantity of data, because if we use other mechanism, we must implement our own mechanism for searching, sorting, etc.
  9. SQLite is an embedded SQL database engine that does not have a separate server process. It’s working as library. The data isstored in a single file.Implementsmost of the SQL standard and we can use it in manyplatforms (…)
  10. Now, we have an application that stores the data locally. And now we need to upload this data to an external server so that it could we shared between all the clients. We have many options, but I want to show you how to synchronize this data using Windows Azure Mobile Services. Do you know what Windows Azure Mobile Services is?Windows Azure Mobile Servicesenablesyoutoaccelerateyourmobileappdevelopmentbyproviding a fast and easywayto store data, authenticateusers, and sendpushnotifications. Today, we’vereleasedseveralimportantupdatesto Mobile Services, includingOptimisticconcurrency in structured data todetect and resolvescenarioswheretwoor more users are concurrentlyupdatingthesame data rowWindows Azure Mobile Services is a Windows Azure service designed to make it easy to create highly-functional mobile apps. Mobile Services brings together a set of Windows Azure services that enable backend capabilities for mobile apps. Mobile Services provides a set of REST APIs that are used to access and change table data and retrieve authenticated login information.
  11. Windows Azure Mobile Services is a Windows Azure service designed to make it easy to create highly-functional mobile apps. Mobile Services brings together a set of Windows Azure services that enable backend capabilities for mobile apps. Mobile Services provides a set of REST APIs that are used to access and change table data and retrieve authenticated login information.Windows Mobile Service are perfect for create the backed of a Windows Store app, Windows Phone, iOS, Android, web applications.We can implementquicklycommontasks as userauthenticatio, sendpushnotifications, etc.
  12. Whathappensifwehavetwoclients?In some scenarios Two or more clients may write changes to the same item, at the same time. Without any conflict detection, the last write would overwrite any previous updates.Optimistic Concurrency Control assumes that each transaction can commit without any lock.Windows Azure Mobile Services supports optimistic concurrency control by tracking changes to each item using the __version system property column that is added to each table. This is a new feature added past week.Before committing a transaction, optimistic concurrency control verifies that no other transaction has modified the data. If the data has been modified, the committing transaction is rolled back.
  13. I’ll show you how to the application to detect these write conflicts through the __version system property. The application will be notified by a MobileServicePreconditionFailedException during an update attempt if the record has changed since the last query. It will then be able to make a choice of whether to commit its change to the database or leave the last change to the database intact. Forthis demo Imgoingto use the default solution.
  14. Untilnowwehaveseenhowto store local data usingSQLite and howtosinchronizewithexternal server using C# in Windows Store apps.Ifyou are using JavaScript you can do thesame. You can use SQLitedirectlyfrom JavaScript a Windows RT component and use SQLite
  15. But in Windows Storeswith JavaScript wehaveanotherengineto store data locally.
  16. IndexDBis a databaseengingsuportedbymany browsers and Windows Store appusingJavascript.We can store pairkey / value and each record isidentifiedby a uniquekey.We can store largeamount of data, images, objects, arrays, etc.
  17. Here we can see how to work with indexeddb.Howwe open a database.Howwecreate a transaction. When working with data in indexeddb it’s necessary to use a transaction. Transactions take two arguments. The first is an array of tables you’ll be working with. Most of the time this will be one table. The second argument is the type of transaction. There are two types of transactions: readonly and readwrite. Adding data will be a readwrite operation. And then web can add a entityusingmethodadd.
  18. Instead of using indexed directly we can use other libraries. In the next demo, I will show you how to work with PouchDB. PouchDBstores data in local usingindexdb.This library is an implementation of Apache CouchDB that works in a native way in every browser using IndexedDB as storage system. It has the same model of data, the same API and the same conflicts resolution that CouchDB. But the most important is that allows to synchronize the data with a CouchDB Database. To show the use of PouchDBimgoiung to create a simple app that allow to edit the infomation from a customer list and we can synchronize with other devices.
  19. Againefore I start, I want to thanks Sponsors:Aplixure, Microsoft Learning, Virsoft. Withoutthem, this Summit wouldn’t be posible!