SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Offline Storage
Build secure, offline-first apps
September 2019
Housekeeping Items
This webinar is being recorded
The presentation will be about 50 minutes
All registrants will receive a link to the on-demand
recording following the event
You can submit questions to the speakers during the live
event using the Q&A panel
Today’s Presenters
Max Lynch
CEO / @MaxLynch
Matt Netkow
Head of DevRel / @dotNetkow
matt.netkow@ionicframework.com
Agenda
Ionic Overview
Storage Solution Checklist
Storage Solution Options
Introducing Ionic Offline Storage
Demo!
Summary
Q&A
Ionic Framework
Mobile-ready UI library that works
everywhere: any platform, any device,
any framework.
➔ Build for iOS, Android, Electron, PWAs, Web
➔ One codebase across all platforms
➔ Use basic web skills: HTML, JS, CSS
➔ Full access to Native APIs
Hybrid Architecture
HTML, CSS, JavaScript
Runs in a “browser” WebView
Wrapped in native app shell
Access device capabilities via plugins
Native runtime: Cordova or Capacitor
Deploy to App Stores, Desktop, and Web (PWA)
Storage Solution Checklist
1. Mobile, desktop, and web support
2. Secured on user devices via strong encryption
3. Fast, reliable offline access
4. Quick and easy deployment
5. Data Sync
6. Advanced query support
7. Company backed and supported
LocalStorage
E X A M P L E
localStorage.setItem(“name”, “Max”);
const name =
localStorage.getItem(“name”);
localStorage.removeItem(“name”);
Mobile, desktop, and web support
Secured on user devices via strong encryption
Fast, reliable offline access
Quick and easy deployment
Data Sync
Advanced query support
Company backed and supported
Simple key-value pairs.
Strings only.
WebSQL
Mobile, desktop, and web support
Secured on user devices via strong encryption
Fast, reliable offline access
Quick and easy deployment
Data Sync
Advanced query support
Company backed and supported
database.transaction(function(tx) {
tx.executeSql(
'INSERT INTO tasks (id, text)
values (?, ?)', [task.id, task.text]);
});
Relational, SQL database.
Deprecated in 2010.
E X A M P L E
IndexedDB
Mobile, desktop, and web support
Secured on user devices via strong encryption
Fast, reliable offline access
Quick and easy deployment
Data Sync
Advanced query support
Company backed and supported
Transactional, NoSQL database.
Objects/Files/Blobs.
E X A M P L E
// Save image blob
transaction.objectStore("elephants").put(
blob, "image");
// Retrieve the file that was just stored
transaction.objectStore("elephants").get(
"image").onsuccess = function (event) {
var imageFile =
event.target.result;
}
E X A M P L E
SQLite
Mobile, desktop, and web support
Secured on user devices via strong encryption
Fast, reliable offline access
Quick and easy deployment
Data Sync
Advanced query support
Company backed and supported
this.sqlite.create({
name: 'data.db',
location: 'default'
})
.then((db: SQLiteObject) => {
db.executeSql(
'create table danceMoves(name
VARCHAR(32))', [])
.then(() => console.log('Executed
SQL'))
.catch(e => console.log(e));
})
.catch(e => console.log(e));
Transactional, SQL database.
File-based.
Store, access, and manage data
online and offline, with built-in
security and blazing-fast
performance.
➔ On-device data encryption
➔ Powerful NoSQL query engine
➔ (Optional) Ready to integrate with
Couchbase Server
➔ Built and supported by Ionic
E X A M P L E
Mobile, desktop, and web* support
Secured on user devices via strong encryption
Fast, reliable offline access
Quick and easy deployment
Data Sync
Advanced query support
Company backed and supported
* Coming soon
const query = QueryBuilder.select(
SelectResult.property('name'),
SelectResult.property('description'))
.from(DataSource.database(this.database))
.orderBy(Ordering.property('name'));
const ret = await query.execute();
const result = await ret.allResults();
Secure, offline-first NoSQL database.
D E M O
Building an advanced search experience
Storage Options Summary
LocalStorage: Simple, key-value pairs. Small bits of data.
Web SQL: Deprecated. Don’t use!
IndexedDB: NoSQL. Fast, store all types of data.
SQLite: SQL. Fast, reliable. Mobile/desktop only.
Ionic Offline Storage: NoSQL. Fast, reliable, secure.
Powerful Query EngineOn-device encryptionConnect & sync data Secure and offline
Bonus for Couchbase Customers
Additional cloud sync features
powered by Couchbase.
➔ Cloud Data Sync with
Couchbase Server & Sync Gateway
➔ Data Replication
➔ Conflict Resolution
➔ Delta Sync
Resources
Offline Storage product page: https://ionicframework.com/offline-storage
Documentation: https://ionicframework.com/docs/enterprise/offline-storage
Demo App: https://github.com/ionic-team/demo-offlinestorage-search
Couchbase Mobile: https://www.couchbase.com/products/mobile
Couchbase Lite docs: http://docs.couchbase.com/couchbase-lite/2.6/index.html
Sync Gateway docs: https://docs.couchbase.com/sync-gateway/2.6/index.html
Q&A
Max Lynch
CEO / @MaxLynch
Matt Netkow
Head of Dev Rel / @dotNetkow
matt.netkow@ionicframework.com
Questions? ➔ sales@ionicframework.com

Weitere ähnliche Inhalte

Was ist angesagt?

Case study: integrating azure with google app engine
Case study: integrating azure with google app engine Case study: integrating azure with google app engine
Case study: integrating azure with google app engine
Miguel Scotter
 
codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010
Intland Software GmbH
 

Was ist angesagt? (20)

Capacitor 1.0 launch
Capacitor 1.0 launchCapacitor 1.0 launch
Capacitor 1.0 launch
 
Introducing: Ionic Studio & Appflow A Better Way to Build Apps
Introducing: Ionic Studio & Appflow A Better Way to Build AppsIntroducing: Ionic Studio & Appflow A Better Way to Build Apps
Introducing: Ionic Studio & Appflow A Better Way to Build Apps
 
Reimagining Cordova: Building Cross-Platform Web Apps with Capacitor
Reimagining Cordova: Building Cross-Platform Web Apps with CapacitorReimagining Cordova: Building Cross-Platform Web Apps with Capacitor
Reimagining Cordova: Building Cross-Platform Web Apps with Capacitor
 
Case study: integrating azure with google app engine
Case study: integrating azure with google app engine Case study: integrating azure with google app engine
Case study: integrating azure with google app engine
 
Ionic framework
Ionic frameworkIonic framework
Ionic framework
 
codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010
 
Continuous delivery with azure app service
Continuous delivery with azure app serviceContinuous delivery with azure app service
Continuous delivery with azure app service
 
Azure App Service at Let's Dev This
Azure App Service at Let's Dev ThisAzure App Service at Let's Dev This
Azure App Service at Let's Dev This
 
PHP And Silverlight - DevDays session
PHP And Silverlight - DevDays sessionPHP And Silverlight - DevDays session
PHP And Silverlight - DevDays session
 
Solving Enteprise Mobility Considerations with Telerik Mobile Platform
Solving Enteprise Mobility Considerations with Telerik Mobile PlatformSolving Enteprise Mobility Considerations with Telerik Mobile Platform
Solving Enteprise Mobility Considerations with Telerik Mobile Platform
 
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
 
Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices
 
HTML5 Development with Gizmox Visual WebGui7
HTML5 Development with Gizmox Visual WebGui7HTML5 Development with Gizmox Visual WebGui7
HTML5 Development with Gizmox Visual WebGui7
 
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
 
Visual WebGui HTML5 Platform and Kinvey BaaS Integration
Visual WebGui HTML5 Platform and Kinvey BaaS IntegrationVisual WebGui HTML5 Platform and Kinvey BaaS Integration
Visual WebGui HTML5 Platform and Kinvey BaaS Integration
 
Building Cloud-Enabled Cross-Platform Mobile Apps in C# with Azure App Services
Building Cloud-Enabled Cross-PlatformMobile Apps in C# with Azure App ServicesBuilding Cloud-Enabled Cross-PlatformMobile Apps in C# with Azure App Services
Building Cloud-Enabled Cross-Platform Mobile Apps in C# with Azure App Services
 
David Bureš - Xamarin, IoT a Azure
David Bureš - Xamarin, IoT a AzureDavid Bureš - Xamarin, IoT a Azure
David Bureš - Xamarin, IoT a Azure
 
Pepperoni – A framework for spicing up your mobile apps with React Native
Pepperoni – A framework for spicing up your mobile apps with React NativePepperoni – A framework for spicing up your mobile apps with React Native
Pepperoni – A framework for spicing up your mobile apps with React Native
 
Devnest 110802
Devnest 110802Devnest 110802
Devnest 110802
 
Flutter
FlutterFlutter
Flutter
 

Ähnlich wie Offline Storage: Build secure, offline-first apps

HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
Patrick Lauke
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
Patrick Lauke
 
Webinar learn how to test any mobile app style from within eclipse using real...
Webinar learn how to test any mobile app style from within eclipse using real...Webinar learn how to test any mobile app style from within eclipse using real...
Webinar learn how to test any mobile app style from within eclipse using real...
Perfecto Mobile
 
Windows Azure Toolkit for iOS
Windows Azure Toolkit for iOSWindows Azure Toolkit for iOS
Windows Azure Toolkit for iOS
Simon Guest
 

Ähnlich wie Offline Storage: Build secure, offline-first apps (20)

HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
 
Silverlight 4 @ MSDN Live
Silverlight 4 @ MSDN LiveSilverlight 4 @ MSDN Live
Silverlight 4 @ MSDN Live
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
 
Html5
Html5Html5
Html5
 
OGD BINAIR 2010 - VDI toegepast met Citrix XenDesktop
OGD BINAIR 2010 - VDI toegepast met Citrix XenDesktop OGD BINAIR 2010 - VDI toegepast met Citrix XenDesktop
OGD BINAIR 2010 - VDI toegepast met Citrix XenDesktop
 
Making Security Usable: Product Engineer Perspective
Making Security Usable: Product Engineer PerspectiveMaking Security Usable: Product Engineer Perspective
Making Security Usable: Product Engineer Perspective
 
Cross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with EclipseCross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with Eclipse
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
 
Building Rich Internet Apps with Silverlight 2
Building Rich Internet Apps with Silverlight 2Building Rich Internet Apps with Silverlight 2
Building Rich Internet Apps with Silverlight 2
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
 
Webinar learn how to test any mobile app style from within eclipse using real...
Webinar learn how to test any mobile app style from within eclipse using real...Webinar learn how to test any mobile app style from within eclipse using real...
Webinar learn how to test any mobile app style from within eclipse using real...
 
Windows Azure Toolkit for iOS
Windows Azure Toolkit for iOSWindows Azure Toolkit for iOS
Windows Azure Toolkit for iOS
 
HTML5와 모바일
HTML5와 모바일HTML5와 모바일
HTML5와 모바일
 
BlackBerry WebWorks
BlackBerry WebWorksBlackBerry WebWorks
BlackBerry WebWorks
 
Developing iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows AzureDeveloping iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows Azure
 
Flash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen DevelopmentFlash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen Development
 
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
"BlackBerry Webworks : Apps for The Smartphone and Tablet""BlackBerry Webworks : Apps for The Smartphone and Tablet"
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
 
Understanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesUnderstanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile Architectures
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch Event
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
 

Mehr von Ionic Framework

Mehr von Ionic Framework (7)

Live Demo: 1-click push to app stores
Live Demo: 1-click push to app storesLive Demo: 1-click push to app stores
Live Demo: 1-click push to app stores
 
Build your first Ionic React app
Build your first Ionic React appBuild your first Ionic React app
Build your first Ionic React app
 
Ionic React
Ionic ReactIonic React
Ionic React
 
Ionic Advisory: Your partner at every stage of development
Ionic Advisory: Your partner at every stage of development Ionic Advisory: Your partner at every stage of development
Ionic Advisory: Your partner at every stage of development
 
Submitting ionic apps to app stores
Submitting ionic apps to app storesSubmitting ionic apps to app stores
Submitting ionic apps to app stores
 
Top Cordova Challenges and How to Tackle Them
Top Cordova Challenges and How to Tackle ThemTop Cordova Challenges and How to Tackle Them
Top Cordova Challenges and How to Tackle Them
 
A Vue from Ionic
A Vue from IonicA Vue from Ionic
A Vue from Ionic
 

Kürzlich hochgeladen

Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
drm1699
 
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Kürzlich hochgeladen (20)

Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
微信号购买
微信号购买微信号购买
微信号购买
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
 

Offline Storage: Build secure, offline-first apps

  • 1. Offline Storage Build secure, offline-first apps September 2019
  • 2. Housekeeping Items This webinar is being recorded The presentation will be about 50 minutes All registrants will receive a link to the on-demand recording following the event You can submit questions to the speakers during the live event using the Q&A panel
  • 3. Today’s Presenters Max Lynch CEO / @MaxLynch Matt Netkow Head of DevRel / @dotNetkow matt.netkow@ionicframework.com
  • 4. Agenda Ionic Overview Storage Solution Checklist Storage Solution Options Introducing Ionic Offline Storage Demo! Summary Q&A
  • 5. Ionic Framework Mobile-ready UI library that works everywhere: any platform, any device, any framework. ➔ Build for iOS, Android, Electron, PWAs, Web ➔ One codebase across all platforms ➔ Use basic web skills: HTML, JS, CSS ➔ Full access to Native APIs
  • 6. Hybrid Architecture HTML, CSS, JavaScript Runs in a “browser” WebView Wrapped in native app shell Access device capabilities via plugins Native runtime: Cordova or Capacitor Deploy to App Stores, Desktop, and Web (PWA)
  • 7. Storage Solution Checklist 1. Mobile, desktop, and web support 2. Secured on user devices via strong encryption 3. Fast, reliable offline access 4. Quick and easy deployment 5. Data Sync 6. Advanced query support 7. Company backed and supported
  • 8. LocalStorage E X A M P L E localStorage.setItem(“name”, “Max”); const name = localStorage.getItem(“name”); localStorage.removeItem(“name”); Mobile, desktop, and web support Secured on user devices via strong encryption Fast, reliable offline access Quick and easy deployment Data Sync Advanced query support Company backed and supported Simple key-value pairs. Strings only.
  • 9. WebSQL Mobile, desktop, and web support Secured on user devices via strong encryption Fast, reliable offline access Quick and easy deployment Data Sync Advanced query support Company backed and supported database.transaction(function(tx) { tx.executeSql( 'INSERT INTO tasks (id, text) values (?, ?)', [task.id, task.text]); }); Relational, SQL database. Deprecated in 2010. E X A M P L E
  • 10. IndexedDB Mobile, desktop, and web support Secured on user devices via strong encryption Fast, reliable offline access Quick and easy deployment Data Sync Advanced query support Company backed and supported Transactional, NoSQL database. Objects/Files/Blobs. E X A M P L E // Save image blob transaction.objectStore("elephants").put( blob, "image"); // Retrieve the file that was just stored transaction.objectStore("elephants").get( "image").onsuccess = function (event) { var imageFile = event.target.result; }
  • 11. E X A M P L E SQLite Mobile, desktop, and web support Secured on user devices via strong encryption Fast, reliable offline access Quick and easy deployment Data Sync Advanced query support Company backed and supported this.sqlite.create({ name: 'data.db', location: 'default' }) .then((db: SQLiteObject) => { db.executeSql( 'create table danceMoves(name VARCHAR(32))', []) .then(() => console.log('Executed SQL')) .catch(e => console.log(e)); }) .catch(e => console.log(e)); Transactional, SQL database. File-based.
  • 12. Store, access, and manage data online and offline, with built-in security and blazing-fast performance. ➔ On-device data encryption ➔ Powerful NoSQL query engine ➔ (Optional) Ready to integrate with Couchbase Server ➔ Built and supported by Ionic
  • 13. E X A M P L E Mobile, desktop, and web* support Secured on user devices via strong encryption Fast, reliable offline access Quick and easy deployment Data Sync Advanced query support Company backed and supported * Coming soon const query = QueryBuilder.select( SelectResult.property('name'), SelectResult.property('description')) .from(DataSource.database(this.database)) .orderBy(Ordering.property('name')); const ret = await query.execute(); const result = await ret.allResults(); Secure, offline-first NoSQL database.
  • 14. D E M O Building an advanced search experience
  • 15. Storage Options Summary LocalStorage: Simple, key-value pairs. Small bits of data. Web SQL: Deprecated. Don’t use! IndexedDB: NoSQL. Fast, store all types of data. SQLite: SQL. Fast, reliable. Mobile/desktop only. Ionic Offline Storage: NoSQL. Fast, reliable, secure.
  • 16. Powerful Query EngineOn-device encryptionConnect & sync data Secure and offline
  • 17. Bonus for Couchbase Customers Additional cloud sync features powered by Couchbase. ➔ Cloud Data Sync with Couchbase Server & Sync Gateway ➔ Data Replication ➔ Conflict Resolution ➔ Delta Sync
  • 18. Resources Offline Storage product page: https://ionicframework.com/offline-storage Documentation: https://ionicframework.com/docs/enterprise/offline-storage Demo App: https://github.com/ionic-team/demo-offlinestorage-search Couchbase Mobile: https://www.couchbase.com/products/mobile Couchbase Lite docs: http://docs.couchbase.com/couchbase-lite/2.6/index.html Sync Gateway docs: https://docs.couchbase.com/sync-gateway/2.6/index.html
  • 19. Q&A Max Lynch CEO / @MaxLynch Matt Netkow Head of Dev Rel / @dotNetkow matt.netkow@ionicframework.com Questions? ➔ sales@ionicframework.com