From bc96d24abdaf0784daf7dae8e530b4ce217d0b55 Mon Sep 17 00:00:00 2001 From: Elliot Francis Hunter <45071242+ElliotFrancisHunter@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:58:50 +0100 Subject: [PATCH] Doc 12584 new javascript plugin doc (#916) * DOC-12584: Dead file removal * DOC-12584: What's new page addition * DOC-12584: Move Cordova down Move Cordova to bottom of nav as it's not being actively maintained. * DOC-12584: What's new addition Added plugin announcement to what's new page. * DOC-12584: Update JavaScript quickstart page. Changelist: -- Removing 404 ionic link -- Updating Ionic and React sections to include new plugin documentation links and the new react example project * DOC-12584: Update and replace existing documentation Replaced existing doc with new content for the ionic and react doc pages * DOC-12584: Remove cordova plugin content from docs Remove doc page, nav entry and quickstart links * DOC-12584: Doc feedback Remove features and limitations from react as already in devrel doc Add support information Add missing links * DOC-12584: Dead code removal * DOC-12584: Applying PM and docs feedback * DOC-12584: Docs feedback tidy up * Apply suggestions from code review Co-authored-by: Simon Dew <39966290+simon-dew@users.noreply.github.com> * DOC-12584: More detailed link context * Update modules/javascript/pages/react.adoc Co-authored-by: Ray Offiah <77050471+RayOffiah@users.noreply.github.com> --------- Co-authored-by: Simon Dew <39966290+simon-dew@users.noreply.github.com> Co-authored-by: Ray Offiah <77050471+RayOffiah@users.noreply.github.com> --- modules/ROOT/nav-javascript | 5 -- modules/ROOT/pages/javascript | 90 ------------------------ modules/javascript/nav-javascript.adoc | 1 - modules/javascript/pages/cordova.adoc | 42 ----------- modules/javascript/pages/ionic.adoc | 73 ++++--------------- modules/javascript/pages/quickstart.adoc | 40 ++--------- modules/javascript/pages/react.adoc | 54 ++++++-------- 7 files changed, 44 insertions(+), 261 deletions(-) delete mode 100644 modules/ROOT/nav-javascript delete mode 100644 modules/ROOT/pages/javascript delete mode 100644 modules/javascript/pages/cordova.adoc diff --git a/modules/ROOT/nav-javascript b/modules/ROOT/nav-javascript deleted file mode 100644 index 1dd299678..000000000 --- a/modules/ROOT/nav-javascript +++ /dev/null @@ -1,5 +0,0 @@ -// - -* xref:ROOT:javascript.adoc[JavaScript] - -// \ No newline at end of file diff --git a/modules/ROOT/pages/javascript b/modules/ROOT/pages/javascript deleted file mode 100644 index 674690703..000000000 --- a/modules/ROOT/pages/javascript +++ /dev/null @@ -1,90 +0,0 @@ -= JavaScript -:page-edition: -:page-status: -:page-role: -:page-toclevels: 2@ -:description: Using Couchbase Lite with Javascript applications - -// :topic-group: platforms -:param-abstract: If you are building mobile or desktop applications using web technologies such as JavaScript/HTML/CSS, here are some options for using Couchbase Lite as an embedded database within your app. -:param-related!: - -include::partial$_set_page_context_for_root.adoc[] - -include::partial$_show_page_header_block.adoc[] - - -== Ionic - - - -=== Enterprise Edition Deployments - -Ionic's Couchbase Lite integration is tailor-made for web developers, making it easy to build secure, high-performance, offline-enabled apps. -This premier integration supports apps built for iOS, Android, and native Windows. - -Using a robust JavaScript API, you can access the entirety of Couchbase Lite's functionality with no native experience required. - -As a starting point, follow the hotel search tutorial. -The tutorial shows how to build an app that allows users to search and bookmark hotels using data loaded from a Couchbase Lite database -- see tutorial at -https://ionic.io/docs/couchbase-lite/tutorials/hotel-search - - -.Resources -**** -* Docs: -https://ionic.io/docs/couchbase-lite. + - -* Tutorial: -https://ionic.io/docs/couchbase-lite/tutorials/hotel-search + - -* Demo: -https://github.com/ionic-team/demo-couchbaselite-hotels + - -* *Download*: -Reach out to _Ionic_ sales to get access, either from the -https://ionic.io/docs/couchbase-lite[docs page] or this -https://ionic.io/integrations/couchbase-lite[landing page] - -**** - -=== Community Edition Deployments - -You can build your own native plugin on top of Couchbase Lite's native API for iOS and Android. -The plugin is independent of the application's UI layer and can be used to access native functionality from within your Ionic apps. - -Ionic recommends use of -https://capacitorjs.com/docs/plugins[Capacitor] -, so building a capacitor plugin would be preferred option - - -== Cordova - - -In order to use Couchbase Lite as an embedded database within your Cordova-based app, you will need a way to access Couchbase Lite's iOS and Android native APIs from within your Cordova web application. - -https://cordova.apache.org/docs/en/10.x/guide/hybrid/plugins/index.html[Cordova Native Plugins] -allow web-based apps running in a Cordova webview to access native platform functionality through a Javascript interface. -So in order to use Couchbase Lite within your Cordova apps, you will have to implement a Cordova native plugin that exports the Couchbase Lite Android and iOS APIs to Javascript. -It is typical to start with exporting the minimal subset of APIs that your app needs and extend as needed. - -*Note:* A reference implementation of a Cordova plugin will be available shortly. - - -== React Native - - -In order to use Couchbase Lite as embedded database within your React Native app, you will need a way to access Couchbase Lite's iOS and Android native APIs from within your React Native JS application. - -https://reactnative.dev/docs/native-modules-intro[React Native Modules] -allow mobile apps written in React Native to access native platform APIs. -So in order to use Couchbase Lite within your React Native apps, you will have to implement a React Native plugin that exports the Couchbase Lite Android and iOS APIs to Javascript. -It is typical to start with exporting the minimal subset of APIs that your app needs. - -*Note:* A reference implementation of a React Native plugin will be available shortly. - - -// DO NOT EDIT -- Footer Related Content Block -// include::{root-partials}block-related-content-std.adoc[] -// DO NOT EDIT - diff --git a/modules/javascript/nav-javascript.adoc b/modules/javascript/nav-javascript.adoc index 8d55bebb7..91af12e14 100644 --- a/modules/javascript/nav-javascript.adoc +++ b/modules/javascript/nav-javascript.adoc @@ -1,4 +1,3 @@ .xref:javascript:quickstart.adoc[Javascript] * xref:javascript:ionic.adoc[] -* xref:javascript:cordova.adoc[] * xref:javascript:react.adoc[] diff --git a/modules/javascript/pages/cordova.adoc b/modules/javascript/pages/cordova.adoc deleted file mode 100644 index 6f9e116cc..000000000 --- a/modules/javascript/pages/cordova.adoc +++ /dev/null @@ -1,42 +0,0 @@ -= Cordova -:page-partials: -:page-toclevels: 2@ -:description: Using Couchbase Lite with Javascript applications - -include::partial$_set_page_context_for_javascript.adoc[] - -:param-abstract: If you are building mobile or desktop applications using web technologies such as JavaScript/HTML/CSS, there are options for using Couchbase Lite as an embedded database within your app. -:param-related: xref:ionic.adoc[] | xref:react.adoc[] -include::{root-partials}_show_page_header_block.adoc[] - -NOTE: Couchbase Lite for Cordova is a community-driven project without official support from Couchbase. - -== Introduction - - -// tag::summary[] -To use Couchbase Lite as an embedded database within your Cordova-based app, you need a way to access Couchbase Lite's iOS and Android native APIs from within your Cordova web application. - -// end::summary[] - - -== Native Functionality - - -https://cordova.apache.org/docs/en/10.x/guide/hybrid/plugins/index.html[Cordova Native Plugins] -allow web-based apps running in a Cordova webview to access native platform functionality through a Javascript interface. - -.Enterprise-only -[NOTE] -Ionic supports both https://capacitorjs.com/docs/plugins[Capacitor] and Cordova, with Ionic recommending use of Capacitor. - -To use Couchbase Lite within your Cordova apps, you should implement a Cordova native plugin, which exports the Couchbase Lite Android and iOS APIs to Javascript. -It is typical to start with exporting the minimal subset of APIs that your app needs and extend as needed. - -*A reference implementation of a Cordova plugin will be available shortly.* - - -// DO NOT EDIT -- Footer Related Content Block -// include::{root-partials}block-related-content-std.adoc[] -// DO NOT EDIT - diff --git a/modules/javascript/pages/ionic.adoc b/modules/javascript/pages/ionic.adoc index ec74cb3f4..ff1f90dbb 100644 --- a/modules/javascript/pages/ionic.adoc +++ b/modules/javascript/pages/ionic.adoc @@ -1,77 +1,34 @@ = Ionic :page-partials: -:page-edition: +:page-edition: Public Preview :page-toclevels: 2@ -:description: Using Couchbase Lite with Javascript Ionic applications +:description: The Ionic Capacitor plugin for Couchbase Lite allows developers to leverage Couchbase Lite within cross-platform applications in JavaScript for iOS and Android. include::partial$_set_page_context_for_javascript.adoc[] -:param-abstract: If you are building mobile or desktop applications using web technologies such as JavaScript/HTML/CSS, there are options for using Couchbase Lite as an embedded database within your app. -:param-related: xref:cordova.adoc[] | xref:react.adoc[] -include::{root-partials}_show_page_header_block.adoc[] +== Overview -.Support Changes -[IMPORTANT] +NOTE: Developers who are currently using the https://ionic.io/docs/couchbase-lite[previous version of the Ionic plugin] should migrate to the newer version of the plugin documented at https://cbl-ionic.dev[Couchbase Lite for Ionic Capacitor]. --- -* The Ionic plugin is now open source and community supported. -* The Couchbase Lite API, which contains storage and sync functionality, is fully supported as normal for Enterprise customers. --- +This public preview release enables developers using Ionic to integrate Couchbase Lite into their mobile applications, ensuring they can build offline-first, cross-platform solutions with ease. -== Introduction +== Important Notes +* Platform Support - The plugin currently supports iOS and Android platforms. -// tag::summary[] -Ionic's Couchbase Lite integration is an open source solution for web developers, enabling easy to build secure, high-performance, offline-enabled apps. +* Couchbase Community Supported - This open-source plugin is Couchbase Community supported. +Note that the Couchbase Lite binary linked to the plugin is Couchbase Lite Enterprise Edition (EE) and its use is guided by the terms and conditions of the https://www.couchbase.com/2018-04-30v3_License_Agreement/[Couchbase Lite Enterprise license agreement]. -// end::summary[] -This integration supports apps built for iOS, Android, and native Windows. +NOTE: _**Couchbase Community Supported**_ is an Open source integration that is developed by Couchbase. Issues related to the integration can be raised in the relevant GitHub repositories or via Couchbase forums or Discord. Support is provided best effort by development team. +For more information, see xref:cloud:third-party:integrations.adoc#support-model[Support Models]. -[NOTE] --- -Users can build their own native plugin on top of Couchbase Lite's native API for iOS and Android. -Ionic recommends use of -https://capacitorjs.com/docs/plugins[Capacitor], which can be used independent of the application's UI layer, to access native functionality from within Ionic apps. --- +== Getting Started -== Open source Plugin +You can get started with the new Ionic plugin and review the official documentation by visiting https://cbl-ionic.dev[the Ionic Plugin Documentation]. -There are several benefits to be drawn from the open source Ionic integration with Couchbase Lite: +== Next Steps -. It is free to use. -. You have the flexibility to customise the plugin to your needs. -. You have more control over the functionality of the plugin and how it interacts with your applications. -. You can contribute to and engage with a community of developers who also make use of the plugin. - -Alternatively, you can build your own native application on top of https://capacitorjs.com/docs/plugins[Capacitor]. - -== Accessing Couchbase Lite - -Using a robust JavaScript API, you can access the entirety of Couchbase Lite's functionality with no native experience required. - -As a starting point, you should follow the hotel search tutorial. + -The tutorial shows how to build an app that allows users to search and bookmark hotels. -It uses data loaded from a Couchbase Lite database -- see the tutorial at -https://ionic.io/docs/couchbase-lite/tutorials/hotel-search - -.Resources -**** - -Docs:: -https://ionic.io/docs/couchbase-lite. - -Tutorial:: -https://ionic.io/docs/couchbase-lite/tutorials/hotel-search - -Demo:: -https://github.com/ionic-team/demo-couchbaselite-hotels - -Download:: -Reach out to _Ionic_ sales to get access, either from the -https://ionic.io/docs/couchbase-lite[docs page] or this -https://ionic.io/integrations/couchbase-lite[landing page] - -**** +As this is a community-supported project, we encourage you to explore, test, and provide feedback to help us improve the Ionic plugin for Couchbase Lite. Feel free to file issues through the https://github.com/Couchbase-Ecosystem/cbl-ionic/issues[GitHub issue tracker], our https://www.couchbase.com/blog/couchbase-on-discord/[Community Discord] or https://www.couchbase.com/forums/[Couchbase Forums]. // DO NOT EDIT -- Footer Related Content Block diff --git a/modules/javascript/pages/quickstart.adoc b/modules/javascript/pages/quickstart.adoc index e9018fae3..173ab57d6 100644 --- a/modules/javascript/pages/quickstart.adoc +++ b/modules/javascript/pages/quickstart.adoc @@ -34,33 +34,22 @@ image::ROOT:manage-and-store-data-locally.svg[,250] [.content] .xref:javascript:ionic.adoc[Ionic] -// include::ionic.adoc[tag="summary"] - -* https://ionic.io/integrations/couchbase-lite[Couchbase{nbsp}Lite{nbsp}Integration] - -* https://ionic.io/docs/couchbase-lite[Documentation] - -* https://ionic.io/docs/couchbase-lite/tutorials/hotel-search[Tutorial] - * https://capacitorjs.com/docs/plugins[Capacitor] -[.column] -====== {empty} -[.content] -.xref:javascript:cordova.adoc[Cordova] +* https://cbl-ionic.dev[Plugin{nbsp}Documentation] -// include::cordova.adoc[tag="summary"] - -* https://cordova.apache.org/docs/en/10.x/guide/hybrid/plugins/index.html[Cordova{nbsp}Native{nbsp}Plugins] +* https://ionic.io/docs/couchbase-lite/tutorials/hotel-search[Tutorial] [.column] ====== {empty} [.content] .xref:javascript:react.adoc[React] -// include::react.adoc[tag="summary"] +* https://reactnative.dev/docs/native-modules-intro[React Native Modules] -* https://reactnative.dev/docs/native-modules-intro[React{nbsp}Native{nbsp}Modules] +* https://cbl-reactnative.dev[Plugin Documentation] + +* https://github.com/couchbase-examples/expo-cbl-travel[Example Project] [.column] @@ -77,23 +66,6 @@ image::ROOT:manage-and-store-data-locally.svg[,250] ====== {empty} [.content] -// .Tutorials -// * ... -// * ... -// * ... - ++++ ++++ - -// END -- inclusion -- quickstart-skeleton.adoc -- landing page for Couchbase Lite on 'xxxx' - - - - - - - -// DO NOT EDIT OR REMOVE -// include::{root-partials}block-related-content-p2psync.adoc[] -// DO NOT EDIT OR REMOVE diff --git a/modules/javascript/pages/react.adoc b/modules/javascript/pages/react.adoc index 62e19f78c..29f19a63f 100644 --- a/modules/javascript/pages/react.adoc +++ b/modules/javascript/pages/react.adoc @@ -1,56 +1,48 @@ = React Native :page-partials: +:page-edition: Public Preview :page-toclevels: 2@ -:description: Using Couchbase Lite with Javascript applications +:description: The React Native plugin for Couchbase Lite is now in public preview. This is an open-source, community-supported project developed by Couchbase. include::partial$_set_page_context_for_javascript.adoc[] -:param-abstract: If you are building mobile or desktop applications using web technologies such as JavaScript/HTML/CSS, there are options for using Couchbase Lite as an embedded database within your app. -:param-related: xref:ionic.adoc[] | xref:cordova.adoc[] -include::{root-partials}_show_page_header_block.adoc[] +== Overview +Couchbase Lite Enterprise Edition for React Native is a Native Module implementation that uses TypeScript. +This public preview release enables developers using React to integrate Couchbase Lite into their mobile applications, ensuring they can build offline-first, cross-platform solutions with ease. -:tutorial: https://github.com/couchbaselabs/userprofile-couchbase-mobile-reactnative/blob/main/README.md +More information on React Native Native Modules can be found at https://cbl-reactnative.dev/[Couchbase Lite Enterprise Edition for React Native]. -:docs: https://reactnative.dev/docs/native-modules-intro +== Important Notes -:ref_implementation: https://github.com/couchbaselabs/couchbase-lite-react-native-module/ +* Platform Support - This plugin currently only supports iOS and Android platforms. Web, Windows, and macOS are not currently supported. -NOTE: Couchbase Lite for React Native is a community-driven project without official support from Couchbase. +* Couchbase Community Supported - This open-source plugin is Couchbase Community supported. +Note that the Couchbase Lite binary linked to the plugin is Couchbase Lite Enterprise Edition (EE) and its use is guided by the terms and conditions of the https://www.couchbase.com/2018-04-30v3_License_Agreement/[Couchbase Lite Enterprise license agreement]. -// == Introduction +NOTE: _**Couchbase Community Supported**_ is an Open source integration that is developed by Couchbase. Issues related to the integration can be raised in the relevant GitHub repositories or via Couchbase forums or Discord. Support is provided best effort by development team. +For more information, see xref:cloud:third-party:integrations.adoc#support-model[Support Models]. +== Getting Started +You can use the links below to help you get started with the React Native plugin for Couchbase Lite: -// tag::summary[] -To use Couchbase Lite as an embedded database within your React Native app, you need a way to access Couchbase Lite's iOS and Android native APIs from within it. +* https://cbl-reactnative.dev[Official Documentation]. -React Native's _NativeModule_ system provides an answer, exposing instances of native classes to JavaScript (JS) as JS objects. +* https://github.com/couchbase-examples/expo-cbl-travel[Example Project] - A hands-on demonstration using Expo to showcase Couchbase Lite in a React Native app. -// end::summary[] +* https://github.com/Couchbase-Ecosystem/cbl-reactnative[Project Repository]. +=== Why Use Expo? -// == Functionality +Couchbase recommends using Expo. +Expo makes working with React Native simpler and more efficient. +You can find information on the prerequisites and setup, including Expo configuration at https://cbl-reactnative.dev/StartHere/prerequisites[Couchbase Lite for React Native Prerequisites]. +== Next Steps -{docs}[React Native Modules] -allow mobile apps written in React Native to access native platform APIs. -So in order to use Couchbase Lite within your React Native apps, you should implement a React Native plugin that exports the Couchbase Lite Android and iOS APIs to Javascript. -It is typical to start with exporting the minimal subset of APIs that your app needs. +As this is a community-supported project, we encourage you to explore, test, and provide feedback to help us improve the React Native plugin for Couchbase Lite. Feel free to file issues through the https://github.com/Couchbase-Ecosystem/cbl-reactnative/issues[GitHub issue tracker], our https://www.couchbase.com/blog/couchbase-on-discord/[Community Discord] or https://www.couchbase.com/forums/[Couchbase Forums]. -.Resources -**** - -Docs:: -*{docs}[Docs:]* ({docs}) - -Tutorial:: -This tutorial is based on our series of _Getting Started_ User Profile app tutorials. + -*{tutorial}[Get Started:]* ({tutorial}) - -Reference Implementation:: -{ref_implementation}[Reference Implementation] ({ref_implementation}) // DO NOT EDIT -- Footer Related Content Block // include::{root-partials}block-related-content-std.adoc[] // DO NOT EDIT -