These patterns deal with the process of communication, managing relationships, and responsibilities between objects
A way of passing a request between a chain of objects
A set of handlers to handle a request.
A scenario within you needs to pass a request to one handler among a list of handlers at run-time based on certain conditions.
Exception handling system in C# is a good example of this pattern. Since an exception thrown by a piece of code in C# is handled by a set of try-catch block. Here catch blocks act as possible handlers to handle the exception.
(Tr) Istek tanınana kadar zincirdeki bir isteği bir nesneden diğerine geçirerek nesneler arasında ayrıştırmaya izin verir.
Encapsulate a command request as an object
Need to implement callback functionalities.
Need to support Redo and Undo functionality for commands.
Sending requests to different receivers which can handle it in different ways.
Need for auditing and logging of all changes via commands.
(Tr) Yazılım komutlarının yürütülmesini temsil etmek için basit nesneler kullanır ve günlüğe kaydetme ve geri alınamayan komutları desteklemenizi sağlar.
Sequentially access the elements of a collection
Allows accessing the elements of a collection object in a sequential manner without knowing its underlying structure.
Multiple or concurrent iterations are required over collections elements.
Provides a uniform interface for accessing the collection elements.
(Tr) Birleştirilmiş nesnenin öğelerine temel temsilini göstermeden sırayla erişmek için bir yol sağlar
Defines simplified communication between classes
Communication between multiple objects is well defined but potentially complex.
When too many relationships exist and a common point of control or communication is required.
Some object can be grouped and customized based on behaviors.
(Tr) Tüm nesnelerin birbirlerini bilmelerini önlemek için ayrı bir nesne kullanarak nesneler arasındaki iletişimin nasıl basitleştirilebileceğini tanımlar.
Capture and restore an object's internal state
The state of an object needs to be saved and restored at a later time.
The state of an object cannot be exposed directly by using an interface without exposing implementation.
(Tr) ??
A way of notifying change to a number of classes. It is like subscrition notifications
Changes in the state of an object need to be notified to a set of dependent objects, not all of them.
Notification capability is required.
The object sending the notification does not need to know about the receivers objects.
(Tr) Nesneler arasında bire çok bağımlılık tanımlar, böylece bir nesne durumu değiştiğinde tüm bağımlıları bildirilmesini ve otomatik olarak güncellemesini sağlar.
Alter an object's behavior when its state changes
The behavior of an object is changed based on its state.
Preserve flexibility in assigning requests to handlers.
An object is becoming complex, with many conditional behaviors.
(Tr) Bir nesnenin durumu değiştiğinde aynı zamanda davranışı da değişirse, state tasarım kalıbı kullanılabilir
Encapsulates an algorithm inside a class
There are multiple strategies for a given problem and the selection criteria of a strategy are defined as a run-time.
Many related classes only differ in their behaviors.
The strategies use the data to which the client has no access.
(Tr) Bir işi yapabilecek birden farklı algoritmanız varsa bunlar arasında seçim yapmanıza olanak sağlar
Defines a new operation to a class without change
An object structure has many unrelated operations to perform on it.
An object structure cannot change but you need to perform new operations on it.
The operations need to perform on the concrete classes of an object structure.
(Tr) Uygulamadaki sınıflara yeni metotlar eklenmesini düzenleyen bir tasarım desenidir.
Defer the exact steps of an algorithm to a subclass
An abstract view of an algorithm is required, but implementation varies according to the subclasses.
Common behaviors of subclasses can be used to make to a common class.
(Tr) Bir işlem için gerekli adımları soyut olarak tanımlar ve bir şablon metot ile algoritmanın nasıl çalışacağını belirler.