Cross Platform Storage & Sync with Couchbase and Ionic Framework

  • View
    799

  • Download
    4

  • Category

    Mobile

Preview:

Citation preview

©2015 Couchbase Inc. 1

Nic Raboy, Developer Advocate at Couchbase

Cross Platform Storage & Sync with Couchbase and Ionic Framework

©2015 Couchbase Inc. 2

About Me

Nic RaboyDeveloper Advocate at Couchbase@nraboy (Twitter)

©2015 Couchbase Inc. 3

The Plan

The business problem Couchbase Mobile Ionic Framework Couchbase + Ionic Framework

What is the business problem?

Today’s Mobile Apps

5

Try again later.

No Internet

please wait…

©2015 Couchbase Inc. 6

How Does This Affect What People Think?

Doesn’t work a lot of the time and when it does it’s slow.

©2015 Couchbase Inc. 7

How Does This Affect App Uninstall Rates?

0%

20%

40%

60%

80%

100%

FreezingCrashingSlow Responsiveness

Unin

stal

l Rat

e

Source: uSamp

Data Location is the Problem

8

Local Data + Sync is the Solution

9

©2015 Couchbase Inc. 10

What Does This Mean For Your Apps

Always work both online & offlineAlways be blazing fast

Built with orders of magnitude less codeUsers will absolutely love your apps

What is Couchbase Mobile?

Couchbase Lite Sync Gateway

©2015 Couchbase Inc. 13

Couchbase Lite

• NoSQL Mobile Database• Document Oriented & Schema-Less• Small Footprint• Runs In-Process

©2015 Couchbase Inc. 14

Couchbase Sync Gateway

• Data Replication Between Server & Device

• Data Orchestration• Authentication & Authorization

©2015 Couchbase Inc. 15

Channels

Sports San Francisco

Nature

Admin

©2015 Couchbase Inc. 16

Replication

Is asynchronous Can be continuous or one-shot Sends JSON over HTTP Handles network hiccups Network timeouts

17

Where Does Ionic Framework Fit In?

©2015 Couchbase Inc. 19

Ionic Framework

HTML5 & AngularJS Framework Built on Apache Cordova Build Once, Deploy Everywhere Accepts Apache Cordova Plugins

Couchbase Cordova Plugin

©2015 Couchbase Inc. 21

Couchbase Plugin

Compatible with Android and iOS Makes Couchbase Lite accessible via RESTful

APIs Easily integrate with Ionic Framework through

the ng-couchbase-lite wrapper

©2015 Couchbase Inc. 22

A Classic Todo List

©2015 Couchbase Inc. 23

NoSQL Documents

©2015 Couchbase Inc. 24

Creating a Database

©2015 Couchbase Inc. 25

Inserting Documents

©2015 Couchbase Inc. 26

Map / Reduce Views

Concept from functional program, via Google App-defined map function operates on

documents Function output generates an index ordered by

key Index rows can be aggregated via a reduce

function Index is queried by a key or key range

©2015 Couchbase Inc. 27

Couchbase Lite Views

©2015 Couchbase Inc. 28

Querying Couchbase Views

©2015 Couchbase Inc. 29

Replication With Sync Gateway

©2015 Couchbase Inc. 30

Listen for Changes

Couchbase Sync Gateway

©2015 Couchbase Inc. 32

Basic Sync Gateway Configuration

Demo Time!

©2015 Couchbase Inc. 34

Couchbase Labs on GitHub

https://github.com/couchbaselabs/todolite-ionic

Questions?

©2014 Couchbase, Inc.

©2015 Couchbase Inc. 36

San Francisco Couchbase Meetup

http://www.meetup.com/The-San-Francisco-Couchbase-Meetup-Group

©2015 Couchbase Inc. 37

We’re Hiring!http://www.couchbase.com/careers

©2015 Couchbase Inc. 38

Thank You!

Nic Raboy@nraboy (Twitter)

Recommended