piggy-module
v0.1.0
Published
Basic business module: manager, vo, validator
Downloads
5
Readme
piggy-module
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
ormake b
to transpile src to libmake watch
ormake w
to start watching the src and automatically transpile filesmake clean
ormake 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
.