Tags » Design Patterns

Strategy Pattern: Encapsulating Actions

Strategy Pattern

Introduction

Very often when writing code you hack some implementation of some business logic together
and find yourself needing to either modify the code, reuse it code somewhere else, 543 more words

Design Patterns

Dependency Injection

Dependency Injection

Introduction

Overview

Dependency Injection (DI) is one of those concepts that has a really intimidating
name but once you get to know it, it is really quite easy. 482 more words

Design Patterns

Wzorce projektowe w źródłach .NET: 1/3 wzorce kreacyjne

O wzorcach projektowych napisano już chyba wszystko, co można było napisać. Jedni ich nadużywają, inni je ignorują, jeszcze inni używają ich nieświadomie, nie wiedząc nawet, że te czasami proste rozwiązania mają swoje nazwy. 868 more words

Design patterns - Observer

Observer pattern is used when you have a collection of objects (observers) which should monitor the state of the single other object (subject).
All observers should implement IObserver interface with single method (Update()). 598 more words

C#

Design patterns - Factory

Factory pattern is used to have a single class which decides which object should be created. Of course it’s creational pattern.
For example you could have Circle, Rectangle and Square classes (all of them implement IShape interface) and factory class instantiates appropriate shape based on given parameter. 194 more words

C#

Composite Design Pattern

Composite Design Pattern

Composite means ‘made up of several parts or elements’. This pattern provides mechanism to interact uniformly with both the primitive(parts) and the composite. 234 more words

Structural Design Pattern

Object Pool - Tasarım Kalıpları

Merhabalar, bu yazımda Object Pool (Nesne Havuzu) tasarım kalıbından bahsedeceğim. Evet, Java’da nasıl nesne yaratılır biliyoruz, hatta bi önceki yazımda eğer nesneyi oluşturmak çok maliyetli ise… 430 more words

Programming