没有合适的资源?快使用搜索试试~ 我知道了~
首页《敏捷Web开发Rails实战》第四版:早期阅读体验
《敏捷Web开发Rails实战》第四版:早期阅读体验
需积分: 10 7 下载量 67 浏览量
更新于2024-07-21
收藏 8.78MB PDF 举报
"《敏捷Web开发与Rails(第4版)》(Agile Web Development with Rails, 4th edition)是一本专为Jared Rosoff准备的 Beta 版图书,由 Agile Publishing 发行,旨在为敏捷开发者提供最新、最前沿的技术指南。该书处于未完成阶段,作为早期发布的一部分,读者可以在正式出版前获取到部分内容,从而有机会提前几个月了解和学习。 本书的特点是实时更新,读者可以在 http://pragprog.com 的账户中下载最新的电子书版本。然而,需要注意的是,由于尚未经过全面的技术编辑、校对和排版处理,书中可能会存在错误,如拼写错误、标点符号问题、页面布局不合理、断句不准确以及格式上的瑕疵。这些可能会影响阅读体验,但作者保证,尽管存在这些问题,这本书的内容仍然有价值。 在使用这本书学习Rails开发时,请理解它并非最终成品,可能存在应用创建过程中可能出现的意想不到的错误或设计缺陷。不过,作者相信,即使在这样的状态下,读者也能从中获得宝贵的学习资源,并在反馈中帮助改进书籍质量,实现双赢。 《敏捷Web开发与Rails(第4版)》适合那些希望紧跟敏捷开发潮流、快速学习和实践Rails框架的开发者,但需做好面对临时性文本缺陷的心理准备。通过参与这个 Beta 项目,读者将有机会参与到软件开发的迭代过程中,提升自己的技能同时对书籍质量做出贡献。"
资源详情
资源推荐
Acknowledgements
You’d think that pr oducing a new edition of a book would be easy. After all,
you already have all the text. It’s just a tweak to some code here and a minor
wording change there, and you’re done. You’d think....
It’s difficult to tell exactly, but our impression is that creating each edition
of Agile Web Development with Rails took about as much effort as the first
edition. Rails is constantly evolving and, as it does, so has this book. Parts
of the Depot application were rewritten several times, and all of t he narrative
was updated. The emphasis on REST and the avoidance of features as they
become deprecated have repeatedly changed the structure of the book as what
was once hot became just lukewarm.
So, this book would not exist without a massive amount of help from the
Ruby and Rails communities. Each edition of this book has been r eleased as
a beta book: early versions wer e posted as PDFs, and people made comments
online. And comment they did: more than 1,200 suggestions and bug reports
were posted. The vast majority ended up being incorporated, making this book
immeasurably more useful than it would have been. Thank you all, both for
supporting the beta book program and for contributing so much valuable
feedback.
The Rails core team has been incredibly helpful, answering questions, check-
ing out code fragments, and fixing bugs. A big thank you to the following:
Scott Barron (htonl), Jamis Buck (minam), Thomas Fuchs (madrobby),
Jeremy Kemper (bitsweat), Yehuda Katz (wycats),
Michael Koziarski (nzkoz), Marcel Molina Jr, (noradio),
Rick Olson (technoweenie), Nicholas Seckar (Ulysses),
Sam Stephenson (sam), Tobias Lütke (xal), José Valim (josevalim), and
Florian Weber (csshsh)
We’d like to thank the folks who contributed the specialized chapters to the
book: Leon Breedt, Mike Clark, James Duncan Davidson, Justin Gehtland,
and Andreas Schwarz.
Prepared exclusively for Jared Rosoff
ACKNOWLEDGEMENTS 18
From Sam Ruby
This effort has turned out to be both harder and more rewarding than I would
have ever anticipated. It’s been harder in that Rails has changed so much and
there has been so much to learn (in terms of Rails 2.0, in terms of SQLite 3,
and also in terms of working with a different publisher, operating system, and
toolset). But I can’t begin to express how much I like the beta book program—
the readers who this book has attracted so far have been great, and their
comments, questions, and feedback have been most appreciated.
Sam Ruby
April 2010
rubys@intertwingly.net
From Dave Thomas
I keep promising myself that each book will be the last, if for no other reason
than each takes me away from my f amily for months at a time. Once again:
Juliet, Zachary, and Henry—thank you for everything.
Dave Thomas
November 2006
dave@pragprog.com
Report erratum
this copy is (B8.0 printing, September 9, 2010)
Prepared exclusively for Jared Rosoff
In this chapter, we’ll see
• What rails is,
• agile practices,
• who the book is for, and
• how to read the book.
Intr oduction
Ruby on Rails is a framework that makes it easier to develop, deploy, and
maintain web applications. During the months that followed its initial release,
Rails went from being an unknown toy to being a worldwide phenomenon and,
more import ant, it has become the framework of choice for the implementation
of a wide range of so-called Web 2.0 applications.
Why is that?
Rails Simply Feels Right
First, a large number o f developers were frustrated with the technologies they
were using to create web applications. It didn’t seem to matter whether they
were using Java, PHP, or .NET—there was a growing sense t hat their job was
just too damn hard. And then, suddenly, along came Rails, and Rails was
easier.
But easy on its own doesn’t cut it. We’re talking about professional developers
writing real-world websites. They wanted to feel that the applications they
were developing would stand the test of time—that they were designed and
implemented using modern, professional techniques. So, these developers dug
into Rails and discovered it wasn’t just a tool for hacking out sites.
For example, all Rails applications are implemented using the Model-View-
Controller (MVC) architecture. Java developers are used to frameworks such
as Tapestry and Struts, which are based on MVC. But Rails takes MVC further:
when you develop in Rails, you start with a working application, there’s a
place for each piece of code, and all the pieces of your application interact in a
standard way.
Professional programmers write tests. And again, Rails delivers. All Rails appli-
cations have testing support baked right in. As you add functionality to the
code, Rails automatically creates test stubs for t hat functionality. The frame-
work makes it easy to test applications, and as a result, Rails applications
tend to get tested.
Prepared exclusively for Jared Rosoff
RAILS SIMPLY FEELS RIGHT 20
Rails applications are written in Ruby, a modern, object-oriented scripting
language. Ruby is c oncise without being unintelligibly terse—you can express
ideas naturally and cleanly in Ruby code. This leads to pr ogra ms that are easy
to write and (just as important) are easy to read months later.
Rails takes Ruby to the limit, extending it in novel ways that make a pro-
grammer’s life easier. This makes our programs shorter and more readable.
It also allows us to perform tasks that would normally be done in external
configuration files inside the codebase instead. This makes it far easier to see
what’s happening. The following code defines the model class for a project.
Don’t worry about the details for now. Instead, just think about how much
information is being expressed in a few lines of code.
class Project < ActiveRecord::Base
belongs_to :portfolio
has_one :project_manager
has_many :milestones
has_many :deliverables, :through => :milestones
validates :name, :description, :presence =>
true
validates :non_disclosure_agreement, :acceptance => true
validates :short_name, :uniqueness => true
end
Two other philosophical underpinnings keep Rails code short and readable:
DRY and convention over configuration. DRY stands for don’t repeat yourself :
every piece of knowledge in a system should be expr essed in just one place.
Rails uses the power of Ruby to bring that to life. You’ll find very little duplica-
tion in a Rails application; you say what you need to say in one place—a place
often suggested by the conventions of the MVC architecture—and then move
on. For programmers used to other web frameworks, where a simple change
to the schema could involve them in half a dozen or more code changes, this
was a revelation.
Convention over configuration is crucial, too. It means that Rails has sensi-
ble defaults for just about every aspect of knitting together your application.
Follow the conventions, and you can write a Rails application using less code
than a ty pical Java web application uses in XML configuration. If you need to
override the conventions, Rails makes that easy, too.
Developers coming to Rails found something else, too. Rails isn’t playing catch-
up with the new de facto web standards; it’s helping define them. And Rails
makes it easy for developers to integrate features such as Ajax and RESTful
interfaces into their code, because support is built in. (And if you’re not famil-
iar with Ajax and REST interfaces, never fear—we’ll explain them later in the
book.)
Report erratum
this copy is (B8.0 printing, September 9, 2010)
Prepared exclusively for Jared Rosoff
剩余472页未读,继续阅读
deeebug
- 粉丝: 215
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- AirKiss技术详解:无线传递信息与智能家居连接
- Hibernate主键生成策略详解
- 操作系统实验:位示图法管理磁盘空闲空间
- JSON详解:数据交换的主流格式
- Win7安装Ubuntu双系统详细指南
- FPGA内部结构与工作原理探索
- 信用评分模型解析:WOE、IV与ROC
- 使用LVS+Keepalived构建高可用负载均衡集群
- 微信小程序驱动餐饮与服装业创新转型:便捷管理与低成本优势
- 机器学习入门指南:从基础到进阶
- 解决Win7 IIS配置错误500.22与0x80070032
- SQL-DFS:优化HDFS小文件存储的解决方案
- Hadoop、Hbase、Spark环境部署与主机配置详解
- Kisso:加密会话Cookie实现的单点登录SSO
- OpenCV读取与拼接多幅图像教程
- QT实战:轻松生成与解析JSON数据
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功