Interpreter design pattern

You can see a sample implementation of the interpreter design pattern.it’s possible smilliar to each other definitions for interpreter in internet literature.  interpreter pattern is a design pattern that specifies how to evaluate sentences in a language Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in …

Continue reading ‘Interpreter design pattern’ »

Chain of Responsibility design pattern

Let’s explain the pattern step by step ; The chain-of-responsibility pattern is a design pattern consisting of a source of command objects and a series of processing objects.This design pattern is situated insi behavioral patterns. Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and …

Continue reading ‘Chain of Responsibility design pattern’ »

Observer Design Pattern in C#

The observer pattern is a Gang of Four design pattern and one of the most interesting patterns in design pattern. this pattern listed under Behavioral Patterns. Definition Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.This pattern suitable push-based notifications. you can watch youtube video related observer …

Continue reading ‘Observer Design Pattern in C#’ »

Strategy Design Pattern (example for payment types)

Hi everyone, We continue to studies about design patterns.I want to illustrate strategy design patern in this post.I implemented a sample scenario related accounting and tranfer operations of payment types for this and coded.Also ı coded  classcic sample scenario(SalaryCalc for different Staffs,PermitDayCalc for different Staff and department) of strategy pattern.you can see this sample via my …

Continue reading ‘Strategy Design Pattern (example for payment types)’ »