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
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone >

Reactive Extensions (Rx) For Event-based Programming

Rodrigo De Castro user avatar by
Rodrigo De Castro
·
Apr. 07, 12 · · Interview
Like (0)
Save
Tweet
7.73K 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

  • How the TypeScript ReturnType Works
  • Cypress: The Future of Test Automation! Advantages and Disadvantages
  • Java Outsourcing, a Strong Business, and Management Approaches
  • Servlets Listeners Introduction and Examples

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • 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:

DZone.com is powered by 

AnswerHub logo