common library
Common Clean Architecture data types
These modules are here mainly for inspiration, if you decide to use them make sure you understand what clean architecture is and use your judgement.
These modules will not turn your codebase into clean code. In fact it may have the opposite effect. If you couple your code to this package, you are essentially being bound by decisions made by the authors. This will work well for when things works, you have no need to deviate from the path that the package draws.
When you see need to do all things cleanly, simply, and with 100% I suggest not using this package at all.
Classes
-
AnInput<
T extends ARequest> - AnInput
-
AnOutput<
F extends Failure, S extends Model> - AnOutput
-
Repository<
T extends Model> -
A Repository interface
Generic Interface boundary for data persistence/gateway Objects - ServiceProvider
-
A generic Service interface for A Business Model
Services and Interactors can generalize input using this interface
Mixins
- ARequest
- Request
-
ResponseBuilderMixin<
F extends Failure, S extends Model> - A convenience class for response construction using method composition This may not supply all use cases, a custom response building maybe required in that case
Typedefs
-
ResponseBuilder<
R extends ARequest, F extends Failure, S extends Model> = dynamic Function(ResponseProvider< R, F, S> provider) -
ResponseProvider<
R extends ARequest, F extends Failure, S extends Model> = Future< Either< Function(R request)F, S> >