Enviar pesquisa
Carregar
Rails hello
•
1 gostou
•
672 visualizações
G
Gump Law
Seguir
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 12
Baixar agora
Baixar para ler offline
Recomendados
Ruby中的常量与rails中常量的加载
Ruby中的常量与rails中常量的加载
Yuan Cheung
Rails 初探
Rails 初探
满佳 林
移动的前端技术架构和性能优化
移动的前端技术架构和性能优化
fangdeng
Three20
Three20
Gump Law
R语言简介
R语言简介
Gump Law
7 deadlymistakes: seo guidelines
7 deadlymistakes: seo guidelines
Lynn Holley III
SEO, SEM & SMM Schedule sample
SEO, SEM & SMM Schedule sample
Lynn Holley III
我为何使用
我为何使用
Gump Law
Recomendados
Ruby中的常量与rails中常量的加载
Ruby中的常量与rails中常量的加载
Yuan Cheung
Rails 初探
Rails 初探
满佳 林
移动的前端技术架构和性能优化
移动的前端技术架构和性能优化
fangdeng
Three20
Three20
Gump Law
R语言简介
R语言简介
Gump Law
7 deadlymistakes: seo guidelines
7 deadlymistakes: seo guidelines
Lynn Holley III
SEO, SEM & SMM Schedule sample
SEO, SEM & SMM Schedule sample
Lynn Holley III
我为何使用
我为何使用
Gump Law
Location baseda rengine
Location baseda rengine
Gump Law
Guangzhou Techparty Pre show 20110917
Guangzhou Techparty Pre show 20110917
Gump Law
iOS开发常用库推荐之一@techparty
iOS开发常用库推荐之一@techparty
Gump Law
BI 商业智能简述
BI 商业智能简述
Gump Law
走马观花— Haskell Web 开发
走马观花— Haskell Web 开发
Gump Law
Marketing Automation Applications and Evaluation
Marketing Automation Applications and Evaluation
Lynn Holley III
Ruby基础培训
Ruby基础培训
xiaozhestrong
Android vs e pub
Android vs e pub
永昇 陳
Zh120226techparty jeff kit-ios-toolbox
Zh120226techparty jeff kit-ios-toolbox
Zoom Quiet
走上It之路
走上It之路
David Xie
May the source_be_with_you
May the source_be_with_you
Eddie Kao
Ruby Rails 老司機帶飛
Ruby Rails 老司機帶飛
Wen-Tien Chang
Rails ABC
Rails ABC
qtlove
Rails 3中路由
Rails 3中路由
Yuan Cheung
KISSY 1.3-released
KISSY 1.3-released
yiming he
Mais conteúdo relacionado
Destaque
Location baseda rengine
Location baseda rengine
Gump Law
Guangzhou Techparty Pre show 20110917
Guangzhou Techparty Pre show 20110917
Gump Law
iOS开发常用库推荐之一@techparty
iOS开发常用库推荐之一@techparty
Gump Law
BI 商业智能简述
BI 商业智能简述
Gump Law
走马观花— Haskell Web 开发
走马观花— Haskell Web 开发
Gump Law
Marketing Automation Applications and Evaluation
Marketing Automation Applications and Evaluation
Lynn Holley III
Destaque
(6)
Location baseda rengine
Location baseda rengine
Guangzhou Techparty Pre show 20110917
Guangzhou Techparty Pre show 20110917
iOS开发常用库推荐之一@techparty
iOS开发常用库推荐之一@techparty
BI 商业智能简述
BI 商业智能简述
走马观花— Haskell Web 开发
走马观花— Haskell Web 开发
Marketing Automation Applications and Evaluation
Marketing Automation Applications and Evaluation
Semelhante a Rails hello
Ruby基础培训
Ruby基础培训
xiaozhestrong
Android vs e pub
Android vs e pub
永昇 陳
Zh120226techparty jeff kit-ios-toolbox
Zh120226techparty jeff kit-ios-toolbox
Zoom Quiet
走上It之路
走上It之路
David Xie
May the source_be_with_you
May the source_be_with_you
Eddie Kao
Ruby Rails 老司機帶飛
Ruby Rails 老司機帶飛
Wen-Tien Chang
Rails ABC
Rails ABC
qtlove
Rails 3中路由
Rails 3中路由
Yuan Cheung
KISSY 1.3-released
KISSY 1.3-released
yiming he
Semelhante a Rails hello
(9)
Ruby基础培训
Ruby基础培训
Android vs e pub
Android vs e pub
Zh120226techparty jeff kit-ios-toolbox
Zh120226techparty jeff kit-ios-toolbox
走上It之路
走上It之路
May the source_be_with_you
May the source_be_with_you
Ruby Rails 老司機帶飛
Ruby Rails 老司機帶飛
Rails ABC
Rails ABC
Rails 3中路由
Rails 3中路由
KISSY 1.3-released
KISSY 1.3-released
Rails hello
1.
rails 初探 12年5月27日星期日
2.
about me
• 望帆(林满佳) • 微博:@天涯望帆 • emil:tywf91@gmail.com 12年5月27日星期日
3.
为什么使用rails
• 有太多理由让我用python的框架了 – 有python编程基础 – ruby 零基础 – 用django写过几个小网站 • 为什么使用ruby on rails – 方便简单 – 完全是兴趣驱动的 12年5月27日星期日
4.
一个月的rails学习历程
• 起初对ruby的元编程不是了解,走了不少弯 路,期间看了一下ruby元编程,跨入rails真 正学习之道 • 对rails两个设计原则的理解 – 惯例优于设定 – 不做重复的事 12年5月27日星期日
5.
惯例优于设定
• 在django每一个视图(对应rails的控制 器)你都得指定一个模版,最简单的如 下: 12年5月27日星期日
6.
惯例优于设定
• rails的简单实现 12年5月27日星期日
7.
不做重复的事情
• 从大的方面来说,这个体现在rails的插件体 系 • 从小的角度,这需要利用好rails提供的一些 模式,逐步优化,逐步抽象,把正确的代 码,放在正确的目录 • 比如,公共的一些类,或者模版放在lib目 录 12年5月27日星期日
8.
rails 小玩具
• rails new teachpary • 修改Gemfile • bundle install • rails generate scaffold person name:string • rake db:migrate • rails generate controller raffle 12年5月27日星期日
9.
rails 小玩具
• vim config/routes.rb • 添加 • resources :raffle, :only => ['show'] • vim app/controllers/raffle_controller.rb 12年5月27日星期日
10.
rails 小玩具
• 新建app/views/raffle/show.html.erb • rake routes • rails server • http://0.0.0.0:3000/people • http://0.0.0.0:3000/raffle/{1,2,3,...} 12年5月27日星期日
11.
参考资料
• http://guides.rubyonrails.org/index.html • http://ihower.tw/rails3/ 12年5月27日星期日
12.
谢谢观赏 12年5月27日星期日
Baixar agora