Re: Tales from the Dark Side
"Geoff Hopson" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
I don't know this for a fact, but I recall reading somewhere that there will soon be a ruby2c compiler that will product compiled C code on the installation platform. Pedal to the metal... On 17/03/06, Peter McGregor <[email protected]> wrote: > > Ian Joyner wrote: > > 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)? > Currently Ruby doesn't compile but the the creator of Ruby, and others, > are converting Ruby into a byte code vm, like Java. > Its called Ruby done rite. > There is someone doing an Eclipse plugin for ruby who is incorporating > some sort of syntax checking. From memory I think he > is using a port of Ruby that runs on the Java VM, to help with building > some sort of syntax tree. > > > > I'd guess there's no type checking so that significant source of > > errors could get through. > When an error does occur there is no stack trace, as with java, so > sometimes its hard to know what is going on. > > Rails is just one of many web frameworks built on Ruby. IOWA is another > web application framework that uses continuations, > which means that class variables are persisted during the > request/response loop. CGIKIT is also built on Ruby and is very similar > to the WebObjects presentation layer. > > I think the Rails presentation layer could be improved. eg there is no > way to have multiple submit buttons in a form with the Rails > API. Special text strings have to be added to the id= or name= fields in > the html tags to pass this information to a central method. > This method then has to decode the input parameters to decide what > actual method to call. > I figured out how to do this because I did a google search and saw a > reply to a question that had been asked by another former webobjects > person. The question was about multiple submit buttons. > > 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 > > > > _______________________________________________ > > WebObjects-dev mailing list > > [email protected] > > http://www.omnigroup.com/mailman/listinfo/webobjects-dev > > _______________________________________________ > WebObjects-dev mailing list > [email protected] > http://www.omnigroup.com/mailman/listinfo/webobjects-dev > _______________________________________________ WebObjects-dev mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/webobjects-dev