On 23 Jul 2013, at 01:01, Andy Holland <[email protected]> wrote:
> Thinking about the semantics, emit_to message doesn't quite work. > > Maybe http://pastebin.com/z5fhznKi Just had a look: Bus.new.emit :make_me_a_sandwich, :to => sudo Same thing, though. If you know who to send it to, you don't need a message bus, you could just pass in the destination as a dependency. The bus lets you defer that decision til later based on the message name. It's quite powerful actually, it means the user interface only needs one dependency to issue commands on the domain model, and you can change how it's handled with no impact on the client. I've only just started refactoring to use this though, so I need to kick the wheels some more. -- http://www.patchspace.co.uk/ http://www.linkedin.com/in/ashmoran -- You received this message because you are subscribed to the Google Groups "NWRUG" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nwrug-members. For more options, visit https://groups.google.com/groups/opt_out.
