titan-framework
v0.0.17
Published
A framework for three-layered applications.
Downloads
18
Readme
Titan
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).