A framework for three-layered applications.
![License](https://camo.githubusercontent.com/75b0be3e822c2896f02eb88647aa043ab92f3e55e3b6e12609512fde8d739d47/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76332d627269676874677265656e2e737667)
Why use it?
- Uses common design patterns.
- Mediator (To connect Services)
- Abstract Factory (To create a Service and its Repos)
- Strategy (To switch Repos in a Service)
- Decorator (To cache data in Repos)
- Observer (Services observe changes in Repos and Faces observe changes in Services)
- Works on the client and server.
- Library agnostic.
You can use this framework alongside other libraries. For example, repository and interface libraries such as Knex, MongoDB, Firebase, React, Express, Commander, etc.
- Attempts to follow the SOLID OO design principles.
Recommendations
- User-to-application logic should go in "Faces" (Interfaces)
- Application-to-storage logic should go in "Repos" (Repositories).
- Business logic should go in "Services".
- Use a Factory to create a Service and its Repo(s).
- Store instances of Factories in Mediators to connect Services.
- Relationships and validation (amongst other things) belong in Services (not usually Repos or Faces).
Examples