Wednesday, April 24, 2013
Agile Web Development with Rails Pragmatic Programmers 4th edition, Sam Ruby
This is a rare book and as a reviewer of technical books from many publishers, it is the first book I recommend to people who want to learn programming, regardless of if you want to learn Rails or use another tool. The reason why I love this book is because it does three things superbly:
1. It introduces solid, professional practices early in the book and in a way that is easy to grasp. For example, before page 100 you are writing automated unit tests. Few books teach this at all and those that do teach it in the last chapter, as an after thought. In this book you incorporate this excellent practice as part of your routine development.
2. Provides a quick-win. Every programming book should have an interesting, useful "Hello world" type of task. This book spends about 75 pages helping you get the tools installed and building an app that whets the appetite for bigger and better things. This sounds like a lot of pages for "Hello world" but that includes installing development tools, your "quick win" app and an introduction to the Ruby programming language.
3. Teaches web development with a non-trivial app that is applicable to real-world situations. In this book you'll build an online shopping cart system. You'll learn static pages, forms, master-detail pages, Ajax and RESTful services, user logins and storing data in a database. After completing this app you'll have touched just about everything you'll ever need for most common web apps.
In addition to these benefits for new developers, if your goal is to master Ruby on Rails, it also includes a third section of the book that explains in depth the most used components of the Rails platform. That way, once you've gotten a feel for what you can do, you can then focus in on the nitty gritty details of the more complex pieces of the framework.
This is an excellent book for learning development. The fact that it teaches Rails is ancillary. You can use the practices it teaches to create powerful apps in many different languages with the fundamentals skills you'll learn with it.
I only got into Ruby on Rails in the last year and have been incredibly impressed with it and enthusiastic to grab any book I can to increase my knowledge of it. I was told that Agile Web Development with Rails was "the" Rails book to own, but the only problem was that the fourth edition was not out yet. I looked through a first edition at the local library, but took it with a grain of salt as I knew a lot of that information was outdated, and so, the wait continued and other Rails books I checked out. Finally, this was released and I have now read through the entire book.
It is a little unique over Rails books due to the order of things. Where all the other books tend to start off explaining all the features, terms and and functionality behind the framework and starts working you through a demo app later on, Agile Web Development goes in the opposite direction as it starts you out immediately building the demo app, then the second half of the book goes into the specifics of Rails in more details. As anyone who has read any other edition of this book will already know, you will be building a demo app of a e-commerce store. Although it's not to completion, that's not really the point of it; the app will take you through a handful of different Rails 3 details and by the time you're done reading - or building along - you should have a fairly good grip on how to do different things in Rails. Once in a while, people in the Rails community like DHH and others will chime in with thoughts and tips.
It's a little hard for me to review this book as a complete stranger to Rails, as I have read through other Rails books prior to this. But while I might be more of a fan of the Apress Beginning Rails book, what was great about Agile Web Development was that I still was learning new things like stuff I didn't know you could do in migrations, formatting helpers, etc. So my time with this book was well spent and I am glad to have this on my shelf. Probably the only ones I would not recommend this book to is advanced Rails programmers, especially as they may already own an older edition of the book and I feel they would have caught up to speed on the Rails 3 changes by now. So for the most part, newbies only.
However, I have to point out one thing. This book took a while getting out to market and only appeared a few short months ago, and already it may be outdated...kind of. Rails 3.1 is coming - likely by the time you read this - and there are some new additions that this book won't even cover, such as the new asset pipeline, changes to migrations, SASS and Coffeescript. On the other hand, it's not like the information in this book is suddenly worthless, 99% of it will likely still apply to your projects. It's just something to keep in mind as you're reading this book; I recommend finishing this book then hopping on the web and watching a few Railscasts on Rails 3.1 to fully catch you up.
What happened? The authors are leaders in the field and the publisher is well-known and respected. This is already the 4th edition of the book (that shows its staying power). The book now covers the latest Rails version 3.1. There is a complete application and lots of useful material. So what is so wrong about this book? Is it because the book is actually meant for intermediate learners and not beginners? Well, I am afraid this is not the reason why. I wouldn't recommend this book to any intermediate learners either.
The book suffers from a lack of proper reviews that have pointed out the many pedagogical errors in style, sequence and content that the book has. One must work hard to grasp what is being taught. It requires a lot of motivation, reviewing and double checking. Too much is given at once, in the wrong order and with little explanation (if any). Too much is left open. Proper subject matter review for a consistent explanation isn't available.There is a summary at the end of each chapter, but it is as a statement of goals "achieved" and not an explanation. I could list many examples. One can easily get lost following (or trying to follow...) the book. It can be a real pain.
I have also checked the former, 3rd edition. It is better than this one. For example, the development of the sample application is better explained. In the current edition, a lot of text has been removed, including lots of critical parts needed to understand how the sample application is being built. The reader is left confused, trying to make sense of what is left. Truly bad editing, I must admit. The program code itself has changed dramatically. The new and the old text (program code and explanations) don't work together well at all. With each new edition of the book, the editing seems to get worse.
While beginners (the ones that always get hit the hardest) will suffer through this book, others in the same situation will have fun, joy and understanding with a book like "Head First Rails" that shows how Rails can and should be taught (independent from the style of the book). This great Head First Rails book has not been updated to Rails version 3, although it is still useful and the one I would recommend for a beginner.
So, unfortunately this is a flawed book at its core essence: to teach Rails. The material is all there, its authors are all expected to be experts in the area. But the guided hand of a good teacher isn't there. I wish a new edition would make up for the flaws and turn this book into the outstanding classic that it could and can be.
As there are very few books that cover the latest releases of Rails, this book may also contribute to lessen the usage of Rails itself, as many will turn away from it for a lack of proper learning resources, including from some of the leading experts in the field -- who were supposed to help to lead the way! Really disappointing...
Take, for example, page 161 of this fourth edition. Figure 22 is a detailed diagram showing how an instance variable is created in the controller, visible to the view in a form and related to a model object. The diagram shows the editing of an order object in a form, but the text nearby is instead discussing the creation of a new order object. This text takes four lines to explain once more that the action in the controller (in this case, the "new" action) matches a view with the same name ("new") under the directory views/orders. A detailed explanation once more. Fine. But the next line has already the code for a form and a partial, with no further explanation (so what is a partial, which convention is used by Rails for partials, why would we want to use one here?). Now the book assumes that the reader remembers it all, although this portion of the text is intended to deal with forms. Therefore, some parts of the book have been heavily edited out, some other parts have not been edited at all or have a mix of a diagram that shows example A with a text that shows example B. Some few have very detailed explanations and most have either short or just no explanations. All in the same confusing context where in the same page you are often confronted with many different technologies at once.
One of the creators of Rails is a co-author of this book. I wonder how he could let this all go ahead. Worse: some portions of the book are sections that seem to have been directly written by himself, called "David says". They are truly superficial and disappointing. It is as if Einstein would add sections to a book on relativity explaining how to name variables in equations or why to use X and not Y in tests instead of giving any conceptual or useful insight in his theory of relativity.
A reviewer here called this book the "de-facto edition to your Rails library". Well, if your boss wants to use Rails in your project and you are against it, just ask your boss to give this "classic" to the developers and wait for their reaction. However, make sure that none of them comes even close to "Head First Rails" to realize that Rails is fun and not this confusing, arbirtrary and complex framework that this book shows. This book is now, in its 4th edition, a bad thing for Rails.
I have reviewed and read many books in many different areas and, as it stands, this one manages to be one of the worse of them all. This book has the power to bring down any motivation to learn anything about Rails. What is more incredible is that its authors seem to have all the skills and experience to have produced a completely different and stellar book. I wonder where what got lost. And I hope they will repair it rather sooner than late.
Agile Web Development gets marketed as the ultimate beginner-to-intermediate guide to developing using Ruby on Rails. I think its target audience is solidly in the intermediate camp. Starting out as a beginner by reading this book will leave you more lost than enlightened.
Rails is powerful because of the conventions it pre-assumes. For those who understand the conventions -- why they exist, why they are better than the alternative, etc. -- Rails is a dream to use because it does all the behind-the-scenes work for you. But for beginners, seeing things like ":attr_accessor" or the "_path" notation in "link_to" is just downright confusing right off the bat.
Though I find the book well-written and useful now that I'm at that intermediate level, I'm giving it two stars because of all the time I wasted reading and re-reading its passages while I was learning Rails.
I found beginner's intros to Rails available on the web [...] indispensable to give me background BEFORE reading this book.
My suggestion to the authors is to more fully flesh out explanations of all of Rails' conventions, particularly routing, passing variables from method-to-method, and linking models together. Additionally, I think the authors should initially code their examples even less concisely and then work down to make things more concise.
Product Details :
Paperback: 488 pages
Publisher: Pragmatic Bookshelf; Fourth Edition edition (March 31, 2011)
Language: English
ISBN-10: 1934356549
ISBN-13: 978-1934356548
Product Dimensions: 5.9 x 0.6 x 9.8 inches
More Details about Agile Web Development with Rails Pragmatic Programmers 4th edition
or
Download Agile Web Development with Rails Pragmatic Programmers 4th edition PDF Ebook
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment