Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
)
  • Loading branch information
amarantha-k authored and jamesnocentini committed May 3, 2019
1 parent dd316aa commit d9d50e7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 38 deletions.
1 change: 1 addition & 0 deletions modules/hotel-lister/pages/_partials/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
** xref:hotel-lister:introduction.adoc[Introduction]
** xref:hotel-lister:ios.adoc[iOS]
** xref:hotel-lister:android.adoc[Android]
19 changes: 0 additions & 19 deletions modules/hotel-lister/pages/android.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,6 @@ The sample project is a Cordova web application that allows users to query for a

image::ionic-listing-hotels.png[,250]

== Architecture

The user Interface is a web app written in Javascript using Ionic and is rendered within a WebView. The business logic and data model is written in native Java.
The data model uses Couchbase Lite as the embedded data persistence layer.
The https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html[Cordova Plugin API] acts as the bridging layer between the JavaScript and the native Java worlds . The plugin exposes a Javascript API to the web app.

This architecture allows you to write the User Interface code once for both iOS and Android apps while leveraging Couchbase Lite's native Android framework for data management.

image::arch-android.jpg[,400]

== Data Model

The data model for the app is very straightforward.
There is one type of document:
the _"hotel"_ document which contains the details of each hotel.
Those documents have a `"type": "hotel"` property.

image::data-model.png[,400]

== Pre-requisites

This tutorial requires the following components and versions to run successfully.
Expand Down
38 changes: 38 additions & 0 deletions modules/hotel-lister/pages/introduction.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= Introduction
:tabs:

In this tutorial, you will learn how to use Couchbase Lite in a Cordova application.

The sample project is a Cordova web application that allows users to query for and display a list of hotels stored in a Couchbase Lite database.



[{tabs}]
====
Android::
+
image::ionic-listing-hotels.png[,250]

iOS::
+
image::ionic-listing-hotels-ios.png[,250]
====

== Architecture

The user Interface is a web app written in Javascript using Ionic and is rendered within a WebView. The business logic and data model is written in native Swift.
The data model uses Couchbase Lite as the embedded data persistence layer.
The https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html[Cordova Plugin API] acts as the bridging layer between the JavaScript and the native Swift worlds . The plugin exposes a Javascript API to the web app.

This architecture allows you to write the User Interface code once for both iOS and Android apps while leveraging Couchbase Lite's native iOS framework for data management.

image::arch-android.jpg[,400]

== Data Model

The data model for the app is very straightforward.
There is one type of document:
the _"hotel"_ document which contains the details of each hotel.
Those documents have a `"type": "hotel"` property.

image::data-model.png[,400]
19 changes: 0 additions & 19 deletions modules/hotel-lister/pages/ios.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,6 @@ The sample project is a Cordova web application that allows users to query for a

image::ionic-listing-hotels-ios.png[,250]

== Architecture

The user Interface is a web app written in Javascript using Ionic and is rendered within a WebView. The business logic and data model is written in native Swift.
The data model uses Couchbase Lite as the embedded data persistence layer.
The https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html[Cordova Plugin API] acts as the bridging layer between the JavaScript and the native Swift worlds . The plugin exposes a Javascript API to the web app.

This architecture allows you to write the User Interface code once for both iOS and Android apps while leveraging Couchbase Lite's native iOS framework for data management.

image::arch-android.jpg[,400]

== Data Model

The data model for the app is very straightforward.
There is one type of document:
the _"hotel"_ document which contains the details of each hotel.
Those documents have a `"type": "hotel"` property.

image::data-model.png[,400]

== Pre-requisites

This tutorial requires the following components and versions to run successfully.
Expand Down

0 comments on commit d9d50e7

Please sign in to comment.