Skip to content


Announcing: TinyMessenger

Introduction

Just a small post to announce I have added, and finally documented, TinyMessenger to the TinyIoC project.

Tiny What-Now?

TinyMessenger provides an event aggregator/messenger for loosely coupled communication. Some scenarios where this may prove useful :

  • Communication between Controllers/ViewModels.
  • Service classes raising “events”.
  • Removing responsibilities from classes that receive external events (such as the AppDelegate in an iPhone application).
  • Decoupling communication between classes.

TinyMessenger uses a Publish/Subscribe model and is orderless, so you can subscribe to a message even if there’s nobody publishing, and you can publish one even if nobody is subscribed. It is also loosely coupled in that the publisher and subscriber know nothing of each other, all they both care about is the message itself. Some of the key features are:

  • Simple and orderless Publish/Subscribe API.
  • Messages either need to implement a simple “marker” interface, or they can build on the “base” classes that are in the box (TinyMessageBase and GenericTinyMessage<TContent>.
  • Subscriptions can supply an optional filter – only message that “pass” the filter are delivered.
  • Subscriptions can supply an optional “proxy”. A proxy can be used for marshalling to the ui thread, logging or many other purposes.
  • Subscriptions use weak references by default, but strong references can be specified if required.

TinyMessenger is part of the TinyIoC project, but it can be used completely independently – for more information take a look at the TinyMessenger Wiki page on the main TinyIoC site.

Share:
  • Twitter
  • DotNetKicks
  • DotNetShoutout
  • Google Bookmarks
  • Digg
  • del.icio.us
  • Live
  • Technorati
  • StumbleUpon
  • email
  • Netvibes
  • Ping.fm
  • Print
  • Reddit

Technorati Tags: , , ,

Posted in .Net, CSharp, Software, TinyIoC, TinyMessenger.

Tagged with , , , .


4 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Sean Kearon says

    Delightful stuff – thanks!

  2. SamIAm says

    Any chance of seeing a Compact Framework implementation?

    • srobbins says

      I haven’t done any CF work for many years so, to be honest, it didn’t even cross my mind. Is there anything in particular that doesn’t work? I’ve steered clear of a few things to maintain MonoTouch compatibility so I’d be surprised if there was a lot of “broken” things on CF.

Continuing the Discussion

  1. The Morning Brew - Chris Alcock » The Morning Brew #565 linked to this post on 23/03/2010

    [...] Announcing: TinyMessenger – Steven Robbins updates the TinyIoC project adding a new event aggregation implementation to allow a message passing loosely coupled communication method between components, providing message passing, filtering and subscription support along with proxy support for marshalling to the UI thread [...]



Some HTML is OK

or, reply to this post via trackback.