Re: Tales from the Dark Side

Paul Lynch <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
On 17 Mar 2006, at 03:58, Ian Joyner wrote:

> Strange how Apple posted a note about Ruby on Rails in their latest  
> ADN (http://developer.apple.com/tools/rubyonrails.html).

It's a repost (wasn't credited when I looked) of something that's  
been on one of the RoR sites for months.

> So, I had a look. Seems to be very text and terminal based from the  
> tutorial with no tools like WO Builder, so you end up hand crafting  
> the html with <% ... %> rails tags instead of WebObject tags  
> automatically provided by WOB.

No WOB, no EOM.  RoR is a little bit tied to MySQL, so they sort of  
expect you to be using one of the GUI MySQL tools; CocoaMySQL (if you  
can track down an updated version), or YourSQL.

There are a few other database drivers, but last time I looked there  
wasn't one for OpenBase, for instance.

> Installation was somewhat tedious as well taking about an hour (but  
> straightforward).

1.0 is a massive step forward compared to the earlier versions.  At  
least there is now a script that works reliably for all stages in the  
installation.  Previous versions involved dead chicken voodoo.

> Ruby is reasonably simple, considering it has syntactic elements of  
> LISP, perl, Java, and Eiffel. Treating line breaks as statement  
> terminators is a throw back to the 1950s – that's why ALGOL  
> introduced the semi-colon (which Ada and Eiffel realised was  
> unnecessary anyway if the syntax were regular enough, and also that  
> begins were unnecessary, you only need ends, like Ruby, but it  
> mixes in { and } just to keep C people happy I guess).

It's an interpreted language - those are the conventions for which  
compromises people are prepared to accept.  {} is more from perl/awk  
(for hashes/associative arrays) than C, in terms of the way they are  
commonly used.

I don't mind Ruby at all; in fact, I like it.  It reminds me of  
Smalltalk.

> The MVC separation was nice, but you get that in WO components  
> anyway. I didn't see that you could do desktop apps in rails like  
> WO. Is there an equivalent of EOModeler so you can get your model  
> right first?

No.  And ActiveRecord is an extremely simple model compared to EOF,  
you might just as well spend a couple of hours writing some  
equivalent handlers in Java to cover JDBC.

> Still, not bad as a simple object-relational system for simple web  
> pages. Don't know how it would scale up though. They said  
> migrations were database agnostic, but that is the point of SQL  
> anyway (to be a standard). Perhaps just nicer to work with than  
> SQL, but still text based rather than entity based as in EOModeler.

There's clearly going to be a performance crunch based on the old  
interpreted vs compiled clash; the emphasis on deploying with toy  
servers - LightTPd, etc, strongly implies that.  I already referred  
to the lack of database support; from what I can tell, migrating  
between databases will be significantly harder than it is with WO,  
and no, I haven't tried that, either.  Peter has already mentioned  
the lack of a session object.

My biggest hate is that the naming conventions are the opposite of  
what I would use; take just one example, I would always call a  
customer table Customer, and never Customers.  And I'd get really  
cranky if I had a table of Access objects.  I know that conventions  
can be overridden, but the whole point of adopting conventions is to  
pick good ones in the first place.

> Anyone else have real experience with it?

No. Which may be a cynical view, but it just hasn't been out long  
enough to get into enterprise scale deployments - by anyone, I'm not  
talking about myself.

All of that is comparing RoR with WO, which makes RoR look a lot  
worse than it is.  Do the same comparison for ASP, PHP, JSP, Struts/ 
Hibernate, and RoR comes out very well.  As I said, I quite like Ruby  
as a script language, and Rails is a refreshing approach to web  
applications, doing automatically a lot of things that I do anyway  
when using WO.

I'd use RoR for a small to medium site happily, which isn't something  
I would say of any of the aforementioned technologies.  In fact, if  
WO went away for any reason, I'd reach for RoR before anything else.   
The biggest thing against it is that, unlike ASP and PHP, there are  
very few hosting services that can support it (as opposed to zero for  
WO).

Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.