@fireflysemantics/slice

[![Build Status](https://travis-ci.org/fireflysemantics/slice.svg?branch=master)](https://travis-ci.org/fireflysemantics/slice)

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@fireflysemantics/slice
81115.0.193 days ago4 years agoMinified + gzip package size for @fireflysemantics/slice in KB

Readme

Build Status
Slice
@fireflysemantics/slice
Lightweight Javascript Reactive State Management for Web Applications.
If you like the @fireflysemantics/slice API please star our Github Repository.
Install
Install Slice with peer dependencies:
npm i @fireflysemantics/slice tslib rxjs nanoid
Firefly Semantics Slice Development Center Media and Documentation

Concepts

Guides

Tasks

Youtube

Examples

API Documentation
See Typedoc API Documentation
The documentation for the API includes simple examples of how to apply the API to a use case.
Overview
Lightweight Reactive Server, Mobile, and Web Application State Management Built with RxJS and Typescript.
The API is designed to be as minimal as possible and should deliver the same features as other comparable frameworks with about 1/3 the lines of code.
It offers two types of reactive data stores:
  • Entity stores (EStore) for structured entity like data (Customer, Product, User, ...)
  • Entity stores can be "Live filtered" by adding slices. For example separating Todo entities into complete and incomplete compartments. Slices are also obserable.
  • Object store (Key value store) for unstructured data

Even though Angular is used for prototype applications, it should work well for:
  • Single page applications
  • Progressive web applications
  • React applications
  • Node applications / Pure Javascript Applications
  • Mobile Applications

Build

Run npm run c to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Jest.

Features

  • Live Stackblitz demoes
  • Typedoc with inlined examples
  • Well documented test cases run with Jest - Each file has a corresponding .spec file
  • Stream both Entity and Object Stores for UI Updates via RxJS
  • Define entities using Typescript classes, interfaces, or types
  • Active state tracking
  • Supports for Optimistic User Interfaces
  • RESTful API for performing CRUD operations that stream both full and delta updates
  • Dynamic creation of both object and entity stores
  • Observable delta updates for Entities
  • Real time application of Slice Predicate<E> filtering that is Observable
  • Predicate based snapshots of entities
  • Observable count of entities in the entity store. The count feature can also be Predicate filtered.
  • Configurable global id (Client side id - gid) and server id (id) id property names for entities.
  • The stream of entities can be sorted via an optional boolean expression passed to observe.

Tests

See the test cases.