SlideShare a Scribd company logo
1 of 11
Offline concept Mobile-SS
What we discuss here.. 
 Why we should care about offline mode? 
 3 Steps implementing offline mode 
 Data conflict (detection and solution)
Why we should care about offline mode? 
 The most used smartophone apps are trying more and more to provide 
content while offline. People still can do their activity even when the 
network is off. For example, apps like Evernote even let users create 
and edit notes while offline. 
 Sometimes there is no mobile network at all, e.g. in the subway. In the 
train the network can go up and down. Sometimes it's slow, sometimes 
it's fast. The biggest cities in the world have 4G now, but even in these 
big cities there are still a lot of areas where the moblie network is slow. 
 Moblie networks are different: latency is high, speed is very 
inconsistent, which is the worst in terms of user experince (Ilya 
Grigorik from Google: "Faster Websites: Crash Course on Frontend 
Performance (Part 1/2)", Devoxx 2012)
3 Steps implementing offline mode 
 Function to check internet connectivity (Android 
Flow) 
 Storing data Locally (Mobile application Flow) 
 Store data from server into local storage when it’s available 
(sync) 
 Leveraging http caching mechanisms (Rest API) 
 Cache-control 
 Etag and If-None-Match 
 Last-Modified and If-Modified-Since
Leveraging http caching mechanisms (Rest API) 
 Etag Header example
Leveraging http caching mechanisms (Rest API) 
 If-None-Match example
Data conflict (detection) 
 Build conflict detection inside Rest API
Data conflict (Solutions) 
 How to solve conflict 
 show to the user both data (the current version on the device, 
and the current version on the server) and let him keep what 
he wants. 
 Or, letting the latest version in time win.
Reference 
 https://www.clairereynaud.net/blog/adding-offline-mode- 
to-your-mobile-app/
Offline concept Mobile apps

More Related Content

Similar to Offline concept Mobile apps

Future platform for internet of things
Future platform for internet of thingsFuture platform for internet of things
Future platform for internet of thingsColdbeans Software
 
Architecting mobile solutions
Architecting mobile solutions Architecting mobile solutions
Architecting mobile solutions Sachin Bhosale
 
Scaling mobile dev teams
Scaling mobile dev teams Scaling mobile dev teams
Scaling mobile dev teams Priyank Gupta
 
Mastering Mobile Web with 8 Key Rules
Mastering Mobile Web with 8 Key RulesMastering Mobile Web with 8 Key Rules
Mastering Mobile Web with 8 Key RulesMobile Labs
 
ttconnect: Delivering Government e-Services With IBM Mobile Portal Accelerator
ttconnect: Delivering Government e-Services With IBM Mobile Portal Acceleratorttconnect: Delivering Government e-Services With IBM Mobile Portal Accelerator
ttconnect: Delivering Government e-Services With IBM Mobile Portal AcceleratorTracy Hackshaw
 
Cross Platform Development Using Flutter
Cross Platform Development Using FlutterCross Platform Development Using Flutter
Cross Platform Development Using Fluttervivatechijri
 
1. Software-Defined Networks (SDN) is a new paradigm in network ma.docx
1. Software-Defined Networks (SDN) is a new paradigm in network ma.docx1. Software-Defined Networks (SDN) is a new paradigm in network ma.docx
1. Software-Defined Networks (SDN) is a new paradigm in network ma.docxjackiewalcutt
 
Mobile Performance Testing Approaches and Challenges
Mobile Performance Testing Approaches and ChallengesMobile Performance Testing Approaches and Challenges
Mobile Performance Testing Approaches and ChallengesNous Infosystems
 
Cloud computing on smartphone
Cloud computing on smartphoneCloud computing on smartphone
Cloud computing on smartphoneAlexander Decker
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web AppsBill Stavroulakis
 
Open Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web FragmentationOpen Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web FragmentationTom Deryckere
 
Web Application Vulnerabilities
Web Application VulnerabilitiesWeb Application Vulnerabilities
Web Application VulnerabilitiesPamela Wright
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatialGeCo in the Rockies
 
Mobile web vs. native apps: It's not about technology, it's about psychology
Mobile web vs. native apps: It's not about technology, it's about psychologyMobile web vs. native apps: It's not about technology, it's about psychology
Mobile web vs. native apps: It's not about technology, it's about psychologyiQcontent
 

Similar to Offline concept Mobile apps (20)

Future platform for internet of things
Future platform for internet of thingsFuture platform for internet of things
Future platform for internet of things
 
Architecting mobile solutions
Architecting mobile solutions Architecting mobile solutions
Architecting mobile solutions
 
Scaling mobile dev teams
Scaling mobile dev teams Scaling mobile dev teams
Scaling mobile dev teams
 
Mastering Mobile Web with 8 Key Rules
Mastering Mobile Web with 8 Key RulesMastering Mobile Web with 8 Key Rules
Mastering Mobile Web with 8 Key Rules
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
 
ttconnect: Delivering Government e-Services With IBM Mobile Portal Accelerator
ttconnect: Delivering Government e-Services With IBM Mobile Portal Acceleratorttconnect: Delivering Government e-Services With IBM Mobile Portal Accelerator
ttconnect: Delivering Government e-Services With IBM Mobile Portal Accelerator
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Mobile Web
Mobile WebMobile Web
Mobile Web
 
Cross Platform Development Using Flutter
Cross Platform Development Using FlutterCross Platform Development Using Flutter
Cross Platform Development Using Flutter
 
1. Software-Defined Networks (SDN) is a new paradigm in network ma.docx
1. Software-Defined Networks (SDN) is a new paradigm in network ma.docx1. Software-Defined Networks (SDN) is a new paradigm in network ma.docx
1. Software-Defined Networks (SDN) is a new paradigm in network ma.docx
 
Html5 for mobiles
Html5 for mobilesHtml5 for mobiles
Html5 for mobiles
 
Mobile Performance Testing Approaches and Challenges
Mobile Performance Testing Approaches and ChallengesMobile Performance Testing Approaches and Challenges
Mobile Performance Testing Approaches and Challenges
 
Cloud computing on smartphone
Cloud computing on smartphoneCloud computing on smartphone
Cloud computing on smartphone
 
Smarter Apps for Smarter phones - see me at bit.ly/1ezHj0c
Smarter Apps for Smarter phones - see me at bit.ly/1ezHj0cSmarter Apps for Smarter phones - see me at bit.ly/1ezHj0c
Smarter Apps for Smarter phones - see me at bit.ly/1ezHj0c
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web Apps
 
Open Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web FragmentationOpen Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web Fragmentation
 
Web Application Vulnerabilities
Web Application VulnerabilitiesWeb Application Vulnerabilities
Web Application Vulnerabilities
 
Presentation1
Presentation1Presentation1
Presentation1
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatial
 
Mobile web vs. native apps: It's not about technology, it's about psychology
Mobile web vs. native apps: It's not about technology, it's about psychologyMobile web vs. native apps: It's not about technology, it's about psychology
Mobile web vs. native apps: It's not about technology, it's about psychology
 

More from Dimas Prawira

Fundamental concurrent programming
Fundamental concurrent programmingFundamental concurrent programming
Fundamental concurrent programmingDimas Prawira
 
Tutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSON
Tutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSONTutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSON
Tutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSONDimas Prawira
 
Introduction on Android programming Tutorial
Introduction on Android programming TutorialIntroduction on Android programming Tutorial
Introduction on Android programming TutorialDimas Prawira
 
Tutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDE
Tutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDETutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDE
Tutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDEDimas Prawira
 
Konsep aplikasi mobile Support System
Konsep aplikasi mobile Support SystemKonsep aplikasi mobile Support System
Konsep aplikasi mobile Support SystemDimas Prawira
 
Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)
Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)
Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)Dimas Prawira
 

More from Dimas Prawira (11)

Fundamental concurrent programming
Fundamental concurrent programmingFundamental concurrent programming
Fundamental concurrent programming
 
GoLang_5
GoLang_5GoLang_5
GoLang_5
 
GoLang_4
GoLang_4GoLang_4
GoLang_4
 
GoLang_3
GoLang_3GoLang_3
GoLang_3
 
GoLang_2
GoLang_2GoLang_2
GoLang_2
 
GoLang_1
GoLang_1GoLang_1
GoLang_1
 
Tutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSON
Tutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSONTutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSON
Tutorial pembuatan REST Service pada Support System menggunakan Servlet dan GSON
 
Introduction on Android programming Tutorial
Introduction on Android programming TutorialIntroduction on Android programming Tutorial
Introduction on Android programming Tutorial
 
Tutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDE
Tutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDETutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDE
Tutorial instalasi, konfigurasi glassfish serta integrasi dengan Eclipse IDE
 
Konsep aplikasi mobile Support System
Konsep aplikasi mobile Support SystemKonsep aplikasi mobile Support System
Konsep aplikasi mobile Support System
 
Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)
Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)
Pengenalan SOA serta implementasinya pada aplikasi SS (Support System)
 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...Call girls in Ahmedabad High profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Recently uploaded (20)

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

Offline concept Mobile apps

  • 2. What we discuss here..  Why we should care about offline mode?  3 Steps implementing offline mode  Data conflict (detection and solution)
  • 3. Why we should care about offline mode?  The most used smartophone apps are trying more and more to provide content while offline. People still can do their activity even when the network is off. For example, apps like Evernote even let users create and edit notes while offline.  Sometimes there is no mobile network at all, e.g. in the subway. In the train the network can go up and down. Sometimes it's slow, sometimes it's fast. The biggest cities in the world have 4G now, but even in these big cities there are still a lot of areas where the moblie network is slow.  Moblie networks are different: latency is high, speed is very inconsistent, which is the worst in terms of user experince (Ilya Grigorik from Google: "Faster Websites: Crash Course on Frontend Performance (Part 1/2)", Devoxx 2012)
  • 4.
  • 5. 3 Steps implementing offline mode  Function to check internet connectivity (Android Flow)  Storing data Locally (Mobile application Flow)  Store data from server into local storage when it’s available (sync)  Leveraging http caching mechanisms (Rest API)  Cache-control  Etag and If-None-Match  Last-Modified and If-Modified-Since
  • 6. Leveraging http caching mechanisms (Rest API)  Etag Header example
  • 7. Leveraging http caching mechanisms (Rest API)  If-None-Match example
  • 8. Data conflict (detection)  Build conflict detection inside Rest API
  • 9. Data conflict (Solutions)  How to solve conflict  show to the user both data (the current version on the device, and the current version on the server) and let him keep what he wants.  Or, letting the latest version in time win.