Reactive Event-Based Programming

Karl L Hughes
Jan 30, 2017 · 1 min read

I’ve started using Angular 2.4 at The Graide Network, and one of the tools they encourage is a reactive programming library called RxJS. I have not done much functional programming or worked extensively with event-driven programming, so this has been a challenge. It’s fun, but still a challenge.

I think the biggest difference I notice is that when organizing code, I am no longer concerned with which object should contain which methods and properties, but instead which store should provide which observables. Building responses asynchronously across multiple API calls and user interactions makes reactive programming a big challenge for state debugging as well. Unlike in object oriented programming, where the state of each object is likely known by the look of the UI, reactive programming allows for states to change under the hood without changing the whole application’s state.

Another thing that I notice when switching between reactive and object oriented code often (as I’m now doing) is that it’s making me think in new ways about my old code, which I really like. Every time I pick up a new framework, language, or library it seems to stretch my thinking about other tools that I’ve been using before.

What I’m reading

Written by

Technology team builder, software engineer, and startup enthusiast. CTO at @GraideNetwork and helping technology speakers succeed at @cfp_land.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade