Re: Tales from the Dark Side
Ian Joyner <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
On 17/03/2006, at 4:47 PM, Peter McGregor wrote:
> Hello
>
>
> Ian Joyner wrote:
>> Strange how Apple posted a note about Ruby on Rails in their
>> latest ADN (http://developer.apple.com/tools/rubyonrails.html).
>> 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.
>>
>> Installation was somewhat tedious as well taking about an hour
>> (but straightforward). 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). Then again C defines don't get this right either also
>> requiring line continuations (whoever stole the idea of defines
>> from Burroughs ALGOL missed the subtle point that the # terminates
>> the define, not starts it!)
>>
>> 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?
>>
>> 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.
>>
>> Anyone else have real experience with it?
>>
> Rails doesn't persist sessions like WebObjects or Tapestry.
> The sessions are more like java servlet sessions.
> So the objects have to be manually retrieved and saved in the
> session area in every method(submit) call.
>
> Ruby is very dynamic. The downside of this is if there is something
> wrong in the code the Ruby instance may decide to just stop
> without any warning. eg if there is a syntax error in a database
> model the browser will just return a blank page. There won't be any
> error messages in any log files. There are ways though to find
> database errors. Just fire up irb and access/trigger the model
> outside the web application.
So Ruby is a scripting language. Does it compile at all (at least as
far as being able to precheck all code branches for errors, not
necessarily code generation, a bit like WFL)? I'd guess there's no
type checking so that significant source of errors could get through.
Don't think I like the prefixing variables with @ and : to denote
what kind of variable they are, but then scripting languages tend not
to have declarations where you would put such modifiers only once.
>
> With rails I liked being able to make a change in an rb file, save
> and then just refresh the browser. Its quite fast to develop in
> from that aspect. Maybe this is similar to what objective script in
> WebObjects used to be.
Did seem pretty neat how you didn't have to build, but then there is
the downside as you say.
>
> Regards
>
> Peter
>
>> Ian