DOWNLOAD
.DOC .PPT
Table of Contents
- Introducing Ruby ................................................................................. 51
Ruby is a Scripting Language ..................................................51
Compiled Languages ...............................................................52
Scripting Languages .................................................................52
The Great Performance Debate .............................................. 52
Ruby is an Object Oriented Language ......................................53
Reading and Writing Ruby Code ……………………………………………56
The Interactive Ruby Shell (irb) ................................................. 57
Interacting with Ruby Objects .................................................... 58
Punctuation in Ruby .................................................................. 60
Object Oriented Programming in Ruby ....................................... 63
Classes and Objects .................................................................63
Object-level Functionality ......................................................... 64
Class-level Functionality ......................................................... 68
Inheritance .............................................................................70
Return Values ........................................................................... 71
Standard Output ........................................................................71
Ruby Core Classes ......................................................................... 72
Arrays ................................................................................... 73
Hashes ....................................................................................... 74
Strings ....................................................................................... 76
Numerics ................................................................................... 77
Symbols ..................................................................................... 78
nil .............................................................................................. 79
Three Environments ........................................................................... 89
Database Configuration ..................................................................... 91
The Database Configuration File…………. ............................................ 91
Creating the Databases…….. .............................................................. 93
The Model-view-controller Architecture............................................ 94
MVC in Theory……….. ......................................................................... 95
MVC the Rails Way ……….................................................................... 96
ActiveRecord (the Model)………. ......................................................... 97
The ActionPack Module………. .......................................................... 103
Code Generation .............................................................................. 107
ActionMailer .................................................................................... 109
Testing and Debugging ..................................................................... 109
Testing ..................................................................................... 109
Debugging ............................................................................... 110
A GUI Tool for MySQL.. .................................................................... 111
- Ruby on Rails CheetSheet .....................................................................89
- Conclusion .................................................................89
What is Ruby on Rails?
• database abstraction (ensuring that queries work regardless of whether the database is MySQL, Oracle, DB2, or something else)
• templating (reusing presentational code throughout the application)
• management of user sessions
• generation of “clean” URLs
A framework also defines the architecture of an application—something that can be useful for those of us who constantly fret over which file is best stored in which folder.
In a sense, a framework is an application that has been started for you—and a well-designed one at that. The structure, plus the code that takes care of the boring stuff, has already been written, and it’s up to us to finish it off!
1 comment:
Post a Comment