Hi,
I'm kind of interested in hearing opinions relating to the original question.
I don't know a lot about Rails but I am very interested in learning more. I've mucked about with it a bit but nothing serious. I definitely formed a good impression of it.
David Balick <davidbalick@gtakethisoutmail.com> provided a URL <http://www.drunkandretired.com/2005/06/drunkandretired-podcast-episode-09.html> to a podcast that contains some criticism of Rails (and almost as much praise, so I don't think of this as some kind of rant/trashing of Rails).
It is, I think, difficult to pull the argument out of the podcast. David took a shot at it...
In a nutshell, they say that Rails starts to get less appropriate for apps
with transactions that encompass entities other than just the database. If
the server side objects also modify the data, and particularly of the
modified objects then affect other objects, then it can become very non-
trivial to handle all of that in Rails.
In my opinion the comments regarding extended transactions is a bit of a red herring -- it may well be an issue, but I don't know how big in practice (though I'm sure BEA, MS, and IBM want you to believe it is a HUGE problem :-). But more importantly, it seemed to obscure the real point that was expressed before that.
Here is my take on the argument made:
1) They are talking about what they call 'enterprise' applications. I think that they're talking about a class of applications that do things that are more complex than manipulating data in a database (and I think they are including in this wide-spread changes in the database in a single transaction). I think getting hung up on the term 'enterprise' is not a good idea -- everyone can name plenty of enterprise applications that primarily manipulate localised data in a database.
2) Rails encourages (forces?) the object layer and data layer to merge with some negative consequences for that class of applications (actually they may not have qualified this and so might have expressed it as a universally Bad Thing)
3) Rails does not keep track of instances; so that if two requests are made for the same object two different copies are returned (and what comes with this is a performance question)
4) Rails returns the whole object graph with each request (which in certain kinds of applications could pull much more information from the DB than necessary)
5) Rails does not provide a transaction that can contain more than one object retrieval and/or/? write to the DB (at least this is what I think they meant) and that there is too much work (knowledge maybe?) required to save changes -- this may be related to the kind of thing Hal Fulton was getting at in the recent KirbyBase thread.
Now *I* am not making these claims, all *I* am trying to do is explain what I heard on the podcast (and it isn't easy), and I don't claim that I got *their* arguments correct either. But maybe there is enough there to talk about. If not, maybe we should just make up our own straw-man issues.
Since each request is handled in isolation,
I'm not sure what you mean by this.
you rarely encounter
situations where object changes ripple through with tons of
consequences.
Do you mean that you rarely encounter situations where many objects are changed? Rarely as in not in most applications? or Rarely as in many applications but only occasionally occurring?
At the end of each request, you'll have to persist your
data somehow, so whether that's in a database, Madeleine store, or web
service call, I don't see that being all that different.
I think they are complaining about what you have to do to accomplish this in Rails, with the implication that you have to do a lot.
Perhaps these guys are just solving different problems.
Probably (and they called them 'enterprise applications' which I've already suggested is a really poor name for them, and possibly inflammatory). How would you characterise the problems that Rails is really good at, and where it is OK, and where it isn't so OK?
But I found
the rant to be very abstract and hard to relate to. If you can come up
with a concrete example, I'd love to give a more concrete answer to
these concerns.
I find the argument a bit slippery, especially as I try to write it down
I agree that this would be the best thing. I don't think I understand their complaint sufficiently to try. I think I know what kind of application they are talking about, and I have a lot of experience with them, so with a bit more clarification, I might be willing to try.
(I don't think I've ever equivocated so many times in one sitting before
Cheers,
Bob
···
On Sep 16, 2005, at 6:43 PM, David Heinemeier Hansson wrote:
On 9/16/05, David Balick <davidbalick@gtakethisoutmail.com> wrote:
--
David Heinemeier Hansson
http://www.loudthinking.com -- Broadcasting Brain
http://www.basecamphq.com -- Online project management
http://www.backpackit.com -- Personal information manager
http://www.rubyonrails.com -- Web-application framework
----
Bob Hutchison -- blogs at <http://www.recursive.ca/hutch/>
Recursive Design Inc. -- <http://www.recursive.ca/>
Raconteur -- <http://www.raconteur.info/>