Programming Ruby

Dave Thomas, Chad Fowler, Andy Hunt

出版时间

2004-10-08

ISBN

9780974514055

评分

★★★★★
书籍介绍
Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer's Guide. Now in its Second Edition, author Dave Thomas has expanded the famous Pickaxe book with over 200 pages of new content, covering all the new and improved language features of Ruby 1.8 and standard library modules. The Pickaxe contains four major sections: An acclaimed tutorial on using Ruby. The definitive reference to the language. Complete documentation on all built-in classes, modules, and methods Complete descriptions of all 98 standard libraries. If you enjoyed the First Edition, you'll appreciate the new and expanded content, including: enhanced coverage of installation, packaging, documenting Ruby source code, threading and synchronization, and enhancing Ruby's capabilities using C-language extensions. Programming for the world-wide web is easy in Ruby, with new chapters on XML/RPC, SOAP, distributed Ruby, templating systems and other web services. There's even a new chapter on unit testing. This is the definitive reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including more than 250 significant changes since the First Edition). Coverage of other features has grown tremendously, including details on how to harness the sophisticated capabilities of irb, so you can dynamically examine and experiment with your running code. "Ruby is a wonderfully powerful and useful language, and whenever I'm working with it this book is at my side" --Martin Fowler, Chief Scientist, ThoughtWorks
AI导读
核心看点
  • Ruby权威参考书,涵盖1.8版本新特性
  • 含教程、语言参考及内置类完整文档
  • 深入讲解元编程与标准库模块用法
适合谁读
  • Ruby语言初学者及进阶开发者
  • 需要查阅API的Ruby程序员
  • 对动态面向对象编程感兴趣的读者
读前提醒
  • 书较厚重,建议作为工具书查阅
  • 不必通读,按需查找对应章节即可
  • 结合实例练习以加深语法理解
读者共识
  • 公认的Ruby入门与参考经典之作
  • 内容详尽但篇幅较长,阅读有压力
  • 适合边学边查,是案头必备手册

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "A subprocess changes an environment vari- able, and this change is inherited by a process that it then starts. However, the change is not visible to the original parent. (This just goes to prove that parents never really know what their children are doing.)"
  • "When you design a class, you decide what internal state it has and also decide how that state is to appear on the outside (to users of your class). The internal state is held in instance variables. The external state is exposed through methods we’re calling attributes. And the other actions your cla"
  • "Ruby gives you three levels of protection: • Public methods can be called by anyone—no access control is enforced. Methods are public by default (except for initialize, which is always private). • Protected methods can be invoked only by objects of the defining class and its sub- classes. Access is "
  • "Block: First, parameters to a block are now always local to a block, even if they have the same name as locals in the surrounding scope. (You’ll get a warning message if you run Ruby with the -w option.)"
  • "Second, you can now define block local variables by putting them after a semicolon in the block’s parameter list. So, in our sum-of-squares example, we should have indicated that the square variable was block-local by writing it as follows:"
  • "use braces for single-line blocks and do/end for multiline blocks."
  • "方法是通过向对象发送消息来唤起调用的。消息包含方法名称以及方法可能需要的参数。当对象接收到一条消息时,它在自己的类中查找相应的方法。如果找到了,该方法会被执行。"
  • ""protected"和"private"之间的区别很微妙,并且和其他大多数普通的面向对象语言都不同。如果方法是保护的,它可以被定义了该方法的类或其子类的实例所调用。如果方法是私有的,它只能在当前对象的上下文中被调用------不可能直接访问其他对象的私有方法,即便它与调用者都属同一个类的对象。"
用户评论
这个假期必须读完,已经拖了好久了
good read for ruby
一般,讲的清楚但不深入,适合做入门书
ruby真是挺好玩的,又好看。
非常好.
讲解顺序太奇葩...并不适应...但还是很全面的,毕竟bookshelf.
据说Ruby是最好的动态语言,甩第二名lisp好几条街;然而对于这本书而言,个人佩服作者水平,Ruby个中要点娓娓道来,然而这本书决然不是写给不会Ruby的人看的,或者说对未曾研究过动态编程语言的读者而言确实有点儿"柴"。
思路不够清晰,并不是特别适合有点基础的初学者。
学习ruby基础操作,通过此书可以很快对ruby on rails,上手开发简单的web应用。
Pragmatic Bookshelf的其他书籍查看全部

收藏