SolfegeJS provides a modular mecanism to build applications. It helps to initialize and communicate with bundles that contain all the logic and resources.
The application is the container that contain bundles. It is used to initialize, configure and run bundles.
It also provides a way of communicating between bundles via internal URIs.
A bundle is a structured set of files that implements a single feature.
It can be independent or it may need other bundles.
After creating instances, the application adds the bundles into his registry. Then, it initializes the bundles and dispatches a "start" event. Each bundle can listen the event and act accordingly.
Here are some use cases. They are intentionally simple in order to highlight the concepts.
A clock displayed on the terminal
This is a simple bundle that display a clock. It listen the "
start" event of the application and write the time on the screen.
Command Line Interface to manipulate images
It is a set of commands available in the terminal. It uses the bundle solfegejs-cli that listen the "
bundles_initialized" event to get available commands from the other bundles and expose them.
The solfegejs-server provides a HTTP server with a middleware mecanism. The router and template engine are middlewares. Each bundle configuration can be overridden by the application.