분류 전체보기402 The Chain of Responsibility 9 The Chain of Responsibility Pattern When developing an application, most of the time we know which method should satisfy a particular request in advance. However, this is not always the case. For example, think of any broadcast computer network, such as the original Ethernet implementation (j.mp/wikishared). In broadcast computer networks, all requests are sent to all nodes (broadcast domains .. 2023. 3. 22. Other Structural Patterns 8 Other Structural Patterns Besides the patterns covered in previous chapters, there are other structural patterns we can cover: flyweight, model-view-controller* (MVC), and proxy. What is the flyweight pattern? Object-oriented systems can face performance issues due to the overhead of object creation. Performance issues usually appear in embedded systems with limited resources, such as smartpho.. 2023. 3. 22. The Facade Pattern 7 The Facade Pattern In the previous chapter, we covered a third structural pattern, the bridge pattern, which helps to define an abstraction and its implementation in a decoupled way, so that both can vary independently. As systems evolve, they can get very complex. It is not unusual to end up with a very large (and sometimes confusing) collection of classes and interactions. In many cases, we .. 2023. 3. 22. The Bridge Pattern 6 The Bridge Pattern In the previous two chapters, we covered our first structural pattern, adapter, which is used to make two incompatible interfaces compatible, and decorator, which allows us to add responsibilities to an object in a dynamic way. There are more similar patterns. Let's continue with the series! A third structural pattern to look at is the bridge pattern. We can actually com.. 2023. 3. 22. The Decorator Pattern 5 The Decorator Pattern As we saw in the previous chapter, using an adapter, a first structural design pattern, you can adapt an object implementing a given interface to implement another interface. This is called interface adaptation and includes the kinds of patterns that encourage composition over inheritance, and it could bring benefits when you have to maintain a large codebase. A second in.. 2023. 3. 22. The Adapter Pattern 4 The Adapter Pattern In the previous chapters, we have covered creational patterns, object-oriented programming patterns that help us with object creation procedures. The next category of patterns we want to present is structural design patterns. A structural design pattern proposes a way of composing objects for creating new functionality. The first of these patterns we will cover is the adapt.. 2023. 3. 22. Other Creational Patterns 3 Other Creational Patterns In the previous chapter, we covered a third creational pattern, that is, builder, which offers a nice way of creating the various parts of a complex object. Besides the factory method, the abstract factory, and the builder patterns covered so far, there are other creational patterns that are interesting to discuss, such as the prototype pattern and the singleton patte.. 2023. 3. 22. The Builder Pattern 2 The Builder Pattern In the previous chapter, we covered the first two creational patterns, the factory method and abstract factory, which both offer approaches to improve the way we create objects in nontrivial cases. Now, imagine that we want to create an object that is composed of multiple parts and the composition needs to be done step by step. The object is not complete unless all its part.. 2023. 3. 22. The Factory Pattern Design patterns 참조 book Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 객체 지향 프로그래밍 에서 사용되는 디자인 패턴에는 여러 범주가 있으며 , 해결하는 문제의 유형 및/또는 빌드하는데 도움이 되는 솔루션의 유형에 따라 다릅니다. 그들의 저서에서 The Gang of Four는 23가지 디자인 패턴을 제시하며 creational, structural, behavioral의 세 가지 범주로 나뉩니다 . These patterns deal with different aspects of object creati.. 2023. 3. 22. 이전 1 ··· 26 27 28 29 30 31 32 ··· 45 다음