As you can see, each messaging system has pro’s and con’s. Also, each can, and often is, used in tandem with each other. They aren’t always stand alone, and many are used in the same code base. As you better understand the basics of messaging systems, you can more easily make your Object Oriented code bases easier to encapsulate. It also makes it easier when using Design Patterns to have disparate parts of the code talk to each other in a flexible way.
Continue reading “Message Systems in Programming: Part 7 of 7 – Conclusions”
Streams are merely Array’s that emit change events through a callback when items are added to it.
Continue reading “Message Systems in Programming: Part 6 of 7 – Streams”
Promise and Deferred (or Futures and Completers)
We’ve glossed over asynchronous coding up to this point. Many from languages which have reasonable event API’s (ActionScript) to extremely nice ones (C#), it may not at first look like a problem, or even appear to be an edge case. Coming from ActionScript, it took me years to get comfortable, and understand why, Promises were helpful. Also, many in those languages either create, or have facilities that help create, orchestration code to help mitigate common asynchronous coding issues.
Continue reading “Message Systems in Programming: Part 5 of 7 – Promise and Deferred”
Callbacks help objects/classes talk to each other in a less coupled way. Events for many to listen and react. However, for objects that deal with data or business logic, you need a way for them to globally communicate through some sort of event or message bus. Various libraries have sprung up in languages that do not have this natively available, or if the native API doesn’t fit the developer(s) need.
Continue reading “Message Systems in Programming: Part 4 of 7 – Publish Subscribe”