没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
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币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 考研冲刺的实用经验与技巧.pptx
- golang语法和学习笔记
- YOLO 格式的带标签的口罩/不戴口罩的面部和人群图像
- 全国2000+个气象站点日尺度资料-【1961-2022年】-平均气温+最高气温+最低气温+降水
- 带有边界框的农作物和杂草检测数据 带有 YOLO 和 Pascal 标签的芝麻作物和不同杂草的农业数据
- 练习 JavaScript 的禅宗练习.zip
- 大学生Java二级课程考试
- Nvidia GeForce GT 1030-GeForce Game Ready For Win10&Win11(Win10&Win11 GeForce GT 1030显卡驱动)
- IEC61850仿真模拟器sim860
- 纯 Python Java 解析器和工具.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功