積累,創造,分享!

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

          常用鏈接

          留言簿(5)

          隨筆檔案(25)

          文章分類(13)

          文章檔案(13)

          相冊

          其他站點

          友情鏈接

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          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 閱讀(336) 評論(0)  編輯  收藏 所屬分類: 分析與設計
          主站蜘蛛池模板: 准格尔旗| 定州市| 大兴区| 辽阳县| 麻阳| 淮北市| 化德县| 克拉玛依市| 三都| 孝感市| 玉溪市| 麦盖提县| 呼伦贝尔市| 广元市| 临江市| 永康市| 鸡东县| 班玛县| 永寿县| 彝良县| 中方县| 汝州市| 龙岩市| 清徐县| 斗六市| 施甸县| 利辛县| SHOW| 昌都县| 休宁县| 荃湾区| 日照市| 乌兰浩特市| 柳林县| 洪湖市| 鄯善县| 深泽县| 无为县| 年辖:市辖区| 盘山县| 朝阳县|