자바스크립트 설계 패턴 - 번역중...

오늘 번역할 부분 표시방법~

원문의 주소 - http://addyosmani.com/resources/essentialjsdesignpatterns/book/

www.tmzilla.com 

자바스크립트 설계 패턴 - 번역중...

번역에 참여하신 분

번역에 참여하는 방법

Preface

0412 nassol 찜 & 작업완료

Target Audience

이런 분들께 유용합니다.

Acknowledgements

Credits

0414 @박범진 찜 (작업완료 리딩만 번역할께요 )

Reading

참고도서

Table Of Contents

Introduction

04/19/목 뤼딩연습

What is a Pattern?

0414 박범진 &완료

We already use patterns everyday

140717 @정성대 찜 & 확인필요

"Pattern"-ity Testing, Proto-Patterns & The Rule Of Three

0414 김나솔 찜 & 작업완료

The Structure Of A Design Pattern

0415 김용균 찜 & 작업완료

Writing Design Patterns

0414 @김용균 찜 & 작업완료

Anti-Patterns

0504 @김용균 찜 & 확인필요

Categories Of Design Pattern
디자인 패턴의 분류

Creational Design Patterns
생성 디자인 패턴

Structural Design Patterns
구조 디자인 패턴

Behavioral Design Patterns
동작 디자인 패턴
 www.tmzilla.co.uk 

Essential JavaScript Design Patterns

Volume 1.5.2

A book by Addy Osmani

 

번역에 참여하신 분

정정식

박범진

김용균

김나솔

홍환민

박준태

번역에 참여하는 방법

  1. 번역할 문단을 고릅니다.
  2. 문단 앞에 @김나솔 찜 & 작업중이라고 씁니다. 제목1 서식으로 바꿔줍니다.
  3. 번역을 합니다. 막히는 부분은 분홍색으로 표시하고 질문으로 써둡니다. 번역한 부분은 파랗게 표시합니다.
  4. 번역을 마무리한 후 &작업완료, &확인필요, &추가번역필요 등등을 표시합니다.
  5. 작업한 예를 참고하세요~

Copyright © Addy Osmani 2012.

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 unported license. You are free to remix, tweak, and build upon this work non-commercially, as long as you credit Addy Osmani (the copyright holder) and license your new creations under the identical terms. Any of the above conditions can be waived if you get permission from the copyright holder. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to the license.

 

Preface

Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language.

One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve.

Design patterns also provide us a common vocabulary to describe solutions. This can be significantly simpler than describing syntax and semantics when we're attempting to convey a way of structuring a solution in code form to others.

In this book we will explore applying both classical and modern design patterns to the JavaScript programming language.

 

0412 nassol 찜 & 작업완료

Target Audience

 이런 분들께 유용합니다.

This book is targeted at professional developers wishing to improve their knowledge of design patterns and how they can be applied to the JavaScript programming language.

설계 패턴에 관한 지식을 늘리고,

설계 패턴을 자바스크립트 프로그래밍 언어에 어떻게 적용할 수 있는지에 대해 알고 싶어하는 전문 개발자를 위해 썼습니다.  

Some of the concepts covered (closures, prototypal inheritance) will assume a level of basic prior knowledge and understanding. If you find yourself needing to read further about these topics, a list of suggested titles is provided for convenience.

If you would like to learn how to write beautiful, structured and organized code, I believe this is the book for you.

클로져(closure)나 prototype속성을 이용한 상속(prototypal inheritance) 등의 개념에 대해서는 기본 지식이 있다고 가정합니다. 이런 개념에 대해서 알려는 분들은, 책의 목록을 제시해 두었으니, 참고하시기 바랍니다.

아름다운 코드, 구조화된 코드, 짜임새 있는 코드를 작성하시려면, 이 책이 도움이 될 겁니다.

Acknowledgements

I will always be grateful for the talented technical reviewers who helped review and improve this book, including those from the community at large. The knowledge and enthusiasm they brought to the project was simply amazing. The official technical reviewer's tweets and blogs are also a regular source of both ideas and inspiration and I wholeheartedly recommend checking them out.

I would also like to thank Rebecca Murphey (http://rebeccamurphey.com, @rmurphey) for providing the inspiration to write this book and more importantly, continue to make it both available on GitHub and via O'Reilly.

Finally, I would like to thank my wonderful wife Ellie, for all of her support while I was putting together this publication.

Credits

Whilst some of the patterns covered in this book were implemented based on personal experience, many of them have been previously identified by the JavaScript community. This work is as such the production of the combined experience of a number of developers. Similar to Stoyan Stefanov's logical approach to preventing interruption of the narrative with credits (in JavaScript Patterns), I have listed credits and suggested reading for any content covered in the references section.

If any articles or links have been missed in the list of references, please accept my heartfelt apologies. If you contact me I'll be sure to update them to include you on the list.

0414 @박범진 찜 (작업완료 리딩만 번역할께요 )

Reading

Whilst this book is targeted at both beginners and intermediate developers, a basic understanding of JavaScript fundamentals is assumed. Should you wish to learn more about the langage, I am happy to recommend the following titles:

참고도서

이 책이 입문자와 중급개발자를 위해 쓰여졌지만, 기본적인 자바스크립트에 대한 이해를 요구합니다. 자바스크립트에 대해 더 배우길 원하신다면 다음의 책들을 기꺼이 추천합니다.:

번역문 제안 : 이 책은 입문/중급개발자 모두를 위한 책이기는 하지만, 자바스크립트에 대해서 기본적으로는 알고 있어야 합니다. 자바스크립트에 대해 배워야 한다면 다음의 책을 추천합니다 :

 

Table Of Contents

Introduction

04/16(월) - 리딩 연습으로 읽기 - http://www.facebook.com/groups/engfordev/359868314065000/

One of the most important aspects of writing maintainable code is being able to notice the recurring themes in that code and optimize them.

This is an area where knowledge of design patterns can prove invaluable.

In the first part of this book, we will explore the history and importance of design patterns which can really be applied to any programming language.

If you're already sold on or are familiar with this history, feel free to skip to the chapter 'What is a Pattern?' to continue reading.

Design patterns can be traced back to the early work of a civil engineer namedChristopher Alexander.

He would often write publications about his experience in solving design issues and how they related to buildings and towns.

One day, it occurred to Alexander that when used time and time again, certain design constructs lead to a desired optimal effect.

유지보수 가능한 코드를 작성하려면, 코드 안에서 반복되는 테마가 뭔지를 알아내는 능력과 이런 테마를 최적화하는 능력이 필요합니다.

이런 분야에서는 설계 패턴에 대한 지식의 진가가 드러납니다.

책의 첫 부분에서는, 모든 프로그래밍 언어에 실제로 적용할 수 있는 설계 패턴의 역사와 중요성에 대해 알아볼 것입니다.

설계 패턴의 역사가 이미 익숙하다면, 앞부분은 건너뛰고 '패턴이란 무엇인가?' 장부터 읽으면 됩니다.

설계 패턴의 시초는 토목공학자 크리스토퍼 알렉산더가 쓴 책에서 찾아볼 수 있습니다.

알렉산더는 설계에 관한 문제를 해결하는 과정에서 경험한 것에 대해, 그리고 설계 문제하고 건물과 도시가 어떻게 연관되는지에 대해 책을 여럿 썼습니다.

어느날 알렉산더는 문득, 몇몇 설계 구조물을 반복해서 사용하면, 최적의 결과로 이어진다는 생각을 했습니다.

// 04/16/요까지

0417  - 뤼딩 연습에서 읽기

http://www.facebook.com/groups/engfordev/360521307333034/

In collaboration with Sarah Ishikawra and Murray Silverstein, Alexander produced a pattern language that would help empower anyone wishing to design and build at any scale.

This was published back in 1977 in a paper titled 'A Pattern Language', which was later released as a complete hardcover book.

Some 30 years ago, software engineers began to incorporate the principles Alexander had written about into the first documentation about design patterns, which was to be a guide for novice developers looking to improve their coding skills.

It's important to note that the concepts behind design patterns have actually been around in the programming industry since its inception, albeit in a less formalized form.

Sarah Ishikawra와 Murray Silverstein와의 협업에서, 알렉산더는 어떤 규모의 설계와 건축을 원하는 그 누구에게라도 도움이 될 수 있는 패턴 언어를 만들었습니다. 이것은 "패턴 언어 (A Pattern Language)"라는 제목의 논문으로 1997년에 출간되었고, 후에 양장본으로 출간되었습니다. 약 30 년 전에, 소프트웨어 엔지니어들은 알렉산더가 디자인 패턴에 대해 쓴 문서의 원리를 도입하기 시작했습니다. 디자인 패턴은 코딩 능력을 향상시키기 바라는 초보 개발자들에게 가이드 역할을 하였습니다. 디자인 패턴의 밑에 깔린 개념들은, 비록 형식적인 형태는 갖추지 않았더라도 프로그래밍 산업이 생긴 이래로 이미 있었습니다. 이 점에 주목할 필요가 있습니다.

(홍환민님이 번역한 것에서 약간 수정하였습니다 :)

04/18/수

http://www.facebook.com/groups/engfordev/362105810507917/

One of the first and arguably most iconic formal works published on design patterns in software engineering was a book in 1995 called 'Design Patterns:

Elements Of Reusable Object-Oriented Software'.

This was written by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides - a group that became known as the Gang of Four (or GoF for short).

The GoF's publication is considered quite instrumental to pushing the concept of design patterns further in our field as it describes a number of development techniques and pitfalls as well as providing twenty-three core Object-Oriented design patterns frequently used around the world today.

We will be covering these patterns in more detail in the section ‘Categories of Design Patterns’.

In this book, we will take a look at a number of popular JavaScript design patterns and explore why certain patterns may be more suitable for your projects than others.

Remember that patterns can be applied not just to vanilla JavaScript, but also to abstracted libraries such as jQuery or Dojo as well.

Before we begin, let’s look at the exact definition of a ‘pattern’ in software design.

김정아/박준태님이 번역하신 것을 약간 수정하였습니다.

‎소프트웨어 엔지니어링 설계 패턴 분야에서 최초로 출간된 책은 '디자인 패턴 : 재사용 가능한 객체 지향 소프트웨어'이며, 1995년에 출간되었습니다. 이 책을 쓴 사람은 에리히 감마, 리처드 헬름, 랄프 존슨, 존 블리사이즈이며, 이들은 후에 GoF(Gang of Four)로 알려졌습니다.

이 책은 두 가지 측면에서 매우 중요합니다. 이 책에서는 수많은 개발 기법과 함정들을 기술하는 방법으로, 설계 패턴의 개념을 깊게 파고 들었습니다. 게다가 이 책에서는 오늘날 가장 자주 쓰는 스물 세가지 핵심적인 객체지향 디자인 패턴을 제공합니다.

여기에서는 ‘디자인 패턴의 종류’에서 23개의 주요 객체지향 설계 패턴에 대해 더욱 상세하게 다룹니다. 또한 인기있는 자바스크립트 설계 패턴을 여럿 살펴볼 것입니다. 그리고 특정 패턴이 어떤 프로젝트에 더욱 적합한 경우에, 적합한 이유가 무엇인지를 살펴볼 것입니다. 그리고 이 점을 기억하세요.  패턴은 평범한 자바스크립트 뿐 아니라, jQuery 나 Dojo 같은 추상적인 라이브러리에도 잘 적용할 수 있습니다.

시작하기 전에, (한숨 쉬고) 소프트웨어 설계분야에서 패턴을 어떻게 정의하는지 살펴 봅시다.

 

04/19/목 뤼딩연습

 http://www.facebook.com/groups/engfordev/362970530421445/

What is a Pattern?

A pattern is a reusable solution that can be applied to commonly occurring problems in software design - in our case - in writing JavaScript-powered applications. Another way of looking at patterns are as templates for how you solve problems - ones which can be used in quite a few different situations.

So, why is it important to understand patterns and be familiar with them?. Design patterns have three main benefits:

패턴이란 무엇일까요?

패턴이란 소프트웨어 디자인에 있어 반복해서 발생하는 문제에 적용할 수 있으며, 재사용할 수 있는 솔루션입니다. 우리의 경우에는 자바스크립트로 어플리케이션을 만들 때에 해당합니다. 패턴은 이렇게 이해할 수도 있습니다. 패턴이 문제를 해결하는 방법에 대한 템플릿이라고 이해하는 것입니다. 여러가지 서로 다른 상황에서 사용할 수 있는 템플릿 말입니다. 디자인 패턴을 이해하는 것은 왜 중요할까요? 디자인 패턴과 왜 친숙해져야 할까요? 디자인 패턴을 사용하면 세 가지 이점이 있습니다. :

  1. Patterns are proven solutions: They provide solid approaches to solving issues in software development using proven solutions that reflect the experience and insights the developers that helped define and improve them bring to the pattern.
  2. Patterns can be easily re-used: A pattern usually reflects an out of the box solution that can be adapted to suit your own needs. This feature makes them quite robust.
  3. Patterns can be expressive: When you look at a pattern there’s generally a set structure and ‘vocabulary’ to the solution presented that can help express rather large solutions quite elegantly.

 

>> 요기까지 번역했음. - 정리해서 옮기기!

http://opentutorials.org/course/299/1930

04/20/금

Patterns are not an exact solution. It’s important that we remember the role of a pattern is merely to provide us with a solution scheme. Patterns don’t solve all design problems nor do they replace good software designers, however, they do support them. Next we’ll take a look at some of the other advantages patterns have to offer.

패턴은 문제상황에 딱 들어맞는 솔루션은 아닙니다. 패턴이 하는 역할은 솔루션의 틀(scheme) 같은 것을 제공하는 것입니다. 패턴을 쓴다고 해서 디자인 문제가 모두 해결되는 것도 아니고, 패턴이 있다고 해서 능력있는 소프트웨어 디자이너를 대신해주는 것도 아니다. 패턴은 능력있는 소프트웨어 디자이너를 도와줍니다. 다음 부분에서는 패턴을 쓸 때의 다른 이점에 대해 몇 가지 살펴 보겠습니다.

일단 요까지 올렸음. - http://opentutorials.org/course/299/2038

http://www.facebook.com/groups/engfordev/366052610113237/

뤼딩연습~~ 에서 읽음..

(제안) 자주 사용하는 패턴은 지속적으로 개선될 수 있다. 왜냐하면 그 패턴을 사용하는 개발자들이 패턴 커뮤니티로 환원하는 집단 경험이 쌓이기 때문이다. 이런 경험은 완전히 새로운 디자인 패턴의 발명으로 이어지기도 하고, 기존 패턴을 잘 이용할 방법을 안내하는 가이드라인의 개선으로 이어지기도 한다. 매번 신뢰할 만한 솔루션을 즉석에서 만들 수도 있겠지만, 이런 지속적인 개선 가능성을 고려하면 패턴에 기반한 솔루션이 결국 더욱 신뢰할 만해질 거라 확신할 수 있다.

(약간 수정해서 쓸게요)

자주 사용하는 패턴은 지속적으로 개선됩니다. 왜냐하면 그 패턴을 사용하는 개발자들이 패턴 커뮤니티로 환원하는 집단 경험이 쌓이기 때문입니다. 그 결과 완전히 새로운 디자인 패턴을 만들어내기도 하고, 기존 패턴을 잘 이용하는 방법을 안내하는 가이드라인을 개선하기도 합니다. 매번 신뢰할 만한 솔루션을 즉석에서 만들 수도 있겠지만, 이런 지속적인 개선 가능성을 고려한다면, 결국은 패턴에 기반한 솔루션이 일회성 솔루션에 비해 더욱 신뢰할 수 있게 됩니다.

요 문장에 대한 생각..

This can ensure

that

pattern-based solutions continue to become more robust

than ad-hoc solutions may be (robust).

패턴에 기반한 솔루션의 경우에는 지속적으로 개선이 이루어진다. 따라서, 개별적으로 만드는 솔루션에 비해 패턴에 기반한 솔루션은 매번 만드는 솔루션에 비해 더욱 신뢰할 수 있는 솔루션이 되어간다. >> 아움.. 표현하기 어려워 >.<

 

아 그렇군요.. may가 아니라 may be 로 끝났으니.. 그 뒤가 contine나 become이 생략된 것 아니네요 ^^;;

넹넹 ^^ 어케 설명할까 생각했는데, 이미 이해하셨네용

0414 박범진 &완료

We already use patterns everyday

To understand how useful patterns can be, let's review a very simple selection problem that the jQuery library solves for us everyday.

If we imagine

that we have a script

where for each DOM element on a page with class "foo"

we want to increment a counter,

what's the simplest efficient way

to query for the list we need?.

Well, there are a few different ways this problem could be tackled:


우리는 이미 패턴을 매일매일 사용하고 있습니다.

패턴이 얼마나 유용할 수 있는지 이해하기 위해, jQuery 라이브러리가 풀어내는 간단한 selection 문제를 통해 간단히 살펴보도록 합시다.

foo라는 class속성을 가진 DOM요소마다 카운터를 증가시키는 스크립트를 상상한다고 했을때, 우리가 필요한 (DOM요소)리스트를 구하는 가장 단순하면서도 효과적인 방법이 무엇일까요?

"foo"라는 클래스 속성을 갖는 DOM 객체 마다, 카운터를 증가시키는 스크립트가 있다고 해 봅시다. 이 때 카운터를 증가시키려는 DOM요소의 목록을 얻는 가장 간단하고 효율적인 방법은 무엇일까요?

아, 이 문제를 논하는데 몇가지 다른 방법들이 있습니다.

  1. Select all of the elements in the page and then store them. Next, filter this list and use regular expressions (or another means) to only store those with the class "foo".
  2. Use a modern native browser feature such as querySelectorAll() to select all of the elements with the class "foo".
  3. Use a native feature such as getElementsByClassName() to similarly get back the desired list.

  1. 이 페이지내 모든 요소를 조회(select)한 후 그것들을 저장합니다. 그 다음 이 list를 정규표현식을 이용하여 foo라는 class를 가진것들만 걸러냅니다.
  2. foo라는 class속성을 가진 요소들을 조회(select)하는 querySelectorAll()같은 기능을 가진 요즘의 브라우저를 사용합니다.
  3. getElementsByClassName()같은 원래 가지고 있는 기능을 이용해 원하는 list를 가져옵니다.

So, which of these is the fastest?. You might be interested to know that it's actually number 3 by a factor of 8-10 times the alternatives. In a real-world application however, 3. will not work in versions of Internet Explorer below 9 and thus it's necessary to use 1. where 3. isn't supported.

Developers using jQuery don't have to worry about this problem, as it's luckily abstraced away for us. The library opts for the most optimal approach to selecting elements depending on what your browser supports.

이들 중 어느것이 가장 빠를까요? 아마 당신은 3번째 방법이 다른 방법들에 비해 8~10배(?) 빠르다는 사실에 흥미를 느낄지 모르겠네요.  그러나 현실에서는 3번째방법은 인터넷 익스플로러9에서 동작하지 않습니다. 그러므로 1번의 방법을 사용해야 합니다. 3번째 방법은 지원하지 않습니다.

jQuery를 사용하는 다행스럽게도 추상화(?)되어 있어서 개발자들은 이 문제에 대해 걱정할 필요가 없습니다. . (jQuery)라이브러리는 당신의 브라우저가 지원하는 기능에 따라 요소들을 select하는 최적의 접근방법을 채택합니다.

It internally uses a number of different design patterns, the most frequent one being a facade, which provides a simple set of interfaces to a more complex body of code. We're probably all familiar with $(elem) (yes, it's a facade!), which is a lot easier to use than having to manually normalize cross-browser differences.

We'll be looking at this and more design patterns later on in the book.

내부적으로 수많은 다른 디자인패턴들을 사용합니다. 그 중 가장 많이 사용하는 패턴은 복잡한 내부코드에 대한 간단한 인터페이스집합을 제공하는  퍼사드패턴입니다. 우리는 아마 $(elem) 형태의 코드에 익숙할 것입니다. (맞습니다. 그것은 크로스브라우저의 차이를 수동으로 해결하는것보다 훨씬 쉽게해주는 퍼사드입니다. )

우리는 이것과 더불어 더 많은 디자인패턴을 이 책에서 찾아볼 것입니다. 

class Image:

   def __init__(self, file_name):

       self._file_name = file_name

   def load_image_from_disk(self):

       print(f"Loading image from {self._file_name}")

   def display_image(self):

       print(f"Displaying image {self._file_name}")

class ImageProxy:

   def __init__(self, filename):

       self._filename = filename

       self._image = None

   def display_image(self):

       if not self._image:

           self._image = Image(self._filename)

           self._image.load_image_from_disk()

       self._image.display_image()

image = ImageProxy("test_image.jpg")

image.display_image()

140717 정성대 찜 & 확인필요

"Pattern"-ity Testing, Proto-Patterns & The Rule Of Three

“패턴” - ity 테스팅, 프로토-패턴 & 3가지 규칙

Remember that not every algorithm, best practice or solution represents what might be considered a complete pattern. There may be a few key ingredients here that are missing and the pattern community is generally wary of something claiming to be one unless it has been heavily vetted. Even if something is presented to us which appears to meet the criteria for a pattern, it should not be considered one until it has undergone suitable periods of scrutiny and testing by others.

모든 알고리즘이 가장 좋은 방법이나 완벽한 패턴으로 간주되는 해결책으로 나타나지 않는다는 것을 알아 두어야 합니다. 여기에는 누락되는 몇 가지 중요한 구성 요소가 있습니다. 패턴 커뮤니티에서 일반적으로 패턴이 확실히 검증되지 않는 한 사용되는 패턴을 주의 해야 합니다. 심지어 패턴에 대한 기준을 충족한 것처럼 보여 발표가 된 경우에도 다른 사람으로 부터 적절한 기간을 거쳐 테스팅 되지않는 이상 하나의 패턴으로 간주 되어서는 안됩니다.

Looking back upon the work by Alexander once more, he claims that a pattern should both be a process and a "thing". This definition is obtuse on purpose as he follows by saying that it is the process which should create the "thing". This is a reason why patterns generally focus on addressing a visually identifiable structure i.e we should be able to visually depict (or draw) a picture representing the structure that placing the pattern into practice results in.

알렉산더가 작업한 것을 다시 보면 그는 패턴은 두개의 과정과 "생각(thing)"을 해야 한다고 주장합니다. 그의 말에 의하면 이것의 정의는 "생각"을 만드는 과정을 의도적으로 무감감하게 만드는 것입니다. 패턴들은 일반적으로 시각적으로 식별 가능한 구조에 초점이 맞춰져 있는데 그 이유는 즉 개발자들은 시각적으로 묘사(또는 그릴)된 그림은 경험(연습)의 결과로 패턴을 배치된 구조로 나타낼 수 있어야 하기 떄문입니다.

In studying design patterns, it's not irregular to come across the term "proto-pattern". What is this? Well, a pattern that has not yet been known to pass the "pattern"-ity tests is usually referred to as a proto-pattern. Proto-patterns may result from the work of someone that has established a particular solution that is worthy of sharing with the community, but may not have yet had the opportunity to have been vetted heavily due to its very young age.

디자인 패턴들을 공부할떄 "프로토-패턴" 용어는 이상한 용어가 아닙니다. 이게 무엇일까요? 음, 아직 ity 테스트를 통과하지 않은 것으로 알려지지 않은 패턴은 일반적으로 프로토 패턴이라고 합니다. 프로토-패턴들은 커뮤니티에 공유 할만한 특정 해결법을 구축한 어떤사람의 작업의 결과 일지도 모르지만 아직 아주 어린 나이(very young age?)로 인해 많이 검증을 할 수 있는 기회가 있지 않을 수 있습니다.

Alternatively, the individual(s) sharing the pattern may not have the time or interest of going through the "pattern"-ity process and might release a short description of their proto-pattern instead. Brief descriptions or snippets of this type of pattern are known as patlets.

다른 방법으로 개인(들)이 패턴들을 공유하는 것은 시간이나 패턴 "ity"과정을 거치는 것에 관심이 있지 않는 것이거나 프로토-패턴 대신에 간단한 설명만 알려 준 것일지도 모름니다. 이러한 유형 패턴의 간결한 설명이나 미리보기는 patlets으로 알려져 있습니다.

The work involved in fully documenting a qualified pattern can be quite daunting. Looking back at some of the earliest work in the field of design patterns, a pattern may be considered "good" if it does the following:

패턴을 완벽하게 정규화된 문서화로 만드는 작업은 매우 어려운 작업 일 수 있습니다. 디자인 패턴 분야의 초기 작품들을 다시 찾아보면 패턴들이 다음 사항들을 만족하는 경우 "좋은것" 으로 간주 될 것입니다.

We would be forgiven for thinking that a proto-pattern which fails to meet guidelines isn't worth learning from, however, this is far from the truth. Many proto-patterns are actually quite good. I’m not saying that all proto-patterns are worth looking at, but there are quite a few useful ones in the wild that could assist us with future projects. Use best judgment with the above list in mind and you’ll be fine in your selection process.

우리는 가이드 라인에 충족하지 못해 배울 가치가 없는 프로토 패턴에 대한 생각들을 관대(forgiven) 할 것 이지만, 이는 사실과 다릅니다. 실제로 많은 프로토 패턴중 좋은 것들이 많이 있습니다. 모든 프로토 패턴이 가치 있어 보인다고 말하는 것이 아니지만 현실적으로 미래에 개발자들을 도와 줄 수 있는 꽤 유용한 것들이 많이 있다. 위 목록을 세겨두면 최고의 판단을 하는데 더 좋은 선택을 할 수 있을 것입니다.

One of the additional requirements for a pattern to be valid is that they display some recurring phenomenon. This is often something that can be qualified in at least three key areas, referred to as therule of three. To show recurrence using this rule, one must demonstrate:

패턴에 유효한 추가적인 요구 사항은 반복되는 몇 가지 현상을 표시해야 합니다. 이는 흔히 적어도 세가지 분야에서 세가지 원칙으로 규정을 정할수 있어야 합니다. 이 규칙을 사용하는 것을 생각하면서 다음중 하나는 반드시 입증되어야 합니다.

  1. Fitness of purpose - how is the pattern considered successful?
  2. Usefulness - why is the pattern considered successful?
  3. Applicability - is the design worthy of being a pattern because it has wider applicability? If so, this needs to be explained. When reviewing or defining a pattern, it is important to keep the above in mind.

1. 목적의 적합성 - 어떻게 패턴이 성공적이라고 간주되어질까?

2. 유용성 - 왜 패턴이 성공적으로 간주되어질까?

3. 적용 - 넒게 적용 될 수 있는 가능성을 가지고 잇기 때문에 패턴이 설계할 가치가 있는가? 만일 그렇다면 설명 될 필요가 있다. 패턴을 정의하거나 검토 할때 위의 마음을 유지하는 것이 중요하다.

0414 김나솔 찜 & 작업완료

The Structure Of A Design Pattern

When studying design patterns, you may wonder what teams that create them have to put in their design pattern descriptions.  Every pattern has to initially be formulated in a form of a rule that establishes a relationship between a context, a system of forces that arises in that context and a configuration that allows these forces to resolve themselves in context.

설계 패턴에 대해 기술할 때에는 어떤 내용이 들어가야 할까요? 우선 패턴은 rule의 형태로 만들어야 합니다. 이 rule은 맥락(context)간의 관계를 설정합니다. (뒷부분 보완하기)

출처: http://2xx195.tistory.com/191   를 보면 단어들 설명이 다음처럼 되어있네요.

각 패턴은 Three-part rule이 적용된다.

Three-part Rule 이란

(1) Context: 문맥/상황,

(2) Force: 그 상황이 반복되는 원인 및 배경,

(3) Configuration: 반복해서 발생하는 문제를 해결할 수 있는 소프트웨어 설정이다.

I find that a lot of the information available out there about the structure of a good pattern can be condensed down to something more easily digestible. With this in mind, lets now take a look at a summary of the component elements for a design pattern.

다음은 설계 패턴의 구성요소를 정리한 것입니다.

 

A design pattern must have a:

설계 패턴에는 다음의 구성요소가 들어 있어야 합니다: 

 

Design patterns are quite a powerful approach to getting all of the developers in an organization or team on the same page when creating or maintaining solutions. If you or your company ever consider working on your own pattern, remember that although they may have a heavy initial cost in the planning and write-up phases, the value returned from that investment can be quite worth it. Always research thoroughly before working on new patterns however, as you may find it more beneficial to use or build on top of existing proven patterns than starting afresh.

설계 패턴을 사용하면 회사의 개발자들이 하나의 것을 놓고 다 같이 작업할 수 있습니다.

회사의 개발자들이 어떤 솔루션을 같이 개발할 때, 설계 패턴을 사용하면 서로의 작업을 이해하고, 서로 공유하는 데에 아주 좋습니다. (미흡하지만 일단..) 

여러분이 만든 패턴을 놓고 개발자들이 다 같이 살펴보면, 설계하고 write-up하는 초기 단계에서는 시간이 많이 걸릴 지 몰라도 나중에는 더 큰 보상을 받을 겁니다.

새로운 패턴을 만들어내기 전에, 철저하게 찾아보고 조사하세요. 새로운 패턴을 만들어내는 것 보다는, 기존의 검증된 패턴을 사용하거나, 그것을 가지고 가공하여 사용하는 편이 더욱 유익합니다.

0415 김용균 찜 & 작업완료

Writing Design Patterns

디자인  패턴 작성하기

Although this book is aimed at those new to design patterns, a fundamental understanding of how a design pattern is written can offer you a number of useful benefits. For starters, you can gain a deeper appreciation for the reasoning behind a pattern being needed but can also learn how to tell if a pattern (or proto-pattern) is up to scratch when reviewing it for your own needs.

비록 이 책은 새로운 설계패턴에 초점을 맞춘 것은 아니지만 어떻게 설계패턴을 작성하는가를 근본적으로 이해하면 설계패턴의 유용한 이점들을 알 수 있습니다. 시작하는 사람들을 위해, 패턴이 필요한 상황을 추론하면서 더 깊은 감동을 줄 수 있으며 또한 당신이 필요에 따라 설계패턴을 볼 때 어떻게 패턴을 사용할 지 설명할 방법을 배우게 됩니다.

번역문 제안 >>

이 책은 디자인 패턴을 처음 접하는 분들을 위한 책이기는 하지만, 디자인 패턴을 작성하는 방법을 이해하면 여러 가지 이점이 있습니다. 필요한 패턴의 저변에 깔린 논리를 더욱 깊게 이해할 수 있을 뿐 아니라, 패턴을 사용할지 여부를 판단할 때에, 이 패턴이 적절한지 여부를 검토하는 방법도 배울 수 있습니다.

Writing good patterns is a challenging task. Patterns not only need to provide a substantial quantity of reference material for end-users (such as the items found in the structure section above), but they also need to be able to almost tell a ‘story’ that describes the experience they are trying to convey. If you’ve already read the previous section on ‘what’ a pattern is, you may think that this in itself should help you identify patterns when you see them in the wild. This is actually quite the opposite - you can’t always tell if a piece of code you’re inspecting follows a pattern.

좋은 패턴을 작성하는 것은 도전적인 작업입니다. 패턴은 상당한 양의 레퍼런스를 실 사용자(구조 편을 참고하세요) 에게 제공해야 할 뿐만 아니라 경험을 전달하기 위해 묘사를 할 때 사용할 수 있어야 합니다. 만약 이전의 글인 ‘패턴은 무엇인가’에 대해 이미 읽었다면  패턴을 보게 될 때 패턴을 알아차리는데 도움이 될 것입니다. 물론 이러한 점은 사실 반대입니다. 당신은 코드의 조각에 대해 항상 패턴을 따라 검사를 할 순 없습니다.

번역문 제안>>

좋은 패턴을 작성하기란 쉽지는 않습니다. 패턴을 작성할 때에는, 패턴을 사용하려는 유저에게 상당한 양의 레퍼런스를 제공해야 합니다. 예를 들면 패턴의 구조에서 언급했던 것들을 다 제공해야 합니다. 뿐만 아니라 패턴을 사용하는 것과 관련한 경험을 하나의 흐름으로 전달해줄 정도가 되어야 합니다. '패턴이란 무엇인가?' 부분을 읽기만 해도, 실무에서 패턴을 보면, 패턴임을 알아볼 수 있을 거라고 생각할지도 모릅니다. 하지만 오히려 정반대입니다. 여러분이 살펴보는 코드가 특정 패턴을 따르는 코드인지 여부를 구분하는 것은 쉽지 않습니다.

When looking at a body of code that you think may be using a pattern, you might write down some of the aspects of the code that you believe falls under a particular existing pattern, but it may not be a one at all. In many cases of pattern-analysis you’ll find that you’re just looking at code that follows good principles and design practices that could happen to overlap with the rules for a pattern by accident. Remember - solutions in which neither interactions nor defined rules appear are not patterns.

당신이 몸이 되는 코드에 패턴을 사용해야 한다고 생각하며 보게 될 때 당신은 아마 코드의 부분을 적어가며 이미 존재하는 패턴 때문에 실패했다고(?) 믿습니다만 그게 아마 전체 중 하나는 아닐 것입니다. 당신은 코드를 보면서 패턴 분석의 많은 상황 중 좋은 원리와 설계 실천 방법은 문제가 있는 패턴의 규칙들과 겹치게 된다는 점을 찾게 될겁니다. 기억하세요 - 상호작용과 정의된 규칙이 있지 않은 해결책은 패턴이 아닙니다.

번역문 제안

어떤 코드를 본다고 가정해보죠. 여러분은 이 코드가 기존의 특정 패턴을 따른다고 생각할 수도 있습니다. 하지만 실제로는 이 코드는 패턴을 전혀 따르지 않는 것일 수도 있습니다. 코드가 어떤 패턴을 따르는지 분석할 때, 많은 경우에는 코드가 좋은 원칙이나 디자인 관행을 따를 수도 있습니다. 이런 좋은 원칙이나 디자인 관행은 우연히 어떤 패턴의 규칙과 겹칠 수도 있습니다. 하정의된 규칙을 포함하지 않는 솔루션은 패턴이 아닙니다. 지만 기억하세요. 내부에 상호작용과

If you’re interested in venturing down the path of writing your own design patterns I recommend learning from others who have already been through the process and done it well. Spend time absorbing the information from a number of different design pattern descriptions and books and take in what’s meaningful to you - this will help you accomplish the goals you’ve got of designing the pattern you want to achieve. You’ll probably also want to examine the structure and semantics of existing patterns - this can be begun by examining the interactions and context of the patterns you are interested in so you can identify the principles that assist in organizing those patterns together in useful configurations.

만약 당신이 스스로 작성한 설계 패턴이 만든 방법을 따라 모험을 해가는 것에 흥미가 있다면 이미 그 과정을 통해 좋은 결과를 낸 다른 패턴들을 배우는 것을 추천합니다. 다른 수많은 설계 패턴에 대한 설명과 책을 통해 시간을 들여 정보를 흡수한다면 당신에게 정말 의미 있는 시간이 될 것입니다. 그 시간들이 당신이 원하는 성과물을 패턴을 통해 설계하고 성취하는데 도움을 줄 것입니다. 또한 당신은 아마도 구조와 존재하는 패턴들의 의미에 대해 설명을 듣고 싶을 것입니다. 이것은 당신이 관심 있는 상호작용과 패턴의 문맥에 대해 설명해줄 것이고 당신이 그 패턴들을 좋은 설정을 통해 조직화하는 공식들을 분별할 수 있게 해줄 것입니다.

번역문 제안>>

나만의 디자인 패턴을 작성하는 과정 자체에 관심이 있으시다면, 기존에 좋은 패턴을 만든 사람들에게서 배우기를 권합니다. 시간을 들여서, 패턴에 대한 책이나 패턴에 대해 기술한 문서를 살펴보고, 이 중에 여러분에게 의미있는 것을 흡수하세요. 이렇게 하면 여러분이 원하는 패턴 작성 능력에 근접할 수 있을 것입니다. 또한 기존의 패턴 중에 관심있는 패턴의 구조와 semantics를 자세히 살펴 보세요. 그리고 패턴을 조직하는 원리를 알아내 보세요.

Once you’ve exposed yourself to a wealth of information on pattern literature, you may wish to begin your pattern using an existing format and see if you can brainstorm new ideas for improving it or integrating your ideas in there.  An example of someone that did this quite recently is JavaScript developer Christian Heilmann, who took an existing pattern called the module pattern and made some fundamentally useful changes to it to create the revealing module pattern (this is one of the patterns covered later in this book).

당신이 패턴에 대해 잘 정리된 정보를 보게 된다면 당신은 아마 존재하는 포맷의 패턴을 사용하기를 그리고 이 패턴들을 향상시키기 위한 새로운 아이디어를 브레인스토밍 하거나 당신의 아이디어를 패턴에 반영하기를 소망하게 될 것입니다. 가장 최근의 누군가 예를 들면 자바스크립트 개발자인 Christian Heilmann는 이미 존재하는 module 패턴으로 실로 유용한 revealing module 패턴을 만들었습니다. (이 내용은 이 책에 나옵니다.)

번역문 제안>>

패턴에 관한 지식을 충분히 흡수하였다면, 이제는 직접 패턴을 작성해 보세요. 기존의 패턴 포맷을 사용해서, 기존의 패턴을 향상시킬 방법은 없는지 아이디어를 생각해내 보세요.  아니면 기존의 패턴에 여러분의 아이디어를 통합시킬 방법은 없는지 고민해 보세요. 이렇게 한 사례로 크리스티안 하일만의 예를 들 수 있습니다. 하일만은 자바스크립트 개발자인데요, 기존의 패턴인 모듈 패턴을 근본적으로 바꾸어서 revealing module 패턴을 새로이 만들었습니다. (이 패턴에 대해서는 이 책의 뒷부분에서 다루었습니다.)

If you would like to try your hand at writing a design pattern (even if just for the leaning experience of going through the process), the tips I have for doing so would be as follows:

당신이 직접 설계 패턴을 작성해보고 싶다면(비록 이 과정을 통한 경험으로 배우는 것이지만) 해볼만한 다음과 같은 좋은 팁이 있습니다.

번역문 제안>>

직접 디자인 패턴을 작성해보고 싶으시다면, (그냥 디자인 패턴을 만드는 과정을 겪어보는 학습용 목적이라고 하더라도요), 몇 가지 팁을 드리겠습니다.

 

Pattern writing is a careful balance between creating a design that is general, specific and above all, useful. Try to ensure that if writing a pattern you cover the widest possible areas of application and you should be fine.  I hope that this brief introduction to writing patterns has given you some insights that will assist your learning process for the next sections of this book.

패턴을 작성하는 것은 일반적인 설계와 유용한 것 사이의 균형에 유의해야 합니다. 어플리케이션을 가능한 광범위하게 커버할 수 있는 패턴을 작성하면 더 좋아질겁니다. 이 패턴을 작성하는 글을 소개함으로 이 책의 다음 섹션을 통해 과정을 배워가게 될 때 통찰력을 줄거라 기대합니다.

번역문제안>> 패턴을 작성할 때에는 보편적으로 적용되는 디자인, 특정 상황에 적용되는 디자인, 유용한 디자인, 이 셋 간에 균형점을 찾아야 한다. 패턴을 작성하고 있다면, 가능한 광범위하게 적용되게 하자. 그럼 괜찮은 패턴을 만들 수 있을 것이다. 지금까지 패턴 작성에 관한 간략한 소개를 해 보았다. 이 책의 나머지 부분을 읽어나가면서 배우는데에 도움이 되기를 바랍니다.

0414 @김용균 찜 & 작업완료

Anti-Patterns

If we consider that a pattern represents a best practice, an anti-pattern represents a lesson that has been learned. The term anti-patterns was coined in 1995 by Andrew Koenig in the November C++ Report that year, inspired by the GoF's book Design Patterns. In Koenig’s report, there are two notions of anti-patterns that are presented. Anti-Patterns:

만약 가장 좋은 패턴이 무엇인가를 알고자 한다면 안티패턴에 대한 학습이 선행되어야 합니다. 안티패턴이란 용어는 Andrew Koening 이 1995년 11월 C++ 보고서인 GoF's book Design Patterns 에서 처음으로 나타났습니다. Koening은 그 보고서에서 안티패턴에 대해 아래 두 개념으로 정의를 했습니다.

If we consider that a pattern represents a best practice, an anti-pattern represents a lesson that has been learned. The term anti-patterns was coined in 1995 by Andrew Koenig in the November C++ Report that year, inspired by the GoF's book Design Patterns. In Koenig’s report, there are two notions of anti-patterns that are presented. Anti-Patterns:

번역문 제안 :

패턴이 '좋은 실천법'을 의미한다면, 안티 패턴은 '반면교사를 통해 얻은 교훈' 정도를 의미합니다. 안티 패턴이라는 말은 1995년 앤드류 쾌닉이 C++ 레포트에서 처음으로 사용하였습니다. GoF의 설계 패턴에 대한 책에 영감을 받아서 쓴 레포트였습니다. 이 레포트에 보면 안티 패턴에 대한 두 가지 주장이 나옵니다.

번역문 제안:

On this topic, Alexander writes about the difficulties in achieving a good balance between good design structure and good context:

Alexander는 이 주제에 대해 좋은 설계 구조와 좋은 문맥 사이에 조화로운 균형을 이뤄야 하기에 어렵다고 적었습니다.

번역문제안>>

이 주제에 대해 알렉산터는 좋은 설계 구조와 좋은 문맥 사이에 조화로운 균형을 이루기기 어렵다고 했습니다.

“These notes are about the process of design; the process of inventing physical things which display a new physical order, organization, form, in response to function.…every design problem begins with an effort to achieve fitness between two entities: the form in question and its context. The form is the solution to the problem; the context defines the problem”.

"설계의 과정은 새로운 원리나 조직, 형태나 함수에 대한 반응... 등을 방법을 발명하는 과정입니다. 모든 설계의 문제는 두 개념 사이에 맞는 것을 찾기 위해 노력하기 때문에 나타납니다. 방식적으로 올바른 것과 문맥적으로 올바른 것 즉, 방식은 문제에 대한 해결책을 의미하며 문맥은 문제를 정의하는 것입니다."

While it’s quite important to be aware of design patterns, it can be equally important to understand anti-patterns. Let us qualify the reason behind this. When creating an application, a project’s life-cycle begins with construction however once you’ve got the initial release done, it needs to be maintained. The quality of a final solution will either be good or bad, depending on the level of skill and time the team have invested in it. Here good and bad are considered in context - a ‘perfect’ design may qualify as an anti-pattern if applied in the wrong context.

설계패턴에 대해 아는 것도 중요한 반면 그만큼 안티패턴에 대해 아는 것도 중요합니다. 이것 뒤에 있는 의미를 함께 알아봅시다. 어플리케이션을 만들 때 설계부터 프로젝트의 생명주기가 시작되며 지속적으로 유지되어야 하지만 최초의 릴리즈로 완료되기도 합니다. 최종 솔루션은 기술적 숙련도와 팀이 이것을 개발할 때 주어진 시간이 어느 정도인가에 따라 질적으로 좋기도 하고 나쁘기도 합니다. 좋고 나쁨은 문맥적으로 고려되어야 하는데 ‘완벽한' 설계가 사실은 잘못된 문맥으로 만들어진 안티패턴 일 수 있습니다.

The bigger challenges happen after an application has hit production and is ready to go into maintenance mode. A developer working on such a system who hasn’t worked on the application before may introduce a bad design into the project by accident. If said bad practices are created as anti-patterns, they allow developers a means to recognize these in advance so that they can avoid common mistakes that can occur - this is parallel to the way in which design patterns provide us with a way to recognize common techniques that are useful. 

어플리케이션이 생산에 들어가면서, 그리고 유지보수 하는 상태가 되면서 더욱 큰 도전이 나타납니다. 어플리케이션을 만들 당시에 일하지 않았던 시스템 개발자는 잘못된 설계로 나타나는 문제를 설명해야 할지도 모릅니다. 나쁜 예시가 안티패턴을 만든다면 그들은 개발자에게 안티패턴을 통해 문제를 인지하고 흔히 발생하는 일반적인 실수를 회피할 수 있도록 합니다. 이와 같이 설계패턴은 일반적인 기술들을 유용하게 하며 일률적인 방법을 제공합니다.

To summarize, an anti-pattern is a bad design that is worthy of documenting. Examples of anti-patterns in JavaScript are the following:

종합하면 안티패턴은 잘 문서화된 잘못된 설계입니다. 자바스크립트 안티패턴의 예는 다음과 같습니다 :

번역문제안>> 요약해보면, 안티패턴이란, 문서화해둘만한 가치가 있는 잘못된 설계입니다. 자바스크립트에서 안티패턴의 예는 다음과 같습니다 :

<자바스크립트 안티패턴의 예>

 

Knowledge of anti-patterns is critical for success. Once you are able to recognize such anti-patterns, you will be able to refactor your code to negate them so that the overall quality of your solutions improves instantly.

안티패턴에 대한 지식은 성공적인 개발을 위해 대단히 중요합니다. 안티패턴 같은 것에 대해 인지할 수 있게 되면 무력화된 코드를 리팩토링 할 수 있게 되고 당신의 해결책에 대한 전체적인 질을 점진적으로 향상시킬 것입니다.

번역문제안>>

프로그램을 잘 개발하려면 안티 패턴에 대해 잘 아는 것이 매우 중요합니다. 일단, 안티 패턴을 알아볼 수 있으면, 안티 패턴에 해당하지 않도록 코드를 리팩토링할 수 있습니다. 결국 여러분이 개발하는 솔루션의 품질도 전반적으로 향상시킬 것입니다.

0504 @김용균 찜 & 확인필요

Categories Of Design Pattern
디자인 패턴의 범주

A glossary from the well-known design book, Domain-Driven Terms, rightly states that:

 디자인패턴과 관련해 잘 알려진 도서인 도메인 주도 개발에는 이렇게 나와 있습니다.

A design pattern

names, abstracts, and identifies

the key aspects of a common design structure

that make it useful

for creating a reusable object-oriented design.

공통적인 디자인 구조의 핵심적인 측면들이 있어서, 재사용가능한 객체-지향 디자인을 만드는 것이 유용한데요, 디자인 패턴은 공통적인 디자인 구조의 핵심적인 측면에 이름을 붙이고, 추상화하고 무엇인지 지정합니다.

The design pattern

identifies

the participating classes and their instances,

their roles and collaborations,

and the distribution of responsibilities.

Each design pattern

focuses on a particular object-oriented design problem or issue. 

It describes when it applies, whether or not it can be applied in view of other design constraints, and the consequences and trade-offs of its use. Since we must eventually implement our designs, a design pattern also provides sample ... code to illustrate an implementation.

Although design patterns describe object-oriented designs, they are based on practical solutions that have been implemented in mainstream object-oriented programming languages ....”

Design patterns can be broken down into a number of different categories. In this section we’ll review three of these categories and briefly mention a few examples of the patterns that fall into these categories before exploring specific ones in more detail.

디자인패턴은 추상적이며 일반적인 구조 디자인에서 객체지향적인 디자인으로 재사용 가능하도록 만들기 위해서 유용하게 사용할 수 있도록 만들어진 것입니다. 그러한 디자인 패턴은 클래스들과 인스턴스로 잘 세분화 되어 있고 규칙적이고 일관적이며 좋은 응답성을 가집니다.

각각의 디자인 패턴은 세세한 객체지향 디자인의 문제나 이슈에 초점을 맞추고 있습니다.

디자인 패턴이 사용될 때 어쩌구 저쩌구. 우리가 설계를 할 때 효과적인 향상을 보기 위해 디자인 패턴은 샘플 코드를 통해 효과를 설명해줍니다.

비록 디자인패턴은 객체지향적인 디자인만을 묘사하지만 디자인패턴은 객체지향적인 개발언어의 큰 흐름에서 나타난 본이 되는 해결책입니다.”

디자인 패턴은 여러 분류에 속할 수 있습니다. 이 섹션에서는 세가지 디자인 패턴 분류를 살펴보고 디자인 패턴을 세세하게 살펴보기 전에 패턴의 몇 가지 예를 살펴보겠습니다.

>> 중간에 표시하신 부분이요~

 It describes 디자인 패턴은 기술한다.

        when it applies,   언제 디자인 패턴이 적용되는지..  

        whether or not it can be applied 디자인패턴이 적용되는지 안되는지.

                in view of other design constraints,  디자인에 관한 다른 제약사항들을 고려하였을 때

        and the consequences and trade-offs  이 디자인 패턴을 사용으로 인한 결과와 단점에 대해서..

                of its use.

>> 모아볼게요.

디자인 패턴은 이 디자인 패턴이 어떤 때에 적용되는지, 디자인에 관한 다른 제약사항들을 고려할 때, 이 디자인 패턴이 적용되는지 안되는지 여부를 기술합니다. 또한 이 디자인 패턴을 사용해서 생기는 결과와 단점에 대해서도 기술합니다.

Creational Design Patterns
생성 디자인 패턴

Creational design patterns focus on handling object creation mechanisms where objects are created in a manner suitable for the situation you are working in. The basic approach to object creation might otherwise lead to added complexity in a project whilst these patterns aim to solve this problem by controlling the creation process.

생성 디자인 패턴은 객체가 생성될 때 객체의 생성 메커니즘을 다루는 부분에 초점을 둡니다. 기본적으로 객체를 생성할 때 사용되며 이 디자인 패턴들은 객체의 생성을 제어할 때 발생하는 문제를 해결하는데 중점을 두었습니다.

Some of the patterns that fall under this category are: Constructor, Factory, Abstract, Prototype, Singleton and Builder.

이 분류에는 요런 애들이 있습니다. : 컨스트럭터, 팩토리패턴, 추상화, 프로토타입, 싱글톤, 빌더.

Structural Design Patterns
구조 디자인 패턴

Structural patterns are concerned with object composition and typically identify simple ways to realize relationships between different objects. They help ensure that when one part of a system changes, the entire structure of the system doesn't need to do the same. They also assist in recasting parts of the system which don't fit a particular purpose into those that do.

구조 디자인패턴은 다른 객체와의 관계를 쉽게 비교하고 인지하기 위해 사용됩니다. 구조 디자인 패턴은 시스템을 변경할 때 시스템의 전체적인 구조를 동일하게 변경해야 할 필요가 없도록 도와줍니다. 또한 시스템의 구조를 다시 조정할 때 각각의 부분들을 변경할 필요가 없도록 돕습니다.

Patterns that fall under this category include: Decorator, Facade, Flyweight, Adapter and Proxy.

이 분류에 요런 애들이 있습니다 : 요런 요런 애들.

Behavioral Design Patterns
동작 디자인 패턴

Behavioral patterns focus on improving or streamlining the communication between disparate objects in a system.

턴동작 디자인 패턴은 시스템 내에 완전히 다른 객체들간의 상호작용을 향상시키거나 유연하게 하는데 초점을 둡니다.

Some behavioral patterns include: Iterator, Mediator, Observer and Visitor.

몇가지 동작 디자인 패턴이 있습니다 : 이터레이터, 메디에이터, 옵저버