Terms, definitions and components
Definitions
- A feature is an independent and agnostic module that delivers a high level functionality by handling its complete lifecycle and accessing a set of server resources via Engine APIs
- A model is the database representation of a table, when used in a feature it can incorporate a Servable.App.Object subclass
- A Servable Engine is a module that serves as a bridge to an actual Node JS framework that will handle the actual routing, database management etc
- An Servable Engine API is a set of coherent apis that fill a certain high level need like Object, Query, ...
Servable Manifest 🐻
The Servable Framework is built around a set of simple requirements:
- A feature can be applied to multiple models
- A feature can have multiple models
- A model can be pollinated by multiple features
- A model belongs to a feature
- A Servable service is a feature itself
- A Servable engine is required for doing the actual heavy server work, ie routing, database and files management, etc.
- A Servable engine chooses to implement partially or fully Engine APIs
- A Servable service can switch between Servable engines as long as they implement the same set of Engine APIs
- A feature declares a list of required Engine APIs it needs to work
Servable server
The Servable server acts as a central orchestrator and mediator. It computes the target schema, calls for a database migration if needed, loads features, registers seeding, configuration, routes, jobs, etc.
Features
Servable streamlines the server development by separating every "groupable" logic to be a feature, so that it is organically extracted from the base code and possibly migrated into its own package. By doing so, Servable enforces a clear separation of concerns pattern out of the box. More
Just like a docker image is made to be platform agnostic, a feature is designed to be as independent as possible from the current environment it's being used in. A feature might depend on other features, but it does not need to know which application it is used for, or call any of its API, unless they are registered as a Service
Framework engine
The framework engine is a bridge to a more traditional Node JS framework. It conforms to Servable's engine APIs. By separating the actual implementation from the high level object manipulation, the Servable framework allows for a high reusability of your server and features code from the get-go. More