pglet

module
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: Apache-2.0

README

Build status

Pglet - Web UI framework for back-end developers

Build web apps like a front-end pro in the language you already know. No knowledge of HTML, CSS or JavaScript is required.

What is Pglet

Pglet is a rich user interface (UI) framework for scripts and programs written in any language. Python, Bash, PowerShell and Node.js are already supported and other languages can be easily added via Pglet protocol.

Pglet renders web UI, so you can easily build web apps with your favorite language. Knowledge of HTML/CSS/JavaScript is not required as you build UI with controls. Pglet controls are built with Fluent UI React to ensure your programs look cool and professional.

Hello world in Bash

Install Pglet helper functions:

curl -O https://pglet.io/pglet.sh

Create hello.sh with the following contents:

. pglet.sh
pglet_page
pglet_add "text value='Hello, world!'"

Run sh hello.sh and in a new browser window you'll get:

Here is a page served by a local instance of Pglet server started in the background on your computer.

Now, add PGLET_WEB=true before pglet_page:

. pglet.sh
PGLET_WEB=true pglet_page
pglet_add "text value='Hello, world!'"

and instantly make your app available on the web!

Tutorials

How it works

Pglet UI does not become embedded into your program but is served by an out-of-process Pglet server. Application state and control flow logic lives in your persistent-process program while communicating UI changes and events to the Pglet server via IPC-based protocol. It allows writing web app as a standalone monolith without knowledge of the request/response model, routing, templating, or state management. Pglet server can be run locally, self-hosted in your local network or as a hosted service.

In a classic client-server architecture, the front-end communicates to one or more back-end services. Pglet implements an opposite approach where multiple back-end services are scattered across an internal network behind a firewall and communicate to a centralized Pglet web server, i.e., front-end service, installed in DMZ or hosted as a service. This design gives several advantages:

  • Secure by design - your internal services and critical data stay behind the firewall and are not accessible from the outside world.
  • Apps running next to services and data they process - faster/cheaper access and maximum security.
  • Zero deployment - run apps on any server in your network or your development machine, no need to deploy apps to a web server.

Use cases

  • Progress visualization for CI/CD workflows, batch jobs and cron tasks
  • Admin interfaces for internal services
  • Web dashboards and monitoring
  • Status pages
  • Executive reporting
  • Registration forms and questionnaires
  • Intranet self-service kiosks
  • Prototype and throw-away apps

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL