Год выпуска: 2008
Автор: Derek DeVries, Mike Naberezny
Издательство: The Pragmatic Bookshelf
ISBN-10: 1-934356-04-2
ISBN-13: 978-1-9343560-4-3
Формат: PDF
Количество страниц: 409
Язык: Английский
Размер: 12,5 МБ
Описание:
Rails defines the directory structure of your application for you and
sets a series of conventions for naming files, classes, and database
tables. It takes advantage of these conventions to tie together your
application without a lot of configuration. You may initially be
resistant to the idea of Rails telling you how to structure your
application, but your first Rails application will quickly demonstrate
the efficiency that these conventions offer you. By choosing smart
defaults, Rails allows you to focus on the functionality of your
application instead of on the skeleton. Rails developers tend to be
almost religious about the DRY principle. Functionality is written
cleanly once, and only once. Rails provides an environment that makes it
easy to consolidate shared code between different components of your
application. Rails gives first-class importance to testing. Writing code
is always done in parallel with tests to ensure the code works as
intended and will continue to work when things around it change. In PHP,
the uptake of testing culture has been slow, and the methodologies for
testing entire applications are not clear. Ruby’s dynamic and flexible
object model, along with its standard library, makes unit testing easy.
The Rails stack builds on this to provide clear, built-in support for
testing all parts of a web application from the first line of code.