tdd-ebook icon indicating copy to clipboard operation
tdd-ebook copied to clipboard

Examples with parallel approach.

Open mradecki opened this issue 8 years ago • 1 comments

Regarding fragment:

broadcastingObserver = ParallelBroadcastObserver( 
    DisplayingObserver(),
    StoringObserver(),
    CalculatingObserver())

sensor.FromNowOnReportTo(broadcastingObserver)

This is really cool concept. I just think it fits more in example about lifts. Being parallel while calling handlers for two values does not relly convince me, while being sequential with lowering lifts during fire alarm seems just crazy. For example:

var alarm
= new ParallelAlarm(
new AutoLift(),
new MechanicalLift(),
new ModernLift());

Now we can imagine that all lifts are handled parallely which should be expected in case of fire.

mradecki avatar Dec 29 '16 20:12 mradecki

Nice comment, I'll see what I can do about it, thanks!

grzesiek-galezowski avatar Jan 02 '17 15:01 grzesiek-galezowski