The Ruby Way: Solutions and Techniques in Ruby Programming, 2/e (Paperback)
暫譯: Ruby之道:Ruby程式設計的解決方案與技術,第二版(平裝本)

Hal Fulton

  • 出版商: Addison Wesley
  • 出版日期: 2006-11-04
  • 定價: $1,500
  • 售價: 2.7$399
  • 語言: 英文
  • 頁數: 888
  • 裝訂: Paperback
  • ISBN: 0672328844
  • ISBN-13: 9780672328848
  • 相關分類: Ruby
  • 立即出貨(限量) (庫存=1)

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

相關主題

商品描述

Description  

Ruby is an agile object-oriented language, borrowing some of the best features from LISP, Smalltalk, Perl, CLU, and other languages. Its popularity has grown tremendously in the five years since the first edition of this book.

 

The Ruby Way takes a “how-to” approach to Ruby programming with the bulk of the material consisting of more than 400 examples arranged by topic. Each example answers the question “How do I do this in Ruby?” Working along with the author, you are presented with the task description and a discussion of the technical constraints. This is followed by a step-by-step presentation of one good solution. Along the way, the author provides detailed commentary and explanations to aid your understanding.

 

Coverage includes

 

•    An overview of Ruby, explaining terminology and basic principles

•    Operations on low-level data types (numbers, strings, regular expressions, dates)

•    The new regular expression engine (Oniguruma)

•    Internationalization (I18N) and message catalogs in Ruby

•    Operations on hashes, arrays, and other data structures such as stacks, trees, and graphs

•    Working with general I/O, files, and persistent objects

•    Database coverage including MySQL, SQLite, Oracle, DBI, and more

•    Ruby-specific techniques in OOP and dynamic programming

•    Graphical interfaces in Ruby (Tk, GTK+, Fox, and Qt)

•    Working with Ruby threads for lightweight multitasking

•    Everyday scripting and system administration in Ruby

•    Working with image files, PDFs, YAML, XML, RSS, and Atom

•    Testing, debugging, profiling, and packaging Ruby code

•    Low-level network programming and client-server interaction

•    Web development tools including Rails, Nitro, Wee, IOWA, and more

•    Working with distributed Ruby, Rinda, and Ring

•    Ruby development tools such as IDEs, documentation tools, and more

 

The source code for the book can be downloaded from www.rubyhacker.com

 

 

Hal Fulton has worked for over 15 years with variousforms of Unix, including AIX, Solaris, and Linux. He was first exposed to Ruby in 1999, and in 2001 he began work on the first edition of this book–the second Ruby book published in the English language. He has attendednumerous Ruby conferences and has given presentations at several of those, including the first European Ruby Conference. 

 

He has two degrees in computer science from the University of Mississippi and taught computer science for four years before moving to Austin, Texas to work as a contractor for variouscompanies, including IBM Austin.  Hal currently works at Broadwing Communications in Austin, Texas, maintaining a large data warehouse and related telecom applications, working daily with C++, Oracle, and, of course, Ruby.

 

 

 

Table of Contents

 

                             Foreword

                             Acknowledgments

                             About the Author

1   Ruby in Review

    1.1                    An Introduction to Object Orientation

        1.1.1             What Is an Object?

        1.1.2             Inheritance

        1.1.3             Polymorphism

        1.1.4             A Few More Terms

    1.2                    Basic Ruby Syntax and Semantics

        1.2.1             Keywords and Identifiers

        1.2.2             Comments and Embedded Documentation

        1.2.3             Constants, Variables, and Types

        1.2.4             Operators and Precedence

        1.2.5             A Sample Program

        1.2.6             Looping and Branching

        1.2.7             Exceptions

    1.3                    OOP in Ruby

        1.3.1             Objects

        1.3.2             Built-in Classes

        1.3.3             Modules and Mixins

        1.3.4             Creating Classes

        1.3.5             Methods and Attributes

    1.4                    Dynamic Aspects of Ruby

        1.4.1             Coding at Runtime

        1.4.2             Reflection

        1.4.3             Missing Methods

        1.4.4             Garbage Collection (GC)

    1.5                    Training Your Intuition: Things to Remember

        1.5.1             Syntax Issues

        1.5.2             Perspectives in Programming

        1.5.3             Ruby’s case Statement

        1.5.4             Rubyisms and Idioms

        1.5.5             Expression Orientation and Other Miscellaneous Issues

    1.6                    Ruby Jargon and Slang

    1.7                    Conclusion

2   Working with Strings

    2.1                    Representing Ordinary Strings

    2.2                    Representing Strings with Alternate Notations

    2.3                    Using Here-Documents

    2.4                    Finding the Length of a String

    2.5                    Processing a Line at a Time

    2.6                    Processing a Byte at a Time

    2.7                    Performing Specialized String Comparisons

    2.8                    Tokenizing a String

    2.9        

商品描述(中文翻譯)

**描述**

Ruby 是一種靈活的物件導向語言,借鑒了 LISP、Smalltalk、Perl、CLU 和其他語言的一些最佳特性。自本書第一版以來,Ruby 的受歡迎程度在五年內大幅增長。

《Ruby 的方式》採取了「如何做」的方式來進行 Ruby 程式設計,內容主要由超過 400 個按主題排列的範例組成。每個範例都回答了「我該如何在 Ruby 中做到這一點?」的問題。與作者一起工作時,您將獲得任務描述和技術限制的討論。接下來是一步一步展示一個良好解決方案的過程。在此過程中,作者提供詳細的評論和解釋,以幫助您理解。

涵蓋內容包括:

- Ruby 概述,解釋術語和基本原則
- 低級資料類型(數字、字串、正則表達式、日期)的操作
- 新的正則表達式引擎(Oniguruma)
- Ruby 中的國際化(I18N)和訊息目錄
- 對哈希、數組和其他資料結構(如堆疊、樹和圖形)的操作
- 一般 I/O、檔案和持久物件的操作
- 包括 MySQL、SQLite、Oracle、DBI 等的資料庫涵蓋
- Ruby 特有的 OOP 和動態程式設計技術
- Ruby 中的圖形介面(Tk、GTK+、Fox 和 Qt)
- 使用 Ruby 線程進行輕量級多任務處理
- Ruby 中的日常腳本和系統管理
- 處理圖像檔案、PDF、YAML、XML、RSS 和 Atom
- 測試、除錯、性能分析和打包 Ruby 代碼
- 低級網路程式設計和客戶端-伺服器互動
- 包括 Rails、Nitro、Wee、IOWA 等的網頁開發工具
- 使用分散式 Ruby、Rinda 和 Ring
- Ruby 開發工具,如 IDE、文檔工具等

本書的源代碼可以從 www.rubyhacker.com 下載。

Hal Fulton 在各種形式的 Unix(包括 AIX、Solaris 和 Linux)上工作了超過 15 年。他於 1999 年首次接觸 Ruby,並在 2001 年開始著手於本書的第一版——第二本用英語出版的 Ruby 書籍。他參加了許多 Ruby 會議,並在其中幾次會議上發表了演講,包括第一次歐洲 Ruby 會議。

他擁有密西西比大學的計算機科學雙學位,並在搬到德克薩斯州奧斯丁之前教授了四年的計算機科學,之後作為承包商為多家公司工作,包括 IBM 奧斯丁。Hal 目前在德克薩斯州奧斯丁的 Broadwing Communications 工作,維護大型資料倉庫和相關的電信應用,每天使用 C++、Oracle,當然還有 Ruby。

**目錄**

- 前言
- 致謝
- 關於作者
1. Ruby 概述
- 1.1 物件導向簡介
- 1.1.1 什麼是物件?
- 1.1.2 繼承
- 1.1.3 多型
- 1.1.4 更多術語
- 1.2 基本 Ruby 語法和語義
- 1.2.1 關鍵字和識別符
- 1.2.2 註解和嵌入文檔
- 1.2.3 常數、變數和類型
- 1.2.4 運算符和優先級
- 1.2.5 範例程式
- 1.2.6 迴圈和分支
- 1.2.7 異常
- 1.3 Ruby 中的 OOP
- 1.3.1 物件
- 1.3.2 內建類別
- 1.3.3 模組和混入
- 1.3.4 更多內容