Skip to content

ui5-service-worker-sample demonstrates how the Service Worker API, available in modern web browsers, could be used in a UI5 app to realize different caching strategies.

License

Notifications You must be signed in to change notification settings

SAP-samples/ui5-service-worker-sample

UI5 logo

ui5-service-worker-sample

REUSE status

Description

This sample demonstrates how the Service Worker API, available in modern web browsers, could be used in a UI5 app to realize different caching strategies.

It includes the openui5-sample-app and combines it with the ui5-service-worker code itself.

DISCLAIMER: This sample demonstrates possible usages of service workers for caching strategies of an UI5 app. You have to figure out what parts to adopt for your own productive applications.

Requirements

Download and Installation

  1. Clone this repository and navigate into it

    git clone https://github.com/SAP-samples/ui5-service-worker-sample.git
    cd ui5-service-worker-sample
  2. Install all dependencies

    npm install
  3. Build the application

    npm run build-ui5
  4. Start a local server and run the application

    npm start
  5. Navigate to http://localhost:8080/index.html

Video

Video

Content Structure

This ui5-service-worker-sample project consists of:

  1. openui5-sample-app
  2. ui5-service-worker

Integrate into Own App

Follow the detailed Integration section on how you could extract and integrate the ui5-service-worker into your own application.

Configuration

Find additional configuration options of the ui5-service-worker in the Configuration section.

UI5con Presentation

This sample project was derived to showcase features originally presented at UI5con:

Alternative Scenarios

  • Serve the sample application with a local server using h2
    npm run start-h2

Known Issues

No major bugs known.

Contributing

In general the contributing guidelines of OpenUI5 also apply to this project. They can be found here: https://github.com/SAP/openui5/blob/master/CONTRIBUTING.md

Some parts might not be relevant for this project (e.g. the browser-specific requirements like jQuery, CSS and accessibility in the "Contribution Content Guidelines") and the contribution process is easier (pull requests will be merged directly on GitHub).

Contributing with AI-generated code

As artificial intelligence evolves, AI-generated code is becoming valuable for many software projects, including open-source initiatives. While we recognize the potential benefits of incorporating AI-generated content into our open-source projects there are certain requirements that need to be reflected and adhered to when making contributions.

Please see our guideline for AI-generated code contributions to SAP Open Source Software Projects for these requirements.

License

Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

About

ui5-service-worker-sample demonstrates how the Service Worker API, available in modern web browsers, could be used in a UI5 app to realize different caching strategies.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published