Top Banner
Working with Rails Web development that doesnt hurt! Skype: Caiwangqin July, 2007
31

Working With Rails

Nov 11, 2014

Download

Technology

Dali Wang

Guide to ruby and rails in Chinese by Caiwangqin
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Working With Rails

Working with Rails

Web development that doesn’t hurt!Skype: Caiwangqin

July, 2007

Page 2: Working With Rails

About Caiwangqin} 蔡望勤,湖北黄冈人。

} 1997年开始接触计算机,对计算机编程情有独钟。曾在广州为赛百威(Cyberway)、宝洁(P&G)工作,而后为国际知名企业做人力资源管理系统(HRMS),如伟创力(Flextronics)、安美特(AutoTec)、欧科(EuroTec)、东风汽车乘用车等,系统持续运行至今。

} 2005年底加入南京UUZone,开始专注于研究Ruby on Rails和Web2.0领域。

} 现任亚艺网媒科技有限公司技术总监。

Page 3: Working With Rails

Presentation Agenda} Real Word Rails} Brief overview of Ruby} Brief overview of Rails} Description of Rails framework} Demo} Questions and Answers} Ask questions at any time

Page 4: Working With Rails
Page 5: Working With Rails

Real World Rails

Page 6: Working With Rails

Real World Rails

Page 7: Working With Rails

Real World Rails

Page 8: Working With Rails

Real World Rails

Page 9: Working With Rails

Real World Rails

Page 10: Working With Rails

More Real World Rails

} http://happycodr.com/} Ruby on Rails Showcase

} http://railscn.memebot.com/demobox/popular.htm} Ruby on Rails in Chinese sites

} http://wiki.rubyonrails.org/rails/pages/RealWorldUsage} Real companies with real applications running Rails

Page 11: Working With Rails

What is Ruby?} Object-Oriented scripting language} Conceptual similarities to Smalltalk} Many system and text manipulation features like Perl} Emphasis on simplicity and design elegance

Page 12: Working With Rails

What is Ruby on Rails? Just a joke…

Page 13: Working With Rails

So, What is Rails?

Rails is a Framework, only a MVC Web Application Framework written in Ruby.Some constraints make it easier to create applications.} ActiveRecord API} ActionController API} Templating Engine} Scripts and lots of other stuff…

Page 14: Working With Rails

DRY-Don’t repeat yourself

} Plugins

Page 15: Working With Rails

Rails Directory Structure} Execute Rails my_app command} Directory:

} my_app/} app/ #view controller model 都存放在该目录中} components/ #存放一些可重用的组件} config/ #配置信息,数据库的连接参数} db/ #schema 信息} doc/ #自动生成文档} lib/ #共享的代码} log/ #} public/ #一些公共的web资源} Rakefile} script/ #很多的脚本} test/ #单元测试,功能测试等} vendor/ #第三方代码

Page 16: Working With Rails

How Rails Works

Page 17: Working With Rails
Page 18: Working With Rails

How Rails Works

Page 19: Working With Rails

Get Started} Install Ruby , RubyGemshttp://www.rubyonrails.org/down} Install Railsgem install rails --include-dependencies} Make Rails Applicationrails path/to/your/new/applicationcd path/to/your/new/applicationruby script/server} Visit Railshttp://127.0.0.1:3000

Page 20: Working With Rails

Demo} Start…

Page 21: Working With Rails

Deploy Rails} Webrick} Apache(lighttpd) + CGI} Apache+FastCGI} Lighttpd + FastCGI} Apache(lighttpd)+SCGI

Page 22: Working With Rails

Web 2.0 and Rails} Fast time-to-market} Tight integration with AJAX libraries} New emphasis on focused, interoperable applications} Less time coding infrastructure means more emphasis

on clean design and elegance in all aspects of the application

Page 23: Working With Rails

Why Ruby on Rails

Because it's fun!

} Programming should be a fun and creative experience.

Page 24: Working With Rails
Page 25: Working With Rails

Why not Ruby on Rails

} handle existing databases} huge application} developers without passion

Page 26: Working With Rails

Railser in china

Page 27: Working With Rails

Railser in china} 2006感动铁道中国十大杰出青年} Fikko

} 飞戈 首创中文最大的RoR论坛 Railscn, 原创Rails的作品有顶啊网, 易做网等 个人blog http://www.fikko.net/ 在上海, 经常因工作忙潜水,偶尔换气

} 道喜} cnruby gudao.luo at gmail 点com 其个人blog 道喜技术日记 包含丰富的内容, 各种工具的使用技巧, Rails框架技术讲座论坛, 讲解细致步骤清楚, 图文并茂, 也可以下载实例代码 http://www.hhtong.com/blog1/ 骆先生身在德国慕尼黑, 现在筹划中文Rails和Ruby的电子杂志

} 徐家涛} Apemanchen 北京人 dochance的站长, 组织多次Rails北京活动, 免费为Rails的爱好者学习者赠送他个人购买的dreamhost空间, 19人因此受惠, 现正计划更大规模的一日活动Hackathon http://www.dochance.com/

} 范凯} Robbin 在Java精英中独具慧眼的识宝者, 在程序员杂志和其影响的网站上介绍红宝石和铁道, 并付诸实践改造了原来的Java视野

, 实施了民主化的试验并不断推进技术影响力的进程, 打造blog和bbs与其它新元素的交流统一环境

} 透明} Jeff 熊节 gigix 最早也是Java名人向Ruby和Rails投橄榄枝的, 并编审了国内第一本Rails的翻译书, 敏捷开发的布道者, 推广

Rails的同时推广ThoughtWorks的产品和理念 与Apemanchen共同组织Beijing 爱好者的活动

Page 28: Working With Rails

Railser in china} 2006感动铁道中国十大杰出青年} 考拉

} 最早中文教程的作者,下载最大影响最大的“Ruby on Rails 实践“在各大网站都有下载, http://railscn.com/viewtopic.php?t=8 Railscn的下载量惊人,今年考拉工作室又推出原创的音乐评论乐道网 http://www.likenote.com/ http://koalant.javaeye.com

} Cookoo} Railscn 和 JavaEye两大R and R 社区的积极参与者,发表许多精华文章,这位在国际共产主义战士白求恩的故乡加拿大工作的上海籍青年,在本年度的程序员杂志上发表专文介绍Rails开发的工具和技巧,并建立了Gtalk的即时聊天群落,不仅两岸三地的汉语Rails和Ruby交流,世界各地中英文的爱好者都可以上去讨论技术及时解决问题,他还对财务和商业管理和猪宝宝感兴趣 chinaonrails at gmail即时讨论组上可以快速找到银昊,blog: cookoo.javaeye.com

} 松鼠} 柳靖东北大连人, 研究生在读, 写出以个人实践为内容的第一本原创RoR中文书 http://www.railscn.com/about1942.html 柳同学对待比较其它语言和框架及技术选型上非常平和豁达, 不希望过多的精力投入到论战当中

} Qiezi} 茄子代表快乐的笑口常开, 是热心帮助人的技术高手,不论问题有多难或者多简单,都不厌其烦地细致解答,而且对于连问题都没有问全的不完整性垃圾题也能谆谆诱导为之解惑 http://qiezi.javaeye.com/

} Caiwangqin} Jesse Cai 蔡望勤 Focus on web2.0, mashup类型的程序,酷不酷, Beast绑OpenId,Rails中文书写平台还有 ChinaonRails的Rforum论坛都是他的部署,他还是Railscn的技术版版主,上半年组织了周二9点的聚会活动 http://caiwangqin.com

Page 29: Working With Rails

Books

Page 30: Working With Rails

Questions?

Questions and Comments

Page 31: Working With Rails

In Conclusion…} Thank you} Resources} Rails has a large enthusiastic community at rubyonrails.org} Ruby on Rails Chinese community at chinaonrails.com} I blog regularly about Rails and web 2.0 topics at

http://www.caiwangqin.com} I love getting email…

[email protected]