Total Downloads

2,598,780

Total Files

9,206

Latest Update

10

How to use the proxy design pattern in .Net

Posted September 10, 2018 | Windows


Design patterns are used to solve the recurring problems and complexities in designing software applications. The Gang of Four design patterns are divided into three categories: creational, structural, and behavioral. Creational design patterns are used to create and manage the mechanism of creating instances of classes. Structural design patterns are used to define the structure of types and their relationships. Behavioral design patterns are used to manage object collaboration and the delegation of responsibilities among objects. The proxy design pattern belongs to the structural category.

When working on applications, you might often need to access objects that are part of a separate application or domain. In these cases it is a best practice (for the sake of code maintenance and separation of concerns) to separate the logic used to communicate with the external application or domain from the logic used to access the object itself. This is where the proxy design pattern comes into play. The Gang of Four defines the proxy design pattern as follows:

Provide a surrogate or placeholder for another object to control access to it.

This article presents a discussion of when and why we should use the proxy design pattern and how we can implement the proxy design pattern in C#.

Why use the proxy design pattern?



Source link

')
ankara escort çankaya escort çankaya escort escort bayan çankaya istanbul rus escort eryaman escort ankara escort kızılay escort istanbul escort ankara escort ankara escort escort ankara istanbul rus Escort atasehir Escort beylikduzu Escort Ankara Escort malatya Escort kuşadası Escort gaziantep Escort izmir Escort