Open datarize opened 7 years ago
Components should register herself to other components to start interaction
at this part i'm not sure.
Should every component search for other components or should all just send their events to the app-component or an app-service which handles/routes all events/messages
In my opinion some sort of controller should be responsable for wiring the components together.
As you said, components should work independent from one another. They accept some specific events, but don't care at all what emitted them. So having every component to search for other components and events to connect to seems a bit out of scope to me.
Currently I see no benefit in having some sort of global registry for every event that passes through the system, other than maybe logging them all.
It would be nice to have each component act on her own, so that nothing depends on another component.
The Javascript Eventsystem should work nice for this.