DEV Community

Discussion on: Redesigning a framework

Collapse
 
bluebackground profile image
bluebackground • Edited

After looking into Cycle.js docs and watching Andre's animated presentation about Cycle.js with react-native... so, would it be fair to say (cutting through all the terminology of drivers, etc.) Cycle.js is an application level event driven system based on streams, where there are composable event producers, event consumers, and maybe some intermediate event ingestors that act as the main way of communicating within a Cycle.js app? And this event based system can configure and "load"/connect groups of event producers and consumers as "plugins" at the application level? Essentially it's a localized microservices application architecture that can create and listen to app events on various streams and act (perform code effects) accordingly? Apologies in advance for any misunderstanding, my picture of Cycle.js might be a bit cloudy still.

Collapse
 
jvanbruegge profile image
Jan van Brügge

The gist sounds about right, but one of the main benefits of this is purity. Side effects (writing to the DOM, making HTTP requests, even time based functions like requestAnimationFrame) are only in the producers/consumers (the two sides of the driver). Your whole app only reads events and issues commands, but never does any side effects itself. This makes tracing bugs and also testing much easier