没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
v
Contents at a Glance
About the Authors ������������������������������������������������������������������������������������������������������������� xvii
About the Technical Reviewer ������������������������������������������������������������������������������������������� xix
Introduction ����������������������������������������������������������������������������������������������������������������������� xxi
Chapter 1: Introducing the Rails Framework ■ ��������������������������������������������������������������������1
Chapter 2: Getting Started ■ �����������������������������������������������������������������������������������������������13
Chapter 3: Getting Something Running ■ ���������������������������������������������������������������������������27
Chapter 4: Introduction to the Ruby Language ■ ����������������������������������������������������������������45
Chapter 5: Working with a Database: Active Record ■ �������������������������������������������������������61
Chapter 6: Advanced Active Record: Enhancing Your Models ■ �����������������������������������������81
Chapter 7: Action Pack: Working with the View and the Controller ■ ������������������������������121
Chapter 8: Advanced Action Pack ■ ���������������������������������������������������������������������������������151
Chapter 9: JavaScript and CSS ■ ��������������������������������������������������������������������������������������191
Chapter 10: Sending and Receiving E-Mail ■ �������������������������������������������������������������������203
Chapter 11: Testing Your Application ■ ����������������������������������������������������������������������������219
Chapter 12: Internationalization ■ ������������������������������������������������������������������������������������251
Chapter 13: Deploying Your Rails Applications ■ �������������������������������������������������������������267
Appendix A: Databases 101 ■ �������������������������������������������������������������������������������������������273
Appendix B: The Rails Community ■ ���������������������������������������������������������������������������������281
Appendix C: Git ■ ��������������������������������������������������������������������������������������������������������������285
Index ���������������������������������������������������������������������������������������������������������������������������������297
www.it-ebooks.info
xxi
Introduction
What Is This Book About?
In the past several years, the Web has exploded to include information on every facet of our lives. It touches everything
we do; even some refrigerators have included access to the Internet. Ruby on Rails has played a part in fueling
that explosion. is book will equip you with the knowledge you need to build real production web applications.
It leads you through installing the required prerequisites on Windows, OS X, or Linux and then jumps straight into
building applications. It is meant for the novice programmer who has some command line experience but little or no
programming experience. At the end of the book, you should have a rm grasp on the Ruby language and the Rails
framework.
Chapter 1 introduces you to the current web landscape and then goes over some of the ideals and principles that
the Rails framework is built on. It teaches you about the MVC paradigm and shows how Rails implements each piece
of that paradigm (model, view, and controller).
Chapter 2 walks you through installing Ruby, Rails, and the SQLite database. It is broken down by operating
system, and when nished, will give a level platform among all three. You should be able to follow along with the book
no matter which platform you choose. It also will show you how to build a quick “Hello World” application to make
sure everything is working correctly.
Chapter 3 dives right in and starts the blog application that we’ll use throughout the rest of the book. We’ll
continually build on this application, enhancing and refactoring as we go along. You’ll create your rst model in this
chapter, the article model. We’ll cover how migrations work and even get Rails to construct our rst scaold. At the
end of this chapter, you’ll have a working blog application, although it will be lacking features. We’ll add those in the
following chapters.
Chapter 4 slows down a little bit from the previous chapter and takes you on a tour of the Ruby language. If you’ve
used Ruby for a while and feel comfortable with it, feel free to skim over this. If you’re new to Ruby, this chapter will
teach you everything you need to know to use Rails. Ruby is an easy to pick up language, and the syntax is very inviting
and easy to read. Although we won’t add any code to our blog application here, you will get to use the Ruby language
inside the Ruby console.
Chapter 5 shows you how Rails uses Active Record to let you interact with any number of databases. Rails
abstracts away the dicult bits (unless you need them) and lets you interact with databases in an object-oriented way.
You’ll learn how to create new records, nd records, and even update and delete them. We’ll also apply some basic
validations so we can be sure our data are just the way they should be.
Chapter 6 expounds on the previous chapter. You’ll dive deeper into Active Record and your models. You will
build more complex validations and custom instance methods. A major component of this chapter is the relation
between your models and how Rails lets you dene those relations. Your models for the blog application will have
complex relations and validations.
In Chapter 7 we’ll cover the view and controller parts of MVC. We will esh out the blog application and walk
through the code that Rails generated for the scaold of our controllers and views.
Chapter 8 modies the controller and views in more advanced ways, and at this point the features of our blog
application have come together. You’ll learn about controller callbacks and strong parameters that were added in
Rails 4. We’ll also give our application a fresh coat of paint with some Cascading Style Sheets (CSS).
www.it-ebooks.info
■ IntroduCtIon
xxii
Chapter 9 goes over the Asset Pipeline that was added in Rails 3.2 and how to add JavaScript and CSS. We’ll
enhance our application with JavaScript dabbling in Ajax and animation. is chapter covers CoeeScript and SASS
and how they integrate into the Rails landscape. At the end of this chapter, your application will have a nice layer of
spit and polish.
Chapter 10 adds e-mail capability to our application. You will be able to suggest articles to friends and even be
notied when your article has new comments. It will also discuss methods to receive e-mail into your application.
Chapter 11 covers one of the most important topics in Rails applications: testing. You can be sure that after this
chapter you’ll be able to add new features without breaking old ones. You’ll test whether your application behaves
exactly the way you think it should.
Chapter 12 covers internationalization. After all, it is the World Wide Web, and not everyone speaks the same
language. We’ll translate our web application into another language, and along the way you’ll learn how to translate
the application into as many languages as you like.
Chapter 13 will show you how to deploy your web application to Heroku, one of the leading Platform As A Service
(PAAS) providers. is will allow you to present your application to the world quickly and easily so you can start
building a user base.
e three appendices cover the Git version control system, SQL, and where to nd help in the Rails community.
www.it-ebooks.info
剩余313页未读,继续阅读
资源评论
- wyyxuejian2015-06-08全是英文,看起来比较吃力,但还是感谢分享
- accli2015-07-22书是好书,如果能去掉里面插入的广告就更好了
卜头儿
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 利用Python绘制带装饰物的圣诞树代码实现
- 计算机网络基础:从FTP到HTTP的网络协议详解
- 纸管音圈绕线机工程图机械结构设计图纸和bom和其它技术资料和技术方案非常好100%好用.zip
- 自动线圈导通测试机工程图机械结构设计图纸和其它技术资料和技术方案非常好100%好用.zip
- SOME IP协议规范文档
- TIA博途Wincc下载时提示缺少面板映像的解决办法(无需安装更新包).docx
- 自动贴标撕膜检测机工程图机械结构设计图纸和其它技术资料和技术方案非常好100%好用.zip
- Image Style Transfer Using Convolutional Neural Networks解析与复现
- TIA博途V17 -面板映像文件-UPD7-单独映像-链接地址.txt
- 4YQ690级埋弧焊焊接材料国内外对比试验 - .pdf
- 05超大直径焊接空心球类节点分析与设计.pdf
- 05高频焊接轻型H型钢在建筑工程中的应用.pdf
- 5A02铝合金与镀锌钢熔钎焊接头研究 - .pdf
- 5A04 LF4铝镁合金空气分馏塔的现场焊接技术.PDF
- 5A06铝合金薄板VPPA焊接工艺研究 - .pdf
- 5万m^3LNG储罐9Ni钢的焊接和质量控制.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功