触摸艺术和时尚的音弦 ---- happydog's art secret garden ~~~

RubyOnRails笔记一

上一篇 / 下一篇  2008-04-13 21:05:37

MVC Pattern
 model, view, controller
 数据   界面   控制器 控制动作

MVC Cycle
1 用户通过界面激发一个事件
2 控制器接收从界面来的数据
3 控制器操作model,更新model
4 控制器调用view来显示更新过的界面
5 界面继续等待用户的交互

Rails for MVC
 ActiveRecord
 ActionView
 ActionController

Install
 MySQL
  http://dev.mysql.com/downloads/mysql/5.0.html

 Ruby & RubyGems

http://rubyforge.org/projects/rubyinstaller
http://rubyforge.org/frs/download.php/12751/ruby185-21.exe

 装完后命令行
 ruby --version

 Rails
 
 命令行里面
 gem install rails --include-dependencies
 主要要连接网络,关闭防火墙限制
 http://rubyforge.org/project/rubygems

 装完后命令行
 rails --version

 运行本地测试服务器
 ruby script/server
 
 http://localhost:3000/
 
 附录:
国内的

http://www.javaeye.com/forums/board/Ruby
http://chinaonrails.com
http://www.railscn.com
http://railscn.crispynews.com/ 
http://r4rclub.schtuff.com/
http://rorwiki.hellopen.net

国外的
http://www.ruby-forum.com/
http://www.rubyonrailsforum.com/rails-code-questions/
http://rubyforge.org/
http://www.rubyonrails.org/
http://www.ruby-lang.org/en/
http://www.webrick.org/
http://www.yaml.org/

blog

<博客>
铁道播客:有诸多视频教程
http://rorcast.blogger2blogger.com/

my4java的文字博客:有很多教程的译稿、笔记等
http://my4java.itpub.net/

cnruby道喜技术日记:众多实例教程
http://www.hhtong.com/blog1/

caphe的博客
http://www.blogjava.net/cap

Caiwangqin的博客
http://www.uuzone.com/blog/uu_1115110/

中文RubyOnRailsWiki
http://rorwiki.hellopen.net/index.php?title=%E9%A6%96%E9%A1%B5

关于rails和ajax相结合
http://www.rubynoob.com/

http://inquirylabs.com/blog/

这个当中有一些介绍
http://www.railscn.com/about704.html


TAG:

溶月居 引用 刪除 wel3kxial   /   2008-04-14 11:49:48
Helloruby程序

记事本建一个 helloruby.rb
内容:
puts "hello, Ruby!"

然后在命令行运行之:
ruby helloruby.rb
 

評分:0

我來說兩句

顯示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar