The Offline Persistence Toolkit simplifies life for application developers by providing a response caching solution that works well across modern browsers and web views. The toolkit covers common caching cases with a minimal amount of application-specific coding, but provides flexibility to cover non-trivial cases as well. In addition to providing the ability to cache complete response payloads, the toolkit supports "shredding" of REST response payloads into objects that can be stored, queried and updated on the client while offline.
The architecture diagram illustrates the major components of the toolkit and how an application interacts with it:
The Offline Persistence Toolkit is distributed as an npm package consisting of AMD modules.
To install the toolkit, enter the following command at a terminal prompt in your app’s top-level directory:
$ npm install @oracle/offline-persistence-toolkit
The toolkit makes heavy use of the Promise API. If you are targeting environments that do not support the Promise API, you will need to polyfill this feature. We recommend the es6-promise polyfill.
The toolkit does not have a dependency on a specific client-side storage solution, but does include a PouchDB adapter. If you plan to use PouchDB for your persistent store, you will need to install the following PouchDB packages:
$ npm install pouchdb pouchdb-find
You can also refer to the JET FixItFast sample app that makes use of the toolkit. You can refer directly to the source code and even use the Oracle JET command line interface to build and deploy the app to see how it works.
I hope you find this toolkit really useful and if you have any feedback, please submit issues on GitHub.
For more technical articles about the Offline Persistence Toolkit, Oracle JET and other products, you can also follow OracleDevs on Medium.com.
Introduction In this tutorial I demonstrate how to connect an app written in Python, Node.js or PHP running in Oracle Cloud...
In this post I’m going to demonstrate how quick and easy one can create an Autonomous Transaction Processing, short ATP, instance of...