Rating: - Helpful introduction, but fairly lightweight and repetitive
For those who aren't aware, ruby gems refers a way of packaging up code so it can be easily distributed for other developers to use, and a tool to help with the distributing and/or installing that code.
On first glancing at this book, I wondered how you could fill a full-length book on the topic of gems. While getting the tools installed on some systems requires care, and there's space for a couple of chapters on packaging your own libraries as gems, both topics have been covered alongside other topics in numerous volumes. What I'd missed was that contents not only covers both of those topics, but also looks at 26 different gems and explains how you might use them in your projects.
The coverage of setting up and using ruby gems at the start of the book, and on packaging and distributing your own gems at the end of the book are brief but cover the basics well enough. It might have been helpful had the latter included a little information on how to include other libraries that need to be compiled and managing the cross-platform issues that raises. Chances are anyone planning to do that is well capable of reverse-engineering a gem spec file to work out what's needed, but it would have added some weight and helped these chapters stand out from their equivalents in other volumes.
The gems profiled cover a wide range of uses: databases, certain web services, parsing HTML, web frameworks, recurring events, PDF generation, and more. Most of them are pretty well known libraries, but few of us will have had a chance to try them all out and newcomers to the ruby community looking for some support in their projects may well find some useful tips within.
For each gem there is an introduction, some basic code samples, a lengthier code sample (with commentary) and conclusion. That repetition means this isn't a book many will want to wade through in one go. I found that after a while I needed a break, and if reading the book it may be best to pick out a gem that particularly interests you, read the relevant section and then write some code of your own before moving on to another.
A number of times I wondered if it would be preferable to drop some of the best known gems (there are plenty of ActiveRecord examples floating around) in favour of a little more depth. In particular it would have been interesting to see a dissection of how a few of the gems work, as a sign that anyone can contribute, to see what can be learned from techniques used, and to better understand how the gems in question can be used. Such explorations might serve to break up the text a bit, as well as providing useful insights into ruby development and perhaps broadening the appeal of the book a little.
Overall, Practical Ruby Gems was a helpful read and there are a few new gems I'm going to be exploring as a result of my reading, but you may well want to take a close look before investing in a copy. You may broaden your ruby knowledge in the reading, but you're unlikely to deepen it significantly.
Disclaimer: I was sent a copy of this book for review by the publisher.
Rating: - Good book, if you have a need for it
Some books are more tutorial in nature, some more reference. This one is *really* reference, so much so that if you don't need to use the covered gems, there's no reason to buy the book.
I agree with one reviewer about much online documentation being lacking (to put it mildly), so this book is definitely helpful in that respect. Still, I found the explanations to be on the terse side. (Which some people might prefer.)
Rating: - Great for expanding the power of ruby
I'm learning Ruby and building Rails applications. This book offers a valuable overview of some of the Gems available for expanding the power of Ruby, including detailed descriptions of a selection of popular Gems. Things like online image manipulation and PDF creation are possible to easily implement with some of the Ruby Gems described in this book.
Rating: - Practical and clear
Ruby has risen meteorically in prominence in the past few years, and the number of Ruby books has gone from a couple to a couple dozen. I'm pleased to say that this is one of the books that will remain on my bookshelf. Practical Ruby Gems makes few assumptions about the reader's level of knowledge and delivers a brief install-configure-manage tutorial to get novice readers up to speed. The main bulk of the book is 29 short chapters which each highlight a single gem, explain what it's used for, gives a simple script demonstrating how to implement it and has some added commentary on its applicability and explaining the implementation. The final two chapters explain how you can create and distribute your own gems publicly or privately. Overall, the book is clear and concise and filled with useful material.
Disclaimer: I have known David for several years, and we worked together to deliver some LAMP training and run the local LUG. I'm impressed with his level of knowledge and his ability to communicate it, and this book is an excellent demonstratin of that.
Rating: - Fundamentals of Gems, and a guided tour of what's available
Practical Ruby Gems does exactly what it says on the tin. The first few chapters cover what gems are, how to install them and manage versions. The final chapters cover how to create and distribute your own gems.
Sandwiched between these fundamentals are a slew of concrete examples with code, covering topics like html parsing (hpricot) and RSS parsing (feedtools), zip and pdf manipulation, as well as topics more familiar to Rails people, such as the use of mongrel, rake, and ActiveRecord.
My first impression was that info on specific gems could easily be found by checking their documentation online.
However, after reading more, I realised I had missed the point. In theory, you could get this stuff online, but in practice, the often poor online documentation can't replace clear explanations and concrete code examples. This book fills you in on the fundamentals, then gives an interesting tour of some of the major gems available, with ready to use code. By bringing this all together, it will almost definitely spark some ideas on how to use gems to improve your Ruby code or your Rails apps.
|