SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

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

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

Más de Ionic Framework

Más de 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
 

Último

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
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
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

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