DWC Deployment Options
Overview
DWC applications are published as web applications that users can access through a browser. For information about application registration, standard deployment URLs, and context mapping configuration, see: Registering and Launching a DWC App.
DWC offers additional deployment options beyond the standard webapp URL:
-
Embedded Deployment- Host DWC apps in custom HTML pages -
Progressive Web Apps (PWA)- Deploy as installable web applications with support for offline resources.
DWC Embedded Deployment
In BBj 21.13 and higher, a published DWC application can be embedded in a custom HTML page saved to the basis/htdocs/ directory. For the HTML template and embedded deployment instructions, see: DWC Embedded Deployment section in Registering and Launching a DWC App.
Use Cases for Embedded Deployment
Use Cases for Embedded Deployment
Embedded deployment allows DWC applications to be integrated into custom HTML pages for the following use cases:
-
Add custom metadata to the
<head>section -
Include custom CSS or JavaScript
-
Integrate with existing web pages
-
Add analytics or tracking code
BBjPWA - Progressive Web Apps
A Progressive Web App (PWA) is a web application that provides a user experience similar to native applications on desktop and mobile devices. PWAs can be accessed through a web browser or installed on devices that support PWA installation.
Why Use PWAs?
The following table summarizes the key features and benefits of Progressive Web Apps:
| Feature | Description |
|---|---|
| Responsive Design | Adapts to various screen sizes across desktop and mobile. |
| Native-Like Interactions | Smooth and intuitive interactions similar to native apps. |
| Secure | Served over HTTPS for data security and privacy. |
| Installable | Users can save to home screens with icons for easy access. |
| Shareable | Share via URL without installation. |
| Cross-Platform | Can be published to Apple App Store, Google Play, and Microsoft Store subject to platform-specific packaging and publication requirements. |
BBjPWA Tool
BASIS provides BBjPWA, a Node.js-based command-line interface (CLI) tool designed to transform a DWC application into a Progressive Web App.
BBjPWA Capabilities
-
Index Page- Creates an entry point for your DWC application as an embedded DWC app -
Web App Manifest- Generates amanifest.jsonfile for PWA functionality -
Icons- Automatically generates icons in various sizes for different platforms -
Service Worker- Caches app resources for improved performance and offline support -
Offline Page- Generates a page displayed when users lose internet connectivity
Note: Service worker and Offline Page generation are optional capabilities that must be enabled when generating the PWA resources.
The Web App Manifest
The manifest.json file contains information that defines how a Progressive Web App is presented and launched, including its application name, starting URL, display mode, colors, and icons.
The following example shows a basic web app manifest for a DWC application:
|
For installation promotion in Chromium-based browsers, the manifest should include both 192x192 and 512x512 icons. For additional information about manifest properties and configuration, see: Web App Manifest Reference.
Getting Started with BBjPWA
The following steps outline the process of generating and deploying PWA resources for a DWC application:
-
Install Node.js (if not already installed)
-
Install BBjPWA from GitHub
-
Run the CLI tool to generate PWA assets for your DWC app
-
Deploy the generated files alongside your DWC application
Service Workers and Offline Support
Service workers can cache application resources in the browser, including:
-
HTML, CSS, and JavaScript files
-
Images and other static assets
-
API responses (when configured)
Caching allows these resources to remain accessible when network connectivity is limited or unavailable. However, DWC application functionality that requires communication with the BBj server still requires an active connection. For additional information about resource caching and offline functionality, see: Using Service Workers.
Choosing a Deployment Option
The choice of deployment option depends on the application's requirements, including customization, integration with existing websites, installation, and offline resource support.
The following table summarizes the deployment options and their common use cases:
| Option | Best For |
|---|---|
| Standard webapp URL | Most applications, simple deployment |
| Embedded deployment | Custom branding, additional metadata, integration with existing sites |
| PWA | Mobile users, offline resource support, app store distribution |
Sea Also
EM: App Deployment Applications