Hi there, I am a newbie and interested in learning Ruby on Rails. I see there are 2 books out there: Ruby for Rails Ruby techniques for Rails developers David A. Black and Agile Web Development with Rails : A Pragmatic Guide (Pragmatic Programmers) Dave Thomas, David Heinemeier Hansson, Andreas Schwarz, and Thomas Fuchs Which one should I get? "Agile Web Development with Rails" also supposed to have a second edition coming out in September. I appreciate any feedbacks from those who have read these books. Thanks. Dobb -- Posted via http://www.ruby-forum.com/.
Hi Dobb, I think both books are great, but as you know, the second book is all about rails, while the first is much more about the ruby behind rails. If you have the money, buy them both and wait for the 2nd edition of the second, buy it either, the two editions diffs a lot, although the basics still the same, but much more up to date, as the rapid grows of rails, you would surely want to know how the other cool kid play;-) If money is an issue as the same to me, I sure will wait for the new edition comes out. Wish this helps. Dobb Lou wrote:> Hi there, > > I am a newbie and interested in learning Ruby on Rails. I see there are > 2 books out there: > > Ruby for Rails > Ruby techniques for Rails developers > David A. Black > > and > > Agile Web Development with Rails : A Pragmatic Guide (Pragmatic > Programmers) > Dave Thomas, David Heinemeier Hansson, Andreas Schwarz, and Thomas Fuchs > > Which one should I get? "Agile Web Development with Rails" also > supposed to have a second edition coming out in September. I appreciate > any feedbacks from those who have read these books. Thanks. > > Dobb-- Posted via http://www.ruby-forum.com/.
Hi Dobb -- On 13-Jul-06, at 3:12 AM, Dobb Lou wrote:> I am a newbie and interested in learning Ruby on Rails. I see > there are > 2 books out there: > > Ruby for Rails > Agile Web Development with Rails > > Which one should I get?I''ll put in my vote for David Black''s Ruby for Rails. While you should probably invest in both, starting with Ruby for Rails might reduce some of the smoke and mirrors you''re likely to find when diving into Rails for the first time. If you have a beginning knowledge of Ruby before you dig in, you''ll probably find the Agile book a better read. My $0.02 /Jeff -- http://re.visioni.st http://quotedprintable.com
I''m a newbie too, but define newbie. Are you new to just Ruby and Rails or OOP or programming all together ? I have all of them :). Agile Wed Dev is available as a beta PDF from PragmaticProgrammer. So you can get updates on the 2nd edition as they are released. However I found, and it depends how you learn, if you can read code and learn from that then AWDWR might be the book. For me, I decided a step back (which was really a step forward) was the way to go. I picked up Learning to Program by Chris Pine. Give you funadmentals in programming but for Ruby. Also, Programing Ruby (1st version is online - ruby-lang.org) is pretty much indispensible. Hope that helps! Stuart On 7/13/06, Jeffrey Hardy <packagethief@gmail.com> wrote:> > Hi Dobb -- > > On 13-Jul-06, at 3:12 AM, Dobb Lou wrote: > > I am a newbie and interested in learning Ruby on Rails. I see > > there are > > 2 books out there: > > > > Ruby for Rails > > Agile Web Development with Rails > > > > Which one should I get? > > I''ll put in my vote for David Black''s Ruby for Rails. While you > should probably invest in both, starting with Ruby for Rails might > reduce some of the smoke and mirrors you''re likely to find when > diving into Rails for the first time. If you have a beginning > knowledge of Ruby before you dig in, you''ll probably find the Agile > book a better read. > > My $0.02 > > /Jeff > > -- > http://re.visioni.st > http://quotedprintable.com > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/796406f8/attachment.html
Jeffrey Hardy wrote:> I''ll put in my vote for David Black''s Ruby for Rails. While you > should probably invest in both, starting with Ruby for Rails might > reduce some of the smoke and mirrors you''re likely to find when > diving into Rails for the first time. If you have a beginning > knowledge of Ruby before you dig in, you''ll probably find the Agile > book a better read.When you do buy Agile Web Development with Rails I recommend you get the Second Edition. The Beta eBook is available as PDF and as long as I have the Foxit Reader handy, it is a fine way to read that book. I have both editions of Agile and I would be lost right now without the second edition. It looks like I need to grab a copy of Ruby for Rails. I have the latest edition of the Pick Axe book but I need something to fill in a few gaps. Of course just diving in tends to fill in the gaps quickly too ;-) Matt Griffith http://mattgriffith.net -- Posted via http://www.ruby-forum.com/.
If you are new to both Ruby and Rails, I recommend the Ruby for Rails book to start. It really helped me to understand the basics. Knowing how Ruby works really helps understanding the magic behind Rails code. Then AWDWR. Once I started writing code, I found the Rails Recipes book very helpful. + $.02 -Larry On 7/13/06, Matt Griffith <mattgriffith-rubyforum@spamex.com> wrote:> > Jeffrey Hardy wrote: > > > I''ll put in my vote for David Black''s Ruby for Rails. While you > > should probably invest in both, starting with Ruby for Rails might > > reduce some of the smoke and mirrors you''re likely to find when > > diving into Rails for the first time. If you have a beginning > > knowledge of Ruby before you dig in, you''ll probably find the Agile > > book a better read. > > When you do buy Agile Web Development with Rails I recommend you get the > Second Edition. The Beta eBook is available as PDF and as long as I have > the Foxit Reader handy, it is a fine way to read that book. I have both > editions of Agile and I would be lost right now without the second > edition. > > It looks like I need to grab a copy of Ruby for Rails. I have the latest > edition of the Pick Axe book but I need something to fill in a few gaps. > Of course just diving in tends to fill in the gaps quickly too ;-) > > Matt Griffith > http://mattgriffith.net > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/3f6fc8fb/attachment.html
Seems like Ruby for Rails has really been gaining in popularity for the best way to learn. Not to long ago it seemed liek AWDWR was the one usually recommended. Larry - were you completely new to Ruby when you read it ? And did you have previous programming experience ? Stuart On 7/13/06, Larry Kelly <larry@tellinkltd.com> wrote:> > If you are new to both Ruby and Rails, I recommend the Ruby for Rails book > to start. It really helped me to understand the basics. Knowing how Ruby > works really helps understanding the magic behind Rails code. Then AWDWR. > Once I started writing code, I found the Rails Recipes book very helpful. > + $.02 > -Larry > > > On 7/13/06, Matt Griffith <mattgriffith-rubyforum@spamex.com> wrote: > > > > Jeffrey Hardy wrote: > > > > > I''ll put in my vote for David Black''s Ruby for Rails. While you > > > should probably invest in both, starting with Ruby for Rails might > > > reduce some of the smoke and mirrors you''re likely to find when > > > diving into Rails for the first time. If you have a beginning > > > knowledge of Ruby before you dig in, you''ll probably find the Agile > > > book a better read. > > > > When you do buy Agile Web Development with Rails I recommend you get the > > Second Edition. The Beta eBook is available as PDF and as long as I have > > > > the Foxit Reader handy, it is a fine way to read that book. I have both > > editions of Agile and I would be lost right now without the second > > edition. > > > > It looks like I need to grab a copy of Ruby for Rails. I have the latest > > > > edition of the Pick Axe book but I need something to fill in a few gaps. > > Of course just diving in tends to fill in the gaps quickly too ;-) > > > > Matt Griffith > > http://mattgriffith.net > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Best Regards, > -Larry > "Work, work, work...there is no satisfactory alternative." > --- E.Taft Benson > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/b7add3ea/attachment.html
Before I found Ruby and Rails, I had taught myself several procedural languages. This has been a disadvantage in many respects. Ruby is so well designed, ( everything is an object), that you can write procedural code in it. I was still struggling with the object mindset when I read the pickaxe and AWDWR books. They are great books, and I use them for reference. But, I had trouble following their examples. The were too many things shown, but not explained to my satisfaction. The way RoR was written helped me to understand objects, their scope and behavior better. I understand what mixins are now. And the difference between include and require. Modules, classes, and methods are there as well. On 7/13/06, Dark Ambient <sambient@gmail.com> wrote:> > Seems like Ruby for Rails has really been gaining in popularity for the > best way to learn. Not to long ago it seemed liek AWDWR was the one usually > recommended. >AWDWR was the first good Rails book out, and was the ''Rails Bible'' at the time. AWDWR second edition is still worthy of a place on the bookshelf. It is good for understanding how Agile programming should be done with Rails. Larry - were you completely new to Ruby when you read it ? And did you have> previous programming experience ? >Before I found Ruby and Rails, I had taught myself several procedural languages. This has been a disadvantage in many respects. Ruby is so well designed, ( everything is an object), that you can write procedural code in it. I was still struggling with the object mindset when I read the pickaxe and AWDWR books. They are great books, and I use them for reference. But, I had trouble following their examples. The were too many things shown, but not explained to my satisfaction. The way RoR was written helped me to understand objects, their scope and behavior better. I understand what mixins are now. And the difference between include and require. Modules, classes, and methods are there as well. -Larry Stuart> > > On 7/13/06, Larry Kelly <larry@tellinkltd.com> wrote: > > > > If you are new to both Ruby and Rails, I recommend the Ruby for Rails > > book to start. It really helped me to understand the basics. Knowing how > > Ruby works really helps understanding the magic behind Rails code. Then > > AWDWR. Once I started writing code, I found the Rails Recipes book very > > helpful. > > + $.02 > > -Larry > > > > > > On 7/13/06, Matt Griffith < mattgriffith-rubyforum@spamex.com> wrote: > > > > > > Jeffrey Hardy wrote: > > > > > > > I''ll put in my vote for David Black''s Ruby for Rails. While you > > > > should probably invest in both, starting with Ruby for Rails might > > > > reduce some of the smoke and mirrors you''re likely to find when > > > > diving into Rails for the first time. If you have a beginning > > > > knowledge of Ruby before you dig in, you''ll probably find the Agile > > > > book a better read. > > > > > > When you do buy Agile Web Development with Rails I recommend you get > > > the > > > Second Edition. The Beta eBook is available as PDF and as long as I > > > have > > > the Foxit Reader handy, it is a fine way to read that book. I have > > > both > > > editions of Agile and I would be lost right now without the second > > > edition. > > > > > > It looks like I need to grab a copy of Ruby for Rails. I have the > > > latest > > > edition of the Pick Axe book but I need something to fill in a few > > > gaps. > > > Of course just diving in tends to fill in the gaps quickly too ;-) > > > > > > Matt Griffith > > > http://mattgriffith.net > > > > > > -- > > > Posted via http://www.ruby-forum.com/. > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > -- > > Best Regards, > > -Larry > > "Work, work, work...there is no satisfactory alternative." > > --- E.Taft Benson > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/67c932bf/attachment.html
Well it''s all interesting. I''m kind of going back and forth between them all. So I''m writing back because, inspired by the thread I went back to r4rmusic1. Yesterday I had done some work on my own but using AWDWR. Here is something I noticed. In AWDWR I definded an action in the controller to display all records in a table. It has a method in it that is defined in the model. Controller: def list @positions = Position.current_openings end Model: def self.current_openings find(:all) end Whereas in Ruby for Rails (at least in r4rmusic1 to accomplish something similar it''s a controller action: def welcome @composers = Composer.find(:all) .sort_by {|c| [c.last_name, c.first_name]} end Point is not so much as they are just two different approaches. I think, and could be wrong, there might be some huge difference. 1) keeping things solely in controller and 2) using the model for methods. Interesting. Stuart On 7/13/06, Larry Kelly <ldk2005@gmail.com> wrote:> > Before I found Ruby and Rails, I had taught myself several procedural > languages. This has been a disadvantage in many respects. Ruby is so well > designed, ( everything is an object), that you can write procedural code in > it. I was still struggling with the object mindset when I read the pickaxe > and AWDWR books. They are great books, and I use them for reference. But, I > had trouble following their examples. The were too many things shown, but > not explained to my satisfaction. The way RoR was written helped me to > understand objects, their scope and behavior better. I understand what > mixins are now. And the difference between include and require. Modules, > classes, and methods are there as well. > > On 7/13/06, Dark Ambient <sambient@gmail.com> wrote: > > > > Seems like Ruby for Rails has really been gaining in popularity for the > > best way to learn. Not to long ago it seemed liek AWDWR was the one usually > > recommended. > > > > AWDWR was the first good Rails book out, and was the ''Rails Bible'' > at the time. AWDWR second edition is still worthy of a place on the > bookshelf. It is good for understanding how Agile programming should be > done with Rails. > > Larry - were you completely new to Ruby when you read it ? And did you > > have previous programming experience ? > > > > Before I found Ruby and Rails, I had taught myself several procedural > languages. This has been a disadvantage in many respects. Ruby is so well > designed, ( everything is an object), that you can write procedural code in > it. I was still struggling with the object mindset when I read the pickaxe > and AWDWR books. They are great books, and I use them for reference. But, I > had trouble following their examples. The were too many things shown, but > not explained to my satisfaction. The way RoR was written helped me to > understand objects, their scope and behavior better. I understand what > mixins are now. And the difference between include and require. Modules, > classes, and methods are there as well. > -Larry > > Stuart > > > On 7/13/06, Larry Kelly < larry@tellinkltd.com> wrote: > > > > If you are new to both Ruby and Rails, I recommend the Ruby for Rails > > book to start. It really helped me to understand the basics. Knowing how > > Ruby works really helps understanding the magic behind Rails code. Then > > AWDWR. Once I started writing code, I found the Rails Recipes book very > > helpful. > > + $.02 > > -Larry > > > > > > On 7/13/06, Matt Griffith < mattgriffith-rubyforum@spamex.com> wrote: > > > > > > Jeffrey Hardy wrote: > > > > > > > I''ll put in my vote for David Black''s Ruby for Rails. While you > > > > should probably invest in both, starting with Ruby for Rails might > > > > reduce some of the smoke and mirrors you''re likely to find when > > > > diving into Rails for the first time. If you have a beginning > > > > knowledge of Ruby before you dig in, you''ll probably find the Agile > > > > book a better read. > > > > > > When you do buy Agile Web Development with Rails I recommend you get > > > the > > > Second Edition. The Beta eBook is available as PDF and as long as I > > > have > > > the Foxit Reader handy, it is a fine way to read that book. I have > > > both > > > editions of Agile and I would be lost right now without the second > > > edition. > > > > > > It looks like I need to grab a copy of Ruby for Rails. I have the > > > latest > > > edition of the Pick Axe book but I need something to fill in a few > > > gaps. > > > Of course just diving in tends to fill in the gaps quickly too ;-) > > > > > > Matt Griffith > > > http://mattgriffith.net > > > > > > -- > > > Posted via http://www.ruby-forum.com/ . > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > -- > > Best Regards, > > -Larry > > "Work, work, work...there is no satisfactory alternative." > > --- E.Taft Benson > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Best Regards, > -Larry > "Work, work, work...there is no satisfactory alternative." > --- E.Taft Benson > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060713/1078032e/attachment-0001.html
Hi -- On Thu, 13 Jul 2006, Dark Ambient wrote:> Well it''s all interesting. I''m kind of going back and forth between them > all. > So I''m writing back because, inspired by the thread I went back to > r4rmusic1. > Yesterday I had done some work on my own but using AWDWR. > Here is something I noticed. > > In AWDWR I definded an action in the controller to display all records in a > table. It has a method in it that is defined in the model. > Controller: > def list > @positions = Position.current_openings > end > > Model: > def self.current_openings > find(:all) > end > > Whereas in Ruby for Rails (at least in r4rmusic1 to accomplish something > similar it''s a controller action: > def welcome > @composers = Composer.find(:all) .sort_by {|c| [c.last_name, > c.first_name]} > end > > Point is not so much as they are just two different approaches. I think, > and could be wrong, there might be some huge difference. 1) keeping things > solely in controller and 2) using the model for methods.The choice of where the code goes will depend on what the code does. I figure a sort operation (and yes, it could be done with a SQL fragment :-) is generally ad hoc and on-the-fly; and if it is, it belongs in the controller. Otherwise your model would have to come equipped with a method for every possible sort contingency. That would be unwieldy -- and that''s why sort and sort_by take blocks: so that you can customize them for a particular occasion. On the other hand, something that functions more as a stable quasi-property of the model belongs in the model. For example, if you have a composer with first and last name and want to be able to say: composer.full_name you''ll want a method in the model that does something like: def full_name first_name + " " + last_name end So it''s not that you, as a Rails developer, have to decide whether you''re going to put everything in your controllers or your models. Rather, you make judgements constantly depending on what the code is doing and where it fits best. David -- http://www.rubypowerandlight.com => Ruby/Rails training & consultancy http://www.manning.com/black => RUBY FOR RAILS (reviewed on Slashdot, 7/12/2006!) http://dablog.rubypal.com => D[avid ]A[. ]B[lack''s][ Web]log dblack@wobblini.net => me
unknown wrote:> Hi -- > > On Thu, 13 Jul 2006, Dark Ambient wrote: >> > So it''s not that you, as a Rails developer, have to decide whether > you''re going to put everything in your controllers or your models. > Rather, you make judgements constantly depending on what the code is > doing and where it fits best. > > > David >I would think it would be worth mentioning as well that Rails implements a variation of the MVC model. One take on that is that all business logic (which is sometimes a bit fuzzy to define) belongs in the model (M), while logic that is related to linking the model and the view (V) belongs in the controller (C). Sorting for the purposes of presentation would then be a controller function - maybe even a view function, but not something that would normally go in a model. OTOH, a method that filters out only a particular subset of model items for the purpose of processing would belong in the model..for example, a function that returns all currently active users. Keith -- Posted via http://www.ruby-forum.com/.