I am trying to learn the Flux pattern.
I learned to use React with .net MVC and rendered it server side.
I would like to learn Flux but all tutorials use node js.
I don't use node.
I don't know how to implement the Event Emitter part because it uses a node function.
https://www.codementor.io/reactjs/tutorial/react-js-flux-architecture-tutorial
About a 1/3 of the way down:
"Event Emitter – The event emitter is responsible for notifying subscribers after a store has completed any data action. Conversely, it also needs to be able to register observers for specific events. We’re going to be using Node’s event emitter in the todo application."
Given that Flux is simply a pattern, is there something that I can use with .net MVC, in the absence of node, to handle the Event Emitter part?
Thoughts appreciated, thanks.
You can use .NET Delegates, which is well documented here https://msdn.microsoft.com/en-us/library/edzehd2t%28v=vs.110%29.aspx
Delegates are multicast, which means that they can hold references to more than one event-handling method.
This will of course be a server-side implementation of the Flux pattern.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With