background preloader

Designpatterns

Facebook Twitter

Cqrs

Producer / Consumer Application Design Pattern. The Producer/Consumer design pattern is based on the Master/Slave pattern, and is geared towards enhanced data sharing between multiple loops running at different rates.

Producer / Consumer Application Design Pattern

As with the standard Master/Slave design pattern, the Producer/Consumer pattern is used to decouple processes that produce and consume data at different rates. The Producer/Consumer pattern’s parallel loops are broken down into two categories; those that produce data, and those that consume the data produced. The Open/Closed Principle. My latest article entitled The Open Closed Principle is available in the June 2008 edition of MSDN Magazine.

The Open/Closed Principle

I tried to present both the motivation for following the OCP and some design strategies (besides the obvious Plugin example) and related principles to bring your design closer to being “Open for Extension, but Closed for Modification.” If you’ve never heard of the Open/Closed Principle, think of doing an addition to an existing house. What sounds easier, laying all new bricks for an all new room, or changing the layout of existing rooms with a reciprocating saw? An Open/Closed design allows us to extend the system with new code instead of having to potentially screw up existing code that works today. Design Patterns in Dynamic Programming. Interactive Application Architecture Patterns.