Beginning Ruby on Rails
暫譯: Ruby on Rails 入門
Steve Holzner
- 出版商: Wrox Press
- 出版日期: 2006-11-29
- 售價: $1,620
- 貴賓價: 9.5 折 $1,539
- 語言: 英文
- 頁數: 408
- 裝訂: Paperback
- ISBN: 0470069155
- ISBN-13: 9780470069158
-
相關分類:
Ruby
海外代購書籍(需單獨結帳)
買這商品的人也買了...
-
$2,220$2,109 -
$882Object-Oriented Design & Patterns (美國版047131966X)
-
$720$562 -
$1,740$1,653 -
$1,770$1,682 -
$880$695 -
$780$663 -
$680$537 -
$580$458 -
$980$774 -
$1,064An Introduction to XML And Web Technologies (Paperback)
-
$880$695 -
$520$406 -
$480$379 -
$720$569 -
$2,560$2,432 -
$680$578 -
$1,200$948 -
$580$458 -
$149$118 -
$1,620$1,539 -
$880$695 -
$990$891 -
$290$226 -
$600$480
商品描述
Description
Ruby on Rails is the revolutionary online programming tool that makes creating functional e-commerce web sites faster and easier than ever. With the intuitive, straightforward nature of Ruby and the development platform provided by Rails, you can put together full-fledged web applications quickly, even if you're new to web programming.You will find a thorough introduction to both Ruby and Rails in this book. You'll get the easy instructions for acquiring and installing both; understand the nature of conditionals, loops, methods, and blocks; and become familiar with Ruby's classes and objects. You'll learn to build Rails applications, connect to databases, perform necessary testing, and put the whole thing together to create real-world applications such as shopping carts and online catalogs—apps you can actually use right away.
What you will learn from this book
- How to install and use Ruby and Rails
- Object-oriented programming with Ruby
- Rails fundamentals and how to create basic online applications
- How to work with HTML controls, use models in Rails applications, and work with sessions
- Details on working with databases and creating, editing, and deleting database records
- Methods for handling cookies and filters and for caching pages
- How to connect Rails with Ajax
Who this book is for
This book is for anyone who wants to develop online applications using Ruby and Rails. A basic understanding of programming is helpful; some knowledge of HTML is necessary.
Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.
Table of Contents
Acknowledgments.Introduction.
Chapter 1: Welcome to Ruby.
Creating a First Web Application.
Getting Started with Ruby.
Checking the Ruby Documentation.
Working with Numbers in Ruby.
Working with Strings in Ruby.
Storing Data in Variables.
Creating Constants.
Interpolating Variables in Double-Quoted Strings.
Reading Text on the Command Line.
Creating Symbols in Ruby.
Working with Operators.
Handling Operator Precedence.
Working with Arrays.
Using Two Array Indices.
Working with Hashes.
Working with Ranges.
Chapter 2: Conditionals, Loops, Methods, and Blocks.
It’s All about Making Choices: the if Statement.
Using the case Statement.
Using Loops.
Creating and Calling a Method.
Making Use of Scope.
Working with Blocks.
Chapter 3: Classes and Objects.
All about Encapsulation.
Creating a Class.
Creating an Object.
Basing One Class on Another.
Understanding Ruby’s Object Access.
Overriding Methods.
Creating Class Variables.
Creating Class Methods.
Creating Modules.
Creating Mixins.
Chapter 4: Welcome to Rails.
Putting Ruby on Rails.
Introducing Model-View-Controller Architecture.
Giving the View Something to Do.
Mixing Ruby Code and HTML Inside the View.
Passing Data from an Action to a View.
Escaping Sensitive Text.
Adding a Second Action.
Chapter 5: Building Simple Rails Applications.
Accessing Data the User Provides.
Using Rails Shortcuts for HTML Controls.
Working with Models.
Tying Controls to Models.
Initializing Data in Controls.
Storing Data in Sessions.
Chapter 6: Connecting to Databases.
Tutorial on Databases.
Creating a Data-Aware Rails Application.
Creating the Database.
Running the store Application.
Adding Another Record.
Beautifying the Display.
Chapter 7: Working with Databases.
Displaying Items to the Customer.
Creating a Shopping Cart.
Combining Purchases in the Cart.
Clearing the Cart.
Letting the User View the Cart Anytime.
Chapter 8: Validating and Testing.
Validating the Presence of Data.
Validating if Data Is Numeric.
Validating if Data Is Unique.
Creating the Validator Application.
Writing Your Own Validate Method.
Testing Your Model.
Testing Your Controller.
Chapter 9: Controlling the Action with the Action Controller.
Routing Refinements.
Creating Cookies.
Creating a Filter.
Logging in with Filters.
Using After Filters.
Rendering Text Directly.
Caching.
Chapter 10: Getting the Big Picture with Views.
Creating XML.
Creating XML Attributes.
Using View Helpers.
Using View Pagination.
Using Partial Templates.
Passing Data to Partial Templates.
Chapter 11: Ajax and Rails.
Using Ajax.
Getting Access to Ajax Data.
Using XML and Ajax.
Using HTML Controls and Ajax.
Performing Ajax Searches.
Performing Visual Effects.
Appendix A: Answers to Exercises.
Index.
商品描述(中文翻譯)
**描述**
Ruby on Rails 是一個革命性的線上程式設計工具,使得創建功能性電子商務網站比以往任何時候都更快、更簡單。憑藉 Ruby 的直觀和簡單特性以及 Rails 提供的開發平台,即使你是網頁程式設計的新手,也能快速組建完整的網頁應用程式。
你將在本書中找到對 Ruby 和 Rails 的全面介紹。你將獲得安裝和使用這兩者的簡易指導;了解條件語句、迴圈、方法和區塊的本質;並熟悉 Ruby 的類別和物件。你將學會構建 Rails 應用程式、連接數據庫、執行必要的測試,並將整個過程整合起來,創建如購物車和線上目錄等實際應用程式——這些應用程式你可以立即使用。
**你將從本書中學到什麼**
- 如何安裝和使用 Ruby 和 Rails
- 使用 Ruby 進行物件導向程式設計
- Rails 基礎知識以及如何創建基本的線上應用程式
- 如何使用 HTML 控制項、在 Rails 應用程式中使用模型以及處理會話
- 有關數據庫操作的詳細資訊,包括創建、編輯和刪除數據庫記錄
- 處理 cookies 和過濾器以及快取頁面的方法
- 如何將 Rails 與 Ajax 連接
**本書適合誰**
本書適合任何想要使用 Ruby 和 Rails 開發線上應用程式的人。對程式設計有基本了解會有所幫助;對 HTML 有一些認識是必要的。
**Wrox 開始指南**旨在使學習程式語言和技術比你想像的更容易,提供結構化的教程格式,指導你掌握所有相關技術。
**目錄**
致謝。
介紹。
**第 1 章:歡迎來到 Ruby。**
創建第一個網頁應用程式。
開始使用 Ruby。
檢查 Ruby 文檔。
在 Ruby 中處理數字。
在 Ruby 中處理字串。
將數據存儲在變數中。
創建常數。
在雙引號字串中插入變數。
在命令行中讀取文本。
在 Ruby 中創建符號。
使用運算子。
處理運算子優先順序。
使用陣列。
使用兩個陣列索引。
使用雜湊。
使用範圍。
**第 2 章:條件語句、迴圈、方法和區塊。**
一切都關於做選擇:if 語句。
使用 case 語句。
使用迴圈。
創建和調用方法。
利用作用域。
使用區塊。
**第 3 章:類別和物件。**
關於封裝的一切。
創建類別。
創建物件。
基於另一個類別創建類別。
理解 Ruby 的物件訪問。
覆寫方法。
創建類別變數。
創建類別方法。
創建模組。
創建混入。
**第 4 章:歡迎來到 Rails。**
將 Ruby 應用於 Rails。
介紹模型-視圖-控制器架構。
讓視圖有事情可做。
在視圖中混合 Ruby 代碼和 HTML。
將數據從動作傳遞到視圖。
轉義敏感文本。
添加第二個動作。
**第 5 章:構建簡單的 Rails 應用程式。**
訪問用戶提供的數據。
使用 Rails 快捷方式處理 HTML 控制項。
使用模型。
將控制項與模型綁定。
在控制項中初始化數據。
將數據存儲在會話中。
**第 6 章:連接到數據庫。**
數據庫教程。
創建一個數據感知的 Rails 應用程式。
創建數據庫。
運行商店應用程式。
添加另一條記錄。
美化顯示。
**第 7 章:使用數據庫。**
向客戶顯示項目。
創建購物車。
在購物車中合併購買。
清空購物車。
讓用戶隨時查看購物車。
**第 8 章:驗證和測試。**
驗證數據的存在。
驗證數據是否為數字。
驗證數據是否唯一。
創建驗證器應用程式。
編寫自己的驗證方法。
測試你的模型。
測試你的控制器。
**第 9 章:使用動作控制器控制動作。**
路由精煉。
創建 cookies。
創建過濾器。
使用過濾器登錄。
使用後過濾器。
直接渲染文本。
快取。
**第 10 章:通過視圖獲得全局視野。**
創建 XML。
創建 XML 屬性。
使用視圖輔助工具。
使用視圖分頁。
使用部分模板。
將數據傳遞給部分模板。
**第 11 章:Ajax 和 Rails。**
使用 Ajax。
獲取 Ajax 數據的訪問權限。
使用 XML 和 Ajax。
使用 HTML 控制項和 Ajax。
執行 Ajax 搜索。
執行視覺效果。
**附錄 A:練習答案。**
索引。