Design Patterns in Ruby (Hardcover)

Russ Olsen

  • 出版商: Addison Wesley
  • 出版日期: 2007-12-01
  • 售價: $2,230
  • 貴賓價: 9.5$2,119
  • 語言: 英文
  • 頁數: 384
  • 裝訂: Hardcover
  • ISBN: 0321490452
  • ISBN-13: 9780321490452
  • 相關分類: RubyDesign Pattern
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Praise for Design Patterns in Ruby

"Design Patterns in Ruby documents smart ways to resolve many problems that Ruby developers commonly encounter. Russ Olsen has done a great job of selecting classic patterns and augmenting these with newer patterns that have special relevance for Ruby. He clearly explains each idea, making a wealth of experience available to Ruby developers for their own daily work."

—Steve Metsker, Managing Consultant with Dominion Digital, Inc.

"This book provides a great demonstration of the key 'Gang of Four' design patterns without resorting to overly technical explanations. Written in a precise, yet almost informal style, this book covers enough ground that even those without prior exposure to design patterns will soon feel confident applying them using Ruby. Olsen has done a great job to make a book about a classically 'dry' subject into such an engaging and even occasionally humorous read."

—Peter Cooper

"This book renewed my interest in understanding patterns after a decade of good intentions. Russ picked the most useful patterns for Ruby and introduced them in a straightforward and logical manner, going beyond the GoF's patterns. This book has improved my use of Ruby, and encouraged me to blow off the dust covering the GoF book."

—Mike Stok

"Design Patterns in Ruby is a great way for programmers from statically typed objectoriented languages to learn how design patterns appear in a more dynamic, flexible language like Ruby."

—Rob Sanheim, Ruby Ninja, Relevance

Most design pattern books are based on C++ and Java. But Ruby is different—and the language's unique qualities make design patterns easier to implement and use. In this book, Russ Olsen demonstrates how to combine Ruby's power and elegance with patterns, and write more sophisticated, effective software with far fewer lines of code.

After reviewing the history, concepts, and goals of design patterns, Olsen offers a quick tour of the Ruby language—enough to allow any experienced software developer to immediately utilize patterns with Ruby. The book especially calls attention to Ruby features that simplify the use of patterns, including dynamic typing, code closures, and "mixins" for easier code reuse.

Fourteen of the classic "Gang of Four" patterns are considered from the Ruby point of view, explaining what problems each pattern solves, discussing whether traditional implementations make sense in the Ruby environment, and introducing Ruby-specific improvements. You'll discover opportunities to implement patterns in just one or two lines of code, instead of the endlessly repeated boilerplate that conventional languages often require.

Design Patterns in Ruby also identifies innovative new patterns that have emerged from the Ruby community. These include ways to create custom objects with metaprogramming, as well as the ambitious Rails-based "Convention Over Configuration" pattern, designed to help integrate entire applications and frameworks.

Engaging, practical, and accessible, Design Patterns in Ruby will help you build better software while making your Ruby programming experience more rewarding.

商品描述(中文翻譯)

《Ruby 設計模式》讚譽

「《Ruby 設計模式》記錄了解決 Ruby 開發者常遇到的許多問題的聰明方法。Russ Olsen 在選擇經典模式的同時,還增加了一些對 Ruby 特別相關的新模式。他清楚地解釋了每個想法,使得 Ruby 開發者能夠在日常工作中受益於豐富的經驗。」
- Steve Metsker, Dominion Digital 公司的管理顧問

「這本書以精確但又近乎非正式的風格,提供了關於『四人幫』設計模式的很好示範,而不需要過度技術性的解釋。這本書涵蓋了足夠的範圍,即使是沒有接觸過設計模式的人,也很快就能夠自信地應用它們在 Ruby 中。Olsen 在將一個經典但通常乏味的主題變成如此引人入勝甚至偶爾幽默的閱讀材料方面做得很好。」
- Peter Cooper

「這本書讓我重新對理解設計模式產生了興趣,這是十年來一直有好意圖但未能實現的事情。Russ 選擇了對 Ruby 最有用的模式,並以直接而邏輯的方式介紹它們,超越了『四人幫』的模式。這本書提高了我對 Ruby 的使用能力,並鼓勵我拂去覆蓋在『四人幫』書籍上的灰塵。」
- Mike Stok

「《Ruby 設計模式》是從靜態類型的面向對象語言轉向更動態、靈活的 Ruby 語言的程式設計師學習設計模式的好方法。」
- Rob Sanheim, Relevance 公司的 Ruby 忍者

大多數設計模式的書籍都是以 C++ 和 Java 為基礎。但 Ruby 是不同的,這個語言的獨特特性使得設計模式更容易實現和使用。在這本書中,Russ Olsen 展示了如何將 Ruby 的強大和優雅與設計模式結合,用更少的代碼寫出更複雜、更有效的軟體。

在回顧設計模式的歷史、概念和目標之後,Olsen 快速介紹了 Ruby 語言,足以讓任何有經驗的軟體開發者立即使用 Ruby 實現設計模式。這本書特別關注簡化使用模式的 Ruby 特性,包括動態類型、程式碼閉包和「混入」以便更容易地重用程式碼。

從 Ruby 的角度考慮了「四人幫」的十四個經典模式,解釋了每個模式解決的問題,討論了傳統實現在 Ruby 環境中是否合理,並介紹了 Ruby 特定的改進。你將發現只需一兩行代碼就能實現模式,而不是傳統語言常常需要無休止重複的樣板代碼。

《Ruby 設計模式》還介紹了從 Ruby 社區中出現的創新模式,包括使用元程式設計創建自定義對象,以及針對整個應用程序和框架集成的 Rails-based「慣例優於配置」模式。

這本引人入勝、實用且易於理解的《Ruby 設計模式》將幫助你構建更好的軟體,同時使你的 Ruby 編程體驗更加豐富。