Basic business module: manager, vo, validator
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
lib
src
.gitignore
.jshintrc
.npmignore
AUTHORS
LICENSE
Makefile
Makefile.help
README.md
esdoc.json
gulpfile.js
package.json

README.md

piggy-module NPM version NPM version

This project is a work in progress and not to use in production.

Piggy-module is a bunch of class to bind business work to technical storages.

It comes with the following extendable classes:

  • Service: business interface (the only one to use from "controllers"). Can trigger action to other services.
  • Manager: manage its associated Value Object. Called by the Service, trigger validation and translate the Vo as data to send to the Storage.
  • Storage: extends AbstractStorage, and deel with basic data storage action (crud).
  • Vo: The business object itself maybe should be named DTO instead of Value Object

A business package is a bunch of all of that classes, with a configuration file describing the object properties / validations.

The code documentation is available here

I will complete that file once it a stable enough

Developer

Installing dev dependencies, you get the following make commands

  • make build or make b to transpile src to lib
  • make watch or make w to start watching the src and automatically transpile files
  • make clean or make c to clean the lib directory

And to make ease, you can use make cbw that run clean, build then watch.

Linting can be done by running npm lint.