RE: Ruby on Rails?

"Bruce Fancher" <[email protected]> Mon, 31 Oct 2005 14:34:04 -0500
Newsgroups gmane.comp.web.webobjects.general
Message-ID <[email protected]>
 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Andreas Korth
> Sent: Monday, October 31, 2005 2:02 PM
> To: Helge Hess
> Cc: WebObjects-Talk
> Subject: Re: Ruby on Rails?
> 
> >> But the overall concept is the same as in WOF and other frameworks.
> >
> > Or in other words: the overall concept is NOT the same as in WOF.
> 
> I was talking about sessions, not components. The session 
> concept is the same in both frameworks, the implementation 
> certainly isn't.
> 
> > RoR has no nested component processing at all.
> 
> Maybe because it doesn't have (WO-style) components at all 
> ;-) Rails uses partials to facilitate reusable templates. 
> Partials can be nested.
> 
> > "Rails developers don't repeat themselves" - where do you repeat 
> > yourself in WO?
> 
> If you define an attribute for an entity, for example? Let's see...
> 
> Defining the attribute name (1) and the column name (2) in 
> the EOModel. 
> Adding a getter to your business class (3), adding a setter 
> to your business class (4). Creating the actual column in the 
> database (5).
> 
> That's four repetitions, assuming that the attribute name and 
> the column name match (which is usually the case). I also 
> assume that you prefer real accessors over 
> storedValueForKey() typecasting orgies. The fact that you can 
> auto-generate both the business code and the schema is a neat 
> automation, but it doesn't eliminate the duplication.

These are all limitations that stem from the use of Java, not from
WebObjects itself.  While I agree that Ruby has many nice language features
over Java, there are also disadvantages, not least of which is the fact that
there orders of magnitude more frameworks available for Java than there are
for Ruby.

> > Why is configuration a good thing? Because configuration can be 
> > processed (/read) by tools. Whether those are D2W rules, WO 
> component 
> > bindings or EOModel mapping.
> 
> Configuration files are a good thing because they can be read 
> by tools?? LOL. Rails eliminates the need of configuration 
> files in favour of smart conventions. You only need to write 
> minimal configuration if you break the convention (for a good 
> reason, hopefully).
> 
> > In contrary, with the latter he gets plenty of additional modeling 
> > feature w/o resorting to code and probably most important: database 
> > independence and redeployment.
> 
> Most of the modelling features in EOF are available in 
> ActiveRecord as well, plus some more (e.g. aggregation, 
> ordered list and tree relationships). The fact that the model 
> is expressed in code has no disadvantages over an external 
> mapping. Database reflection is a smart technique and it's 
> independent of the underlying RDBMS.

Sorry, but to say that it has no disadvantages is unreasonable.  There
surely are advantages in keeping the mapping separate from the database and
the code.  There are disadvantags too.  As the economist Thomas Sowell said:
"There are no solutions, only tradeoffs."

> > Now why is RoR popular? I think those things play into that:
> > a) hype. hype. and again: hype.
> 
> What you mistakenly call a hype is the fact that Rails is 
> extremely well received by many acknowledged developers 
> around the world. They learn about it, they love it and they 
> tell others about it.

Yes, RoR is very nice.  That doesn't mean that it's the currently the best
thing out there, just that it's much better than what most of the people
who've tried it out have been using up until now.  Given that in most cases
that means Struts and related junk, it's not surprising that they'd be
ecstatic over RoR.

> > b) Prototype/Scriptaculous
> 
> Go find me another framework that integrates AJAX that well.
> 
> > c) nice web design / good documentation
> 
> Q: Why do so many great software projects never get the 
> attention they deserve?
> A: They sit on an ugly sourceforge page and nobody bothers to 
> write documentation.
> 
> > d) scripted language
> 
> Having an interactive Ruby console to your application is 
> simply priceless :-)
> 
> > IMHO RoR is a nice framework and well suited for doing simple CRUD 
> > apps quickly. It just doesn't provide anything new and 
> hardly what is 
> > already available in other frameworks. This doesn't make it 
> worse but 
> > it doesn't make it better either :-)
> 
> I seriously doubt your opinion is based on actual research. 
> I'm sure that, if you examined Rails in more detail, you'd 
> find tons of cool stuff not available in other frameworks...
> 
> > Eg I find RoR URL mapping _extremely_ disappointing compared to 
> > ZPublisher.
> 
> ...and while you're at it, you might want to take a look at 
> the possibilities of defining custom routes.
> 
> > Also I'm really tired of the anti-XML attitude in RoR.
> 
> The few configuration files in Rails are either plain Ruby 
> scripts or YAML. Both is by far more readable than XML and 
> fits better into the overall concept of RoR. If you need to 
> generate or parse XML there are Ruby libraries readily 
> available for this purpose.
> 
> WO doesn't make extensive use of XML either. (EOModel, WOD files, D2W
> rules...)
> 
> --
> 
> Andreas
> 
> _______________________________________________
> WebObjects-talk mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-talk