DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
11 Monitoring and Observability Tools for 2023
Learn more
  1. DZone
  2. Coding
  3. Languages
  4. Reactive Extensions (Rx) For Event-based Programming

Reactive Extensions (Rx) For Event-based Programming

Rodrigo De Castro user avatar by
Rodrigo De Castro
·
Apr. 07, 12 · Interview
Like (0)
Save
Tweet
Share
7.92K Views

Join the DZone community and get the full member experience.

Join For Free
One of the nice .NET features I learned recently is called Reactive Extensions. This is a very nice library that allows asynchronous and event-based programs to be used as collections. I found it particularly compelling to learn it as I see more and more code being written in async way and event-driven. However, if you're not so used to this kind of programming, it is hard to wrap your mind around code that makes use of it - and debug and find where issues can be when they arise.

Reactive Extensions moves from a pull-model to a push-model, where instead of having a collection that implements an IEnumerable, you have an IObservable that you subscribe to. Your delegate is then called whenever an event is dispatched by your source. But it's not only that. You can make use of many Linq operators to make your code much simpler.

I'd recommend that you watch the videos on the following page:
http://msdn.microsoft.com/en-us/data/gg577611

Out of these videos, do the workshops and try the challenges. Since they are not ordered on the page above, let me list them in order here:
http://channel9.msdn.com/Series/Rx-Workshop/Rx-Workshop-Introduction
http://channel9.msdn.com/Series/Rx-Workshop/Rx-Workshop-Observables-versus-Events
http://channel9.msdn.com/Series/Rx-Workshop/Rx-Workshop-Unified-Programming-Model
http://channel9.msdn.com/Series/Rx-Workshop/Rx-Workshop-Writing-Queries
http://channel9.msdn.com/Series/Rx-Workshop/Rx-Workshop-Schedulers
http://channel9.msdn.com/Series/Rx-Workshop/Rx-Workshop-Event-Processing

Finally, another good link is this page with tens of Rx samples:
http://rxwiki.wikidot.com/101samples
Debug (command) .NET Links IT Library Event Operator (extension)

Published at DZone with permission of Rodrigo De Castro, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring Cloud
  • An End-to-End Guide to Vue.js Testing
  • How To Use Java Event Listeners in Selenium WebDriver
  • Multi-Tenant Architecture for a SaaS Application on AWS

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: