Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
CouchDB/PouchDB
approach for hybrid
mobile applications
Ihor Vlasyuk, SoftServe
Who I am?
Technical Lead at SoftServe.
Involved to mobile development.
Agenda
● Modern solution architecture overview
● Typical Problems
● Quick solutions overview
● PouchDB/CouchDB concept
● QA
Typical Modern Solution
Let’s Digg
What we have?
● Server side API code
● Frontend code
● Native mobile code
● Database code
What With Mobile Code?
What With Developers?
What Are Results?
● Lot of platform specific code
● Problem with synchronization
● Lot of peoples involved to project
● Lo...
And What to Do?
And What to Do?
Don’t ask me I don’t know. No Pain No Gain.
Let’s think together
● We need to minimize number of
technologies used on project
● Nice to have one code base
Cross Platform Solutions
Let’s Holy War begin
Quick Overview
Quick Overview
● Native applications
● Web based applications
● Hybrid applications
Native Applications
Pros
● Offers best user experience to build
complex, reach and responsive applications
that offer the ...
Native Applications
Cons
● Its typically device and platform specific
● Requires installation, upgrading and
uninstallatio...
Web Based Applications
Pros
● Reuses existing web applications
● Minor tweaks to CSS and HTML are enough
to change UI expe...
Web Based Applications
Cons
● Even with HTML5, access to native features
is very limited
● Difficult to implement applicat...
Hybrid Applications
Hybrid applications are built by combining
native components and web components. Web
components are bu...
Hybrid Applications
Pros
● Existing web assets can be used.
● Access to all native features.
● Can provide a rich user exp...
Hybrid Applications
Cons
● Accessing native functionality using
JavaScript comes with a certain overhead
and is not as eff...
No Silver Bullet
So we went with Cordova
Stop! And What With This?
● Lot of platform specific code
● Problem with synchronization
● Lot of peoples involved to proj...
Aha Unresolved Problem
● Lot of platform specific code
● Problem with synchronization
● Lot of peoples involved to project...
Welcome CouchDB
What is CouchDB?
CouchDB is one of what many are calling
NoSQL solutions. Specifically, CouchDB is a
document-oriented dat...
What is CouchDB?
CouchDB offers us these features:
● Easy replication of a database across
multiple server instances
● RES...
Sync Problem
Sync Problem
Sync Problem
Welcome PouchDB
WTF?
You Said that we are trying to decrease
number of technologies used in solution?
What is PouchDB?
PouchDB is a JavaScript implementation of
CouchDB. Its goal is to emulate the CouchDB
API with near-perfe...
What is PouchDB?
PouchDB and CouchDB were designed for one
main purpose: sync. Jason Smith has a great
quote about this:
T...
PouchDB concept
With PouchDB
CouchDB, PouchDB and Cordova
Setup
<script src="pouchdb-3.5.0.min.js"></script>
Synchronization
Conflicts
Messaging (pub/sub)
Questions?
You’ve finished this document.
Download and read it offline.
Upcoming SlideShare
Easy Data for PhoneGap apps with PouchDB
Next
Upcoming SlideShare
Easy Data for PhoneGap apps with PouchDB
Next
Download to read offline and view in fullscreen.

Share

Couch DB/PouchDB approach for hybrid mobile applications

Download to read offline

by Ihor Vasylyk

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Couch DB/PouchDB approach for hybrid mobile applications

  1. 1. CouchDB/PouchDB approach for hybrid mobile applications Ihor Vlasyuk, SoftServe
  2. 2. Who I am? Technical Lead at SoftServe. Involved to mobile development.
  3. 3. Agenda ● Modern solution architecture overview ● Typical Problems ● Quick solutions overview ● PouchDB/CouchDB concept ● QA
  4. 4. Typical Modern Solution
  5. 5. Let’s Digg
  6. 6. What we have? ● Server side API code ● Frontend code ● Native mobile code ● Database code
  7. 7. What With Mobile Code?
  8. 8. What With Developers?
  9. 9. What Are Results? ● Lot of platform specific code ● Problem with synchronization ● Lot of peoples involved to project ● Lot of different technologies used
  10. 10. And What to Do?
  11. 11. And What to Do? Don’t ask me I don’t know. No Pain No Gain.
  12. 12. Let’s think together ● We need to minimize number of technologies used on project ● Nice to have one code base
  13. 13. Cross Platform Solutions
  14. 14. Let’s Holy War begin
  15. 15. Quick Overview
  16. 16. Quick Overview ● Native applications ● Web based applications ● Hybrid applications
  17. 17. Native Applications Pros ● Offers best user experience to build complex, reach and responsive applications that offer the best performance ● Has access to all native features provided by platform
  18. 18. Native Applications Cons ● Its typically device and platform specific ● Requires installation, upgrading and uninstallation ● Distribution of the application is more cumbersome and it’s often depended from AppleStore, Android market etc.
  19. 19. Web Based Applications Pros ● Reuses existing web applications ● Minor tweaks to CSS and HTML are enough to change UI experience ● No installation, upgrade, uninstall ● HTML5 can take advantage some native features like geolocation, local storage etc.
  20. 20. Web Based Applications Cons ● Even with HTML5, access to native features is very limited ● Difficult to implement application that will work in disconnected state ● Performance and usability is not as good as native applications
  21. 21. Hybrid Applications Hybrid applications are built by combining native components and web components. Web components are built using HTML, CSS, and JavaScript and wrapped by a native container (internal browser) that not only displays them but also gives them access to native functionality through JavaScript.
  22. 22. Hybrid Applications Pros ● Existing web assets can be used. ● Access to all native features. ● Can provide a rich user experience by using native components intelligently
  23. 23. Hybrid Applications Cons ● Accessing native functionality using JavaScript comes with a certain overhead and is not as efficient as a native app. ● UI with HTML5 and CSS still not so responsive as native
  24. 24. No Silver Bullet
  25. 25. So we went with Cordova
  26. 26. Stop! And What With This? ● Lot of platform specific code ● Problem with synchronization ● Lot of peoples involved to project ● Lot of different technologies used
  27. 27. Aha Unresolved Problem ● Lot of platform specific code ● Problem with synchronization ● Lot of peoples involved to project ● Lot of different technologies used
  28. 28. Welcome CouchDB
  29. 29. What is CouchDB? CouchDB is one of what many are calling NoSQL solutions. Specifically, CouchDB is a document-oriented database and within each document fields are stored as key-value maps. Fields can be either a simple key/value pair, list, or map.
  30. 30. What is CouchDB? CouchDB offers us these features: ● Easy replication of a database across multiple server instances ● REST-like interface for document insertion, updates, retrieval and deletion ● JSON-based document format (easily translatable across different languages)
  31. 31. Sync Problem
  32. 32. Sync Problem
  33. 33. Sync Problem
  34. 34. Welcome PouchDB
  35. 35. WTF? You Said that we are trying to decrease number of technologies used in solution?
  36. 36. What is PouchDB? PouchDB is a JavaScript implementation of CouchDB. Its goal is to emulate the CouchDB API with near-perfect fidelity, while running in the browser or in Node.js.
  37. 37. What is PouchDB? PouchDB and CouchDB were designed for one main purpose: sync. Jason Smith has a great quote about this: The way I like to think about CouchDB is this: CouchDB is bad at everything, except syncing. And it turns out that's the most important feature you could ever ask for, for many types of software."
  38. 38. PouchDB concept
  39. 39. With PouchDB
  40. 40. CouchDB, PouchDB and Cordova
  41. 41. Setup <script src="pouchdb-3.5.0.min.js"></script>
  42. 42. Synchronization
  43. 43. Conflicts
  44. 44. Messaging (pub/sub)
  45. 45. Questions?
  • josefranciscodiazp

    Jul. 8, 2017
  • ssuser8d5b54

    May. 30, 2016
  • yuemuzjh

    Jan. 7, 2016
  • minhkiller

    Jun. 10, 2015
  • ngbinh1

    Jun. 5, 2015

by Ihor Vasylyk

Views

Total views

5,322

On Slideshare

0

From embeds

0

Number of embeds

3,011

Actions

Downloads

27

Shares

0

Comments

0

Likes

5

×