Ruby by Example: Concepts and Code (Paperback)

Kevin C. Baird

  • 出版商: No Starch Press
  • 出版日期: 2007-06-08
  • 定價: $1,050
  • 售價: 5.0$525
  • 語言: 英文
  • 頁數: 326
  • 裝訂: Paperback
  • ISBN: 1593271484
  • ISBN-13: 9781593271480
  • 相關分類: Ruby
  • 立即出貨(限量) (庫存=1)

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

商品描述

Description

There may be no better way to learn how to program than by dissecting real, representative examples written in your language of choice. Ruby by Example analyzes a series of Ruby scripts, examining how the code works, explaining the concepts it illustrates, and showing how to modify it to suit your needs. Baird's examples demonstrate key features of the language (such as inheritance, encapsulation, higher-order functions, and recursion), while simultaneously solving difficult problems (such as validating XML, creating a bilingual program, and creating command-line interfaces). Each chapter builds upon the previous, and each key concept is highlighted in the margin to make it easier for you to navigate the book.

You'll learn how to:

  • Use the interactive Ruby shell (irb) to learn key features of the language
  • Extend Ruby using RubyGems, the Ruby package manager
  • Create numerical utilities, as well as utilities that process and analyze HTML/XML
  • Implement purely functional and metaprogramming techniques to save time and effort
  • Optimize, profile, and test your code to make sure that it not only does its job, but does it well
  • Create web applications using Rails

Ruby is the fastest growing programming language today, and for good reason: Its elegant syntax and readable code make for prolific and happy programmers. But it can be difficult to understand and implement without a little help. Ruby by Example shows you how to take advantage of Ruby as you explore Ruby's fundamental concepts in action.

 

Table of Contents

Introduction: What is Ruby?
Chapter 1: Interactive Ruby and the Ruby Environment
Chapter 2: Amusements and Simple Utilities
Chapter 3: Programmer Utilities
Chapter 4: Text Manipulation
Chapter 5: Number Utilities
Chapter 6: Functionalism with Blocks and Procs
Chapter 7: Using, Optimizing, and Testing Functional Techniques
Chapter 8: HTML and XML Tools
Chapter 9: More Complex Utilities and Tricks Part I
Chapter 10: More Complex Utilities and Tricks Part II
Chapter 11: CGI and the Web
Chapter12: RubyGems and Rails Preparation
Chapter 13: A Simple Rails Project
Appendix: How Does Ruby Compare to Other Languages?
Index

商品描述(中文翻譯)

描述

學習程式設計的最佳方式之一,可能就是解剖使用你所選擇的程式語言撰寫的真實、具代表性的範例。《Ruby by Example》分析了一系列的Ruby腳本,檢視程式碼的運作方式,解釋所呈現的概念,並展示如何修改以符合你的需求。Baird的範例展示了語言的關鍵特性(例如繼承、封裝、高階函式和遞迴),同時解決了困難的問題(例如驗證XML、建立雙語程式和建立命令行介面)。每個章節都建立在前一章的基礎上,並在邊緣突顯每個關鍵概念,以便讓你更容易閱讀本書。

你將學習如何:
- 使用互動式Ruby shell(irb)來學習語言的關鍵特性
- 使用RubyGems(Ruby套件管理器)擴展Ruby
- 創建數值工具,以及處理和分析HTML/XML的工具
- 實現純函數和元程式設計技術,以節省時間和精力
- 優化、分析和測試你的程式碼,確保它不僅能正常運作,而且運作良好
- 使用Rails創建網頁應用程式

Ruby是當今增長最快的程式語言,原因很簡單:它優雅的語法和易讀的程式碼使程式設計師能夠更加高效和愉快地工作。但是,如果沒有一點幫助,理解和實現Ruby可能會有些困難。《Ruby by Example》將向你展示如何在實踐中利用Ruby,探索Ruby的基本概念。

目錄

- 引言:什麼是Ruby?
- 第1章:互動式Ruby和Ruby環境
- 第2章:娛樂和簡單工具
- 第3章:程式設計師工具
- 第4章:文字處理
- 第5章:數值工具
- 第6章:使用區塊和Proc的函數式編程
- 第7章:使用、優化和測試函數式技巧
- 第8章:HTML和XML工具
- 第9章:更複雜的工具和技巧第一部分
- 第10章:更複雜的工具和技巧第二部分
- 第11章:CGI和網頁
- 第12章:RubyGems和Rails準備
- 第13章:一個簡單的Rails項目
- 附錄:Ruby與其他語言的比較
- 索引