Topic: Agile Web Development with Rails, Third Edition Depot not RESTful?

Just picked up the beta of Agile Web Development with Rails 3rd edition and was hoping to see depot done in a RESTful fashion but it appears to not be so. Any idea as to why they would not redo it using rest?

Last edited by magic6435 (2008-04-23 15:58:13)

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

Because it requires a complete rewrite. The book is still in beta though, it might change in the future.

In another thread I was discussing the fact that the Depot Application taught very bad code practice, I hope they will update that, otherwise they will definitely lose my respect.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

I know its in beta but do you think they would release the beta so soon if they were going to change something that would require a full rewrite? they have already updated a bunch of parts in the book and if depot was going to restful i would think they would have done that before going to beta. o well we can always hope.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

I have lost hope for this book!  I did not agree with some of the coding conventions used, as did many other people, I'm sure.  I doubt that Depot will be re-written as a RESTful app.

Last edited by phester (2008-04-24 16:02:27)

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

I hope people have read the preface to the third edition.  While I'm new to Pragmatic Programmers, my REST credentials are well established.  There also has been significant changes to Rails to the point where the Depot application as described by prior editions wouldn't even work.  If you have things you disagree with, let me know; I'll try to be responsive.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

rubys wrote:

There also has been significant changes to Rails to the point where the Depot application as described by prior editions wouldn't even work.

I think thats exactly what people are getting at. If things in rails and the adoption of REST have changed so much then we are looking for a book that actually tosses out the old guard and presents us with some really "state of the art" examples thats why people are disappointed with what they have seen so far. awdwr3 is starting to look less like its brothers where if you were new to rails it was the first book people suggested you picked up and more like the "ahhhhh sure pick it up just for some of the key points here and there".

Granted i could be totally talking out of my ass and missing the point but i did want to see what other peoples reactions are so far.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

This beta is a blended beta.  What you see is the results of a few weeks worth of work.  I have several months of work ahead of me.  I could have insisted that the beta wait until I was done and present it with a Ta-Da!, but that's not how I work.

And, if you look closely, you will see that the admin controller is gone.  In its place is a products controller.  It is a baby step, I'll admit.  But expect to see more.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

Thats cool man and its really awesome that that you are taking the time to respond to us. i think we just figured that for major parts of the book a beta would have been held of on until the foundation was there. don't get me wrong i ordered the book 30 seconds after the site came back up and i saw that it was there, you guys always do fantastic work i think we/i just jumped the gun assuming that if there were to be Major changes that they would be in by beta in order to start refining.

Sorry if i came off as upset or something like that.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

I have to thank you for the work you are doing. I've been hoping to find a Rails 2 book which I can recommend for my office here. Thank you again for the work and I will be picking up the beta shortly.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

rubys wrote:

And, if you look closely, you will see that the admin controller is gone.  In its place is a products controller.  It is a baby step, I'll admit.  But expect to see more.

Hmmm, I'm not sure that mixing admin actions with publicly accessible actions in the same controller is a good practice. We were talking about that in another thread.

For a model like Product, there is no problem, as the admin and public actions are separate. Problems can arise with the Order model for instance. I wouldn't put admin actions inside the public order controller, it could be very dangerous and we could create a security/fraud if we forget to perform a credential check.

I am currently working on my ecommerce app therefore I am running into these issues.

The advantage of having a admin/orders_controller is that you simply put a global before_filter at the top of the controller, and you're safe.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

rubys wrote:

I hope people have read the preface to the third edition.  While I'm new to Pragmatic Programmers, my REST credentials are well established.  There also has been significant changes to Rails to the point where the Depot application as described by prior editions wouldn't even work.  If you have things you disagree with, let me know; I'll try to be responsive.

I teach a course in Ruby on Rails and I've been forcing the students to learn REST since Rails is now using it as the default scaffolding. I was using the previous book as the reference for the Spring 07 class, but now I have no text book since things have changed so much. This update has been much anticipated and a restful tutorial would be just what we need (the old depot app was very helpful in teaching the rails basics.)

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

It pretty much has to be RESTful, it would be just plain silly to not use it, for both the writers and the readers who try to learn the best rails practices from it.

Re: Agile Web Development with Rails, Third Edition Depot not RESTful?

Rails swept to world-wide attention in the Spring of 2005. Since then, it has become a serious and popular alternative to traditional web development environments such as Java and .NET. Why? Because Rails has the best of both worlds.You want to write professional-grade applications: Rails is a full-stack, open-source web framework, with integrated support for unit, functional, and integration testing. It enforces good design principles, consistency of code across your team (and across your organization), and proper release management.
Web design toronto