積累,創造,分享!

          BlogJava 首頁 新隨筆 聯系 聚合 管理
            25 Posts :: 13 Stories :: 26 Comments :: 0 Trackbacks

          Patterns are about communicating problems and solutions. Simply put, patterns enable us to document a known recurring problem and its solution in a particular context, and to communicate this knowledge to others. One of the key elements in the previous statement is the word recurring, since the goal of the pattern is to foster conceptual reuse over time.

          We explore this in more detail in Chapter 5, in the section "What Is a Pattern?" on page 118.

          This well-known pattern definition comes from Christopher Alexander in A Pattern Language [Alex2]:

          Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution.

          Christopher Alexander

          Alexander expands his definition further, and noted patterns figure Richard Gabriel [Gabriel] discusses this definition in more detail [Hillside]. Gabriel offers his own version of Alexander's definition as applied to software:

          Each pattern is a three-part rule, which expresses a relation between a certain context, a certain system of forces which occurs repeatedly in that context, and a certain software configuration which allows these forces to resolve themselves. [See A Timeless Way of Hacking.]

          Richard Gabriel

          This is a fairly rigorous definition, but there are also much looser ones. For example, Martin Fowler offers the following definition in Analysis Patterns [Fowler2]:

          A pattern is an idea that has been useful in one practical context and will probably be useful in others.

          Martin Fowler

          As you can see, there are many definitions for a pattern, but all these definitions have a common theme relating to the recurrence of a problem/solution pair in a particular context.

          Some of the common characteristics of patterns are as follows:

          • Patterns are observed through experience.

          • Patterns are typically written in a structured format (see "Pattern Template" on page 129).

          • Patterns prevent reinventing the wheel.

          • Patterns exist at different levels of abstraction.

          • Patterns undergo continuous improvement.

          • Patterns are reusable artifacts.

          • Patterns communicate designs and best practices.

          • Patterns can be used together to solve a larger problem.

          Many great minds have spent a significant amount of time attempting to define and refine the notion of a software pattern. Suffice it to say, we do not presume to be great minds, nor do we wish to spend time expanding these discussions. Instead, we attempt to be true to aspects of these various definitions, focusing on the most simple and recurring theme in each.
                                                                                                                         ---------------from Core J2ee Patterns

          posted on 2005-08-04 16:11 nighthawk 閱讀(333) 評論(0)  編輯  收藏 所屬分類: 分析與設計
          主站蜘蛛池模板: 阳泉市| 老河口市| 辽阳县| 法库县| 五寨县| 湖南省| 页游| 肇州县| 德令哈市| 通道| 玛沁县| 时尚| 临颍县| 辰溪县| 桂阳县| 芜湖市| 和林格尔县| 揭西县| 徐汇区| 寿阳县| 白银市| 合阳县| 桐乡市| 抚松县| 大连市| 胶南市| 元氏县| 社旗县| 含山县| 聂拉木县| 赤城县| 江门市| 山阳县| 沈阳市| 汶上县| 安丘市| 临澧县| 额尔古纳市| 庄河市| 丹凤县| 盐城市|