logo

 

     
 
Home
Site Map
Search
 
:: Bitwise Courses ::
 
Bitwise Dusty Archives
 
 
 

rss

 
 

ruby in steel

learn aikido in north devon

Learn Aikido in North Devon

 


Section :: books

- Format For Printing...

Ruby For Rails

Wednesday 28 June 2006.
 

Ruby For Rails
Manning : www.manning.com/black
ISBN 1-932394-69-9
$44.95 / £31.99 (or $22.50 PDF ebook)

If you frequent Ruby programming forums and newsgroups as much as I do, you will no doubt have read many posts from newcomers wanting to know if they need to learn Ruby in order to use Rails. It’s true that the Rails framework makes it easy to create basic web applications without writing much, if any, code. However, if you really want to master Rails development, there is no escaping the fact that you must be able to program Ruby. Fundamentally, learning Rails without Ruby makes as much sense as learning .NET without a .NET language.

David A. Black’s book, Ruby For Rails aims to bridge that gap. While the book concentrates on Rails development, at every step of the way it delves into the inner workings of the underlying Ruby code. In seventeen chapters and just under 500 pages, it takes you from a first look at the Ruby language through to the specifics of creating Rails models, controllers, views, helpers and templates. Along the way it explains a great deal about Ruby including its arrays and hashes, classes, methods, blocks and iterators. In short, if you are new to Ruby but want to get up to speed on Rails as rapidly as possible, this book could be what you are looking for.

When he gets down to the details, the author frequently does a better job of explaining the ins and outs of Ruby than you will find even in the ‘Bible’ of Ruby programming – the so-called ‘pickaxe book’, ‘Programming Ruby’. His explanation of tricky little things such as Ruby modules and scope is first rate.

But, while the book is pretty comprehensive, I do have a few reservations. First, you should bear in mind that this is not for novice programmers. By default, Rails is predominantly a command-line driven system and, in its first couple of chapters, this book will not only have you running the Ruby interpreter and various Rails scripts but also creating databases, running a server and executing SQL commands. This will be second nature to a hardened PHP developer. But it may be hard work for a complete beginner or someone used to an IDE hosting a language such as VB or Delphi.

Moreover, the user-friendliness of this book is compromised by the fact that it is based around the development of a single monolithic application – a database for a music store. You begin this on page 43 and you are still working at it on page 453. True, there are plenty of smaller examples and diversions en route. But essentially, you are expected to follow through the development of the application in order to progress through the book. I’m afraid that I found it difficult to sustain an interest in a music store database for that length of time.

At least, the source code of the finished version of the application is downloadable. Both the complete application and the individual code listings are supplied in the download; however, the smaller listings take the form of numbered files with no extension (e.g. 3_2), These aren’t associated with any target application in Windows so they have to be renamed by adding a meaningful extension such as .rhtml or .rb. There are a few errors in the listings shown in the book (for example, in the early chapters, classes to be descendents of ActionRecord rather than ActiveRecord) but these errors are not found in the downloaded code.

In short, this is a useful book for the moderately experienced developer who wants simultaneously to learn the Ruby language and put it to use for developing Rails applications. In my view it could have been better, though, if the author had explained how to develop a variety of small, self-contained Rails applications instead of concentrating on honing and refining the music store database.

AddThis Social Bookmark Button

Forum

  • Ruby For Rails
    24 February 2012, by swiXFwXOSJ

    Where in the anger-denial-bargaining-depression-acceptance senqeuce are you?WW might well be a fine framework its biggest drawback is probably that it is a Java framework.Tip: Learn Ruby.


Home