Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
/ paisley Public archive

SPA engine that sends HTML to clients and handles events via WebSocket.

License

Notifications You must be signed in to change notification settings

regiostech/paisley

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

paisley

Prince - Purple Rain

Pub

SPA engine that sends HTML to clients and handles events via WebSocket. Ideal for smaller apps, built very small teams (like, 1 person).

Named after the 🐐, Prince Rogers Nelson's, Paisley Park recording studio.

Fairly experimental.

Rationale

This was partially made just for fun, but also to shrink development for solo apps. No need to maintain both an Angel server and a React/Angular frontend, etc. Also, there's no need to use a module bundler.

State

You need to roll-your-own state management, especially to persist state after a reconnect.

window.localStorage is sent to Component.afterCreate. Use it accordingly...

Also, Paisley is smart enough to know when a reconnect occurs, and will not reset the whole page. This way, users can have as seamless an experience as is possible.

Gracefully handling disconnects

Paisley handles disconnects by reconnecting (using a truncated exponential backoff to not spam your server).

Use Component.afterCreate to continue running from a previous state.

In addition, when Paisley disconnects, it adds the paisley-disconnected CSS class to document.body, so you can potentially show some conditional content.

Installation

In your pubspec.yaml:

dependencies:
  paisley: ^0.0.0

About

SPA engine that sends HTML to clients and handles events via WebSocket.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages