@fireflysemantics/slice

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

Stats

StarsIssuesVersionUpdatedCreatedSize
@fireflysemantics/slice
8314.0.6a month ago3 years agoMinified + gzip package size for @fireflysemantics/slice in KB

Readme

Build Status

Slice

Install

Install Slice with peer dependencies:

npm i @fireflysemantics/slice tslib rxjs nanoid

Firefly Semantics Slice Development Center Documentation

Guides

Tasks

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.

Stackblitz Todo Entity Store Demo

https://stackblitz.com/edit/slice-todo-1329

Tests

See the test cases.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.