ruby on rails为什么这么红?
TRANSCRIPT
![Page 1: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/1.jpg)
Ruby on Rails为什么这么⽕火Nathan Cheng
![Page 2: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/2.jpg)
第⼀一印象
![Page 3: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/3.jpg)
=> 2016-04-20 14:50:00 +0800Time.now + 1.year + 1.month
=> ["A", "B", "C", "D", ... , "Z"]('A'..'Z').to_a
=> 10000001_000_000
=> {"a":1,"b":2}{a: 1, b: 2}.to_json
![Page 4: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/4.jpg)
甜Syntactic sugar
![Page 5: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/5.jpg)
• 谁在使⽤用Ruby on Rails
• 改装 vs 定制
• 优势和应⽤用
• 提问时间
![Page 6: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/6.jpg)
谁在使⽤用Ruby on Rails
![Page 7: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/7.jpg)
![Page 8: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/8.jpg)
开⼯工写代码2007年10⽉月19⽇日
![Page 9: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/9.jpg)
公开注册2008年4⽉月10⽇日
![Page 10: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/10.jpg)
![Page 11: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/11.jpg)
⼀一个⽉月后
![Page 12: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/12.jpg)
![Page 13: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/13.jpg)
![Page 14: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/14.jpg)
![Page 15: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/15.jpg)
![Page 16: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/16.jpg)
![Page 17: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/17.jpg)
• ⽀支付接⼝口 — active_merchant
• ⽂文件上传和储存 — s3_swf_upload
• 代码⾼高亮显⽰示 — albino
• APP服务器 — Unicorn
• 为⼿手机优化 — rack-mobile-detect
• 全⽂文搜索 — sunspot(Solr Ruby client)
![Page 18: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/18.jpg)
![Page 19: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/19.jpg)
![Page 20: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/20.jpg)
其实超简单
• 全⾯面监控性能数据
• 分表,分库,建⽴立索引
• ⼤大量的冗余数据
• 把⼀一切装进缓存
![Page 21: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/21.jpg)
精彩案例
![Page 22: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/22.jpg)
![Page 23: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/23.jpg)
![Page 24: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/24.jpg)
![Page 25: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/25.jpg)
![Page 26: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/26.jpg)
![Page 27: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/27.jpg)
![Page 28: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/28.jpg)
改装 VS 定制
![Page 29: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/29.jpg)
WordPress买来就能开, 然后⾛走上⾮非法改装的艰⾟辛之路
![Page 30: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/30.jpg)
或者
![Page 31: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/31.jpg)
Ruby零部件市场97,576种零件请随意挑选
![Page 32: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/32.jpg)
![Page 33: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/33.jpg)
# Gemfilesource 'https://rubygems.org'
gem 'rails', '~>4.2.0'
gem 'mysql'gem 'ruby-oci8' # ORACLEgem 'pg' # PostgresSQL
gem 'redis'gem 'dalli' # Memcachedgem 'searchkick' # Elasticsearchgem 'carrierwave
gem 'sass-rails'gem 'coffee-rails'gem 'uglifire'gem 'bootstrap-sass'gem 'jquery-ui-rails'gem 'angularjs-rails'
} 多数据库⽀支持
} 流⾏行服务整合
} 前端航⺟母战⽃斗序列
![Page 34: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/34.jpg)
![Page 35: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/35.jpg)
![Page 37: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/37.jpg)
– David Heinemeier Hansson
“Rails is omakase”
![Page 38: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/38.jpg)
![Page 39: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/39.jpg)
主厨菜单
![Page 40: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/40.jpg)
• 常⽤用的前端资源,⽐比如jQuery
• 内置的缓存机制
• 测试框架
• 后台任务
• 服务器集群⽀支持
![Page 41: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/41.jpg)
不要怂,就是改我⽐比DHH不知道⾼高到哪去了
![Page 42: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/42.jpg)
优势和应⽤用
![Page 43: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/43.jpg)
优势
• 开发速度快 - 可⽤用组件多
• 可维护性好 - 业务代码更加优雅可读
• 适应移动互联⺴⽹网时代 - 全栈式解决⽅方案
![Page 44: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/44.jpg)
应⽤用• 创业
• 持续交付
• 快速转型,试错成本低
• 创意验证
• Rails + Bootstrap 快速原型
• ⼩小⼯工具,⼩小应⽤用
![Page 45: Ruby on Rails为什么这么红?](https://reader031.vdocument.in/reader031/viewer/2022012310/55a676011a28ab473c8b48cf/html5/thumbnails/45.jpg)
提问时间