E D R , A S I H C RSS

DPSC Chapter1



1. Chapter 1

1.1. Introduction

p1

Welcome to The Design Patterns Smalltalk Companion , a companion volume to Design Patterns Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and Jogn Vlissides(Gamma, 1995). While the earlier book was not the first publication on design patterns, it has fostered a minor revolution in the software engineering world.Designers are now speaking in the language of design patterns, and we have seen a proliferation of workshops, publications, and World Wide Web sites concerning design patterns. Design patterns are now a dominant theme in object-oriented programming research and development, and a new design patterns community has emerged.

The Design Patterns Smalltalk Companion 의 세계에 오신걸 환영합니다. 이 책은 Design Patterns Elements of Reusable Object-Oriented Software(이하 DP) Erich Gamma, Richard Helm, Ralph Johnson, and Jogn Vlissides(Gamma, 1995). 의 편람(companion, 보기에 편리하도록 간명하게 만든 책) 입니다. 앞서 출간된 책(DP)이 디자인 패턴에 관련한 책에 최초의 책은 아니지만, DP는 소프트웨어 엔지니어링의 세계에 작은 혁명을 일으켰습니다. 이제 디자이너들은 디자인 패턴의 언어로 이야기 하며, 우리는 디자인 패턴과 관련한 수많은 workshop, 출판물, 그리고 웹사이트들이 폭팔적으로 늘어나는걸 보아왔습니다. 디자인 패턴은 객체지향 프로그래밍의 연구와 개발에 있어서 중요한 위치를 가지며, 그에 따라 새로운 디자인 패턴 커뮤니티들이 등장하고 있습니다.(emerge 를 come up or out into view 또는 come to light 정도로 해석하는게 맞지 않을까. 이제 디자인 패턴은 객체지향 프로그래밍의 연구와 개발에 있어서 중요한 위치를 가지고 있으며, 디자인 패턴 커뮤니티들이 새로이 등장하고 있는 추세입니다. 그래도 좀 어색하군. -_-; -- 석천 바꿔봤는데 어때? -상민 -- DeleteMe)gogo..~ 나중에 정리시 현재 부연 붙은 글 삭제하던지, 따로 밑에 빼놓도록 합시다.

Design Patterns describes 23 design patterns for applications implemented in an object-oriented programming language. Of course, these 23 patterns do not capture all the design knowledge an object-oriented designer will ever need. Nonetheless, the patterns from the "Gang of Four"(Gamma et al.) are a well-founded starting point. They are a design-level analog to the base class libraries found in Smalltalk development environments. They do not solve all problems but provide a foundation for learning environments. They do not solve all problems but provide a foundation for learning about design patterns in general and finding specific useful architectures that can be incorporated into the solutions for a wide variety of real-world design problems. They capture an expert level of design knowledge and provide the foundation required for building elegant, maintainable, extensible object-oriented programs.

디자인 패턴은 객체지향 언어로 제작된 프로그램에 23개의 패턴을 제시합니다. 물론, 23개의 패턴이 객체지향 디자이너들이 필요로 할 모든 디자인의 난제들을 전부 잡아내지는 못합니다. 그럼에도 불구하고 "Gang of Four"(Gamma et al.)에서 제시한 23개의 패턴은 좋은 디자인의 든든한 출발을 보장합니다. 이 23개의 패턴은 Smalltalk class libraries에 기반을한 디자인 수준(design-level) 분석(analog)입니다. 이 패턴을 이용해서 모든 문제를 해결할 수는 없지만, 전반적이고, 실제 디자인의 다양한 문제들을 위한 해결책을 위한 유용한 지식들의 기반을 제공할것입니다. 또, 이 패턴을 통해서 전문가 수준의 디자인 지식을 취득하고, 우아하고, 사후 관리가 편하고, 확장하기 쉬운 객체지향 프로그램 개발에 기초 지식을 제공하는데 톡톡한 역할을 할것입니다.

In the Smalltalk Companion, we do not add to this "base library" of patterns;rather, we present them for the Smalltalk designer and programmer, at times interpreting and expanding on the patterns where this special perspective demands it. Our goal is not to replace Design Patterns; you should read the Smalltalk Companion with Design Patterns, not instead of it. We have tried not to repeat information that is already well documented by the Gang of Four book. Instead, we refer to it requently;you should too.

Smalltalk Companion에서, 우리는 패턴의 "base library"를 추가하는 것보다 앞으로 요구될 수 있는 패턴으로 때때로 확장하고 해석해서, 설계자나 프로그래머를 위해 제공한다.
우리의 목적은 Design Pattern을 교체하려는 것이 아니다. 당신은 Design Pattern을 대신하는 것이 아니라 Design Pattern과 함께 Smalltalk Companion을 읽어야 한다.
우리는 Gang of Four 책에서 이미 잘 문서화된 정보는 반복해서 공부하지 않는다. 대신, 우리는 자주 그것을 참조해야한다. 여러분 또한 그렇게 해야한다.

Another)
Smalltalk Companion에서, 우리는 패턴의 'base library'를 추가하지 않습니다. 그것보다, 우리는 base library들을 Smalltalk 의 관점에서 해석하고 때?灌? 확장하여 Smalltalk 디자이너와 프로그래머를 위해 제공할 것입니다. 우리의 목표는 Design Patterns을 대체하려는 것이 아닙니다. Design Patterns 대신 Smalltalk Companion을 읽으려 하지 마시고, 두 책을 같이 읽으십시오. 우리는 이미 Gang of Four에서 잘 문서화된 정보를 반복하지 않을겁니다. 대신, 우리는 GoF를 자주 참조할 것이고, 독자들 역시 그래야 할 것입니다. -- 문체를 위에거랑 맞춰봤음.. 석천



1.2. 1.1 Why Design Patterns?


Learning an object-oriented language after programming in another paradigm, such as the traditional procedural style, is difficult. Learning to program and compose application in Smalltalk requires a complex set of new skills and new ways of thinking about problems(e.g Rosson & Carroll, 1990; Singley, & Alpert, 1991). Climbing the "Smalltalk Mountain" learning curve is cetainly nontrivial. Once you have reached that plateau where you feel comfortable building simple Smalltalk applications, there is still a significant distance to the expert peak.

다른 이론적인 테두리안에서 프로그램(전통적인 절차식 스타일)을 한 후 객체 지향 언어를 배우는 것은 어렵다. Smalltalk 안에서 복합된 응용 프로그램 하는 것을 배우는 것은 복잡한 새로운 기술과 문제에 대한 새로운 사고 방식을 요구한다.(" e.g Rosson & Carroll, 1990; Singley, & Alpert, 1991") "Smalltalk" 라는 산을 오르는 것은 확실히 사소한 것이 아니다. 일단 당신이 간단한 Smalltalk 응용 프로그램을 만드는 데 자신이 있는 경지에 닿았다고 해도, 아직 전문가의 경지와는 분명한 차이가 있다.

Smalltalk experts know many things that novices do not, at various abstraction levels and across a wide spectrum of programming and design knowledge and skills:

  • The low-level details of the syntax and semantics of the Smalltalk language
  • What is available in the form of classes, methods, and functionality in the existing base class libraries
  • How to use the specific tools of the Smalltalk interactive development environment to find and reuse existing functionality for new problems, as well as understanding programs from both static and runtime perspective
  • How to define and implement behavior in new classes and where these classes ought to reside in the existing class hierarchy
  • Which classes work well together as frameworks
  • Recurring patterns of object configurations and interactions and the sorts of problems for which these cooperating objects provide (at least partial) solutions

Smalltalk 전문가들은 여러가지 다양한 추상적 단계와 폭넓은 programming과 design에 대한 지식과 기술면에서 초심자들이 알지 못하는 많은 것을 알고 있다.

  • Smalltalk의 문법과 언어기호적인 저급단계 (컴퓨터에서의 low-level 단계)적인 항목에 대해
  • 현존하는 기반 class 라이브러리로부터 이용가능한 class, methods. 그리고 그 모듈들(현재는 functionality를 function 군들 또는 모듈 정도로 해석중. 태클 바람. --;)에 대해
  • 새로운 문제를 찾고 문제 해결을 위한 기존의 모듈을 재사용하기 위해, 또는 정적이거나 동적인 관점 양쪽 측면에서 프로그램을 이해하기 위해 어떻게 Smalltalk IDE 툴을 사용해야 하는가에 대해
  • 어떤 클래스들이 frameworks로서 서로 잘 작동하는지에 대해
  • 객체의 환경설정과 상호작용, 이러한 서로 협력하는 객체들이 해결해야할 문제들의 정렬 등에서 반복되는 패턴에 대해

This is by no means an exhaustive list, and even novices understand and use much of the knowledge. But some items, especially the last -- recurring patterns of software design, or design patterns -- are the province of design expert.

A design pattern is a reusable implementation model or architecture that can be applied to solve a particular recurring class of problem. The pattern sometimes describes how methods in a single class or subhierarchy of classes work together; more often, it shows how multiple classes and their instances collaborate. It turns out that particular architectures reappear in different applications and systems to the extent that a generic pattern template emerges, one that experts reapply and customize to new application - and domain-specific problems. Hence, experts know how to apply design patterns to new problems to implement elegant and extensible solutions.

디자인 패턴은 끊이없이 발생하는 클래스 구성상의 문제에 해결책을 제시하는 재사용할수 있는 실행 모델이나 아키텍처이다. 때로 패턴은 단독적이거나 하위 클래스 구조에서 어떻게 매서드 들이 함께 작용하는지를 묘사한다.; 아마도, 패턴상에서는 좀더 빈번히 다중 클래스나 그들의 인스턴스의 협력을 보여줄다.

패턴은 각기 다른 어플리케이션과 시스템상에서 재현되는 특별한(고유한, 플랫폼 종속적인) 아키택처, 전문가들이 새로운 어플리케이션,분야에서 발생하는 특별한 문제들을 제거한다. (위에서 쓰인 one이 particular architecture와 동등한 위치로 해석한 방법. 다른의견 제안바람-상민

그러므로, 전문가들은 어떻게 새로운 문제에 대하여 고아하고 확장성있는 해결책으로 안내하는 디자인 패턴의 활용 방법을 알고 있다.
(그러므로, 전문가들은 새로운 문제를 해결하기 위해 명쾌하고 확장성이 뛰어난 디자인 패턴을 적용하는 방법을 알고 있다.)



In general, designers -- in numerous domains, not just software -- apply their experience with past problems and solution to new, similar problems. As Duego and Benson(1996) point out, expert designers apply what is known in cognitive psychology and artificial intelligence as case-based reasoning, remembering past cases and applying what they learned there. This is the sort of reasoning that chess masters, doctors, lawyers, and architects empoly to solve new problems. Now, design patterns allow software designers to learn from and apply the experiences of other designers as well. As in other domains, a literature of proven patterns has emerged. As a result, we can "stand on the shoulders of giants" to get us closer to the expert peak. As John Vlissies (1997) asserts, design patterns "capture expertise and make it accessible to non-experts" (p. 32).

디자이너들-소프트웨어에만 국한하지 않은 수많은 분야에서-은 그들의 과거의 문제와, 해법에 경험을 비슷한 문제에 적용 시킨다. Duego와 Genson(1996)은 전문 디자이너들이 사례를 기반으로 경험에서 인지한 지혜안에서 과거의 사례를 기억하고 그들이 배운것을 적용시키는 것에 주목한다. (생략 및 의역) 이것은 체스의 고수, 의사, 변호사 그리고 건축가들이 새로운 문제에 대응하는 추론 방식의 한 방식이다. 현재, 디자인 패턴은 소프트웨어 디자이너들이 배워온것들과 다른 분야의 디자이너(other designer)들의 경험들 모두를 감안한다. 이런 노력들은 결과적으로, "거인의 어깨에 올라서 있는것" 같은 방법으로 우리를 훌륭한 디자인에 이끌수 있다. John Vlissies(1997)은 디자인 패턴은 "전문 지식을 잡고 비전문가들이 그것을 이용하기 쉽게 해주는 것이라고 평한다. (p. 32).

Design patterns also provide a succinct vocabulary with which to describe new designs and retrospectively explain existing ones. Patterns let us understand a design at a high level before drilling down to focus on details. They allow us to envision entire configurations of objects and classes at a large grain size and communicate these ideas to other designers by name. We can say, "Implement the database access object as a Singleton," rather than, "Let's make sure the database access class has just one instance. The class should include a class variable to keep track of the singl instance. The class should make the instance globally available but control access to it. The class should control when the instance is created and ..." Which would you prefer?

디자인 패턴은 새로운 패턴에 관해서 간단하게 원리를 표현하고, 패턴은 존재하는 모습을 꾸준히 설명한다.패턴은 세부내용에 들어가기 앞서, 좀더 큰 관점으로 이해를 할수있게 한다. 패턴은 우리가 좀더 큰 관점에으로 ㄸ 다른 디자이너들의 생각의 교환시 객체과 클래스가 어떻게 구성되어 있는지 묘사한다. 우리는 "싱글턴 메소드로 데이터 베이스 접근 부분을 구성했습니다." 그리고 "데이터 베이스 접근은 오직 하나의 인스턴스만이 접근하도록 해습니다. 그 클래스는 싱글 인스턴스의 방법 사용을 위해서 클래스 변수를 사용할것입니다. 그 클래스는 광역으로 광역으로 접근가능한 인스턴스로 될것이지만, 나중고침
그 클래스는 그 인스턴스가 만들어지고... "고 말할수 있습니다. 당신은 어떻게 설명하겠습니까?

졸려서.. --; 조만간 마저 하겠음 -- 석천

1.3. 1.2 Why a Smalltalk Companion?


p3 중간부터

Christopher Alexander and his colleagues have written extensively on the use of design patterns for living and working spaces-homes, buildings, communal areas, towns. Their work is considered the inspiration for the notion of software design patterns. In The Timeless Way of Building(1979) Alexander asserts, "Sometimes there are version of the same pattern, slightly different, in different cultures" (p.276). C++ and Smalltalk are different languages, different environments, different cultures-although the same basic pattern may be viable in both languages, each culture may give rise to different versions.

Christopher Alexander와 그의 친구, 동료들은 디자인 패턴이 공간활용과, 건축, 공동체의 구성방법 까지 확장되는 것에 관한 글을 써왔다. 여기에서 그들이 추구하는 바는 이런 분야에 적용을 통하여, 소프트웨어 디자인 패턴을 위한 또 다른 새로운 창조적 생각 즉, 영감을 얻기위한 일련의 작업(궁리)이다. The Timeless Way of Building(1979) 에?? Alexander는 "때로는 서로다른 문화권에서 아주 약간은 다르게 같은 패턴의 버전들이 존재하걸 볼수 있다"(p.276) 라고 언급한다. C++과 Samlltalk는 비록 같은 기본적인 패턴에서의 출발을 해도 다른 언어, 다른 개발환경, 다른 문화로 말미암아 각자 다른 모양새를 보여준다.

The Gang of Four's Design Patterns presents design issues and solutions from a C+ perspective. It illustrates patterns for the most part with C++ code and considers issues germane to a C++ implementation. Those issue are important for C++ developres, but they also make the patterns more difficult to understand and apply for developers using other languages.

Gang of Four의 Design Patterns 은 C++의 관점에서 디자인의 이슈와 해결책들을 제시한다. Design Patterns는 대부분 C++을 이용한 패턴들과, C++의 적용(implementation)과 관련있는 이슈들에 관한 견해를 다루고 있다. 그러한 이슈들은 C++ 개발자들에게는 매우 중요할지 모르지만, 다른 언어들을 이용하고 있는 개발자들에게는 자칫 이해하고 패턴의 적용에 어려움을 가지고 온다.

This book is designed to be a companion to Design Patterns, but one written from the Smalltalk perspective. One way to think of the Smalltalk Companion, then, is as a variation on a theme. We provide the same pattern as in the Gang of Four book but view them through Smalltalk glasses. (In fact, when we were trying out names for the Smalltalk Companion, someone suggested "DesignPattern asSmalltalkCompanion." However, we decided only hard-core Smalltalkers would get it.)

이책은 Design Patterns 에 대한 지침서, 편람으로 제작되었다. 하지만 관점은 Design Pattern이 C++인것에 반하여 이 책은 Smalltalk에 기인한다. 그냥, 이 책 Smalltalk Companion에 대해서 하나의 주제(design pattern)에 관한 다양한 자료 정도로 생각해 줬으면 한다. 우리는 Gang of Four book에서의 같은 패턴을 제공하지만, Smalltalk라는 안경을 통해서 바라볼것이다. (사실, 우리가 이름에 Samlltalk Companion을 넣을때 어떤이는 "DesignPattern asSmalltalkCompanion" 을-역자주 Smalltalk언어상에서의 표현법 때문인것 같습니다.- 제안하기도 했다. 하지만 그런 이름은 hard-core Smalltalkers들만이 그 이름을 받아들일꺼라고 생각했다.)


p 3 1.2의 마지막 단락부터 번역 시작합니다. --진균

But the Smalltalk Companion goes beyond merely replicating the text of Design Patterns and plugging in Smalltalk examples whereever C++ appeared. As a result, there are numerous situations where we felt the need for additional analysis, clarification, or even minor disagreement with the original patterns. Thus, many of our discussions should apply to other object-oriented languages as well.

하지만 Smalltalk CompanionDesign Patterns 문서를 단순하게 반복 하는것 이상이고 C++ 코드가 있을 경우 Smalltalk 예로 바꾼다. 결과적으로, 우리가 추가적인 분석, 분류, 혹은 기존의 패턴에 대한 약간의 불일치하다고 느끼는 많은 상황이 있다. 그러므로, 우리의 많은 토의가 다른 객체 지향 언어에 잘 적용되야 할 것이다.

Of course, we provide plenty of sample code in Smalltalk. Our examples are, for the most part, not simply Smalltalk versions of the Design Patterns examples. We often felt an alternative would be more useful than a mere translation of the C++ example.
Here in a nutshell are our goals for the Smalltalk Companion as a supplement to Design Patterns :

  • Discussion of issues specific to Smalltalk implementions of the Gang of Four's design patterns
  • Much more Smalltalk sample code
  • More Smalltalk known uses, especially from the major Smalltalk envirnoments class libraries
  • Exploring variations the patterns can embody in Smalltalk and in general
  • Many new examples, from application domains(insurance, telecommunications, etc.) and systems development (windowing systems, compilers, etc.)

물론, 우리는 Smalltalk로된 간단한 코드를 많이 제공한다. 대부분에서, 우리의 예제들은 Design Patterns 예제의 간단한 Smalltalk 버전은 아니다. 우리는 자주 C++ 예제의 단순한 번역 이상으로 좀더 유용하다는 것을 느꼈다. 여기에 간단한 말로 Design Patterns에 보충한 Smalltalk Companion을 위한 목적이 있다.

  • Gang of Four's design patterns의 Smalltalk 구현에 대한 구?셈岵? 쟁점의 토의를 한다.
  • Smalltalk 샘풀 코드 이상이다.
  • Smalltalk를 좀더 잘알고 사용한다. 특히 주요한 Smalltalk 환경 class libraries들을 알아본다.
  • Smalltalk로 구체화될 수 있는 것과 일반적인 패턴의 변화를 탐험하자.
  • 응용 프로그램 영역(보험, 쌍방향 통신, 등등.) 과 시스템 개발(윈도우즈 시스템, 컴파일러, 등등.)의 많은 새로운 예제들을 다룬다.


1.4. 1.3 C++ != Smalltalk(or, Smalltalk ~= C++)

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:04
Processing time 0.0450 sec