https://github.com/tilap/piggy-module
Basic business module: manager, vo, validator
https://github.com/tilap/piggy-module
Last synced: over 1 year ago
JSON representation
Basic business module: manager, vo, validator
- Host: GitHub
- URL: https://github.com/tilap/piggy-module
- Owner: tilap
- License: mit
- Created: 2015-07-30T16:59:34.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-05T11:43:08.000Z (almost 11 years ago)
- Last Synced: 2025-03-07T16:19:25.654Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 602 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
piggy-module [![NPM version][npm-image]][npm-url] [![NPM version][doc-image]][doc-url]
============================
_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](https://doc.esdoc.org/github.com/tilap/piggy-module/)
_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`.
[npm-image]: https://img.shields.io/npm/v/piggy-module.svg?style=flat
[npm-url]: https://npmjs.org/package/piggy-module
[doc-image]: https://doc.esdoc.org/github.com/tilap/piggy-module/badge.svg
[doc-url]: https://doc.esdoc.org/github.com/tilap/piggy-module/