From: Shaun Lloyd Date: 2012-05-22T12:07:19+09:00 Subject: Re: Ruby through CGI and Rails On 21/05/12 21:33, Matthew R Chase wrote: > I would not consider CGI obsolete. Unless you are referring to ruby's > CGI library. In which case, I still wouldn't consider it obsolete, but > because of rails I imagine it has fallen out of preference. (though I > don't know what the rails equivalent is, I'm sure there is an > alternative in the rails world). > > I think a lot of people come to rails because they consider it easier. > I've heard people come to ruby because of rails. That's an argument > that disappoints me; ruby is an excellent language and deserving of more > credit than just rails. > I came to ruby because of ruby but found rails to be almost as fundamental as a linux kernal in a gnu system. > Not being a rails user, the next paragraph may be wrong. > Rails is a framework for web application development. Personally I > don't like the cost of running rails. I agree totally. And you are wrong a little about Rails because it really feels more like a religion that a application architecture the way some people take about it. > I understand it does run as its > own server. And code written for rails will not translate because it > relies upon the framework. Furthermore you have version to version conflicts. > Conversely, code weitten in ruby can more > easily be translated to another language if necessary. This is true to a degree, but their are so many features in ruby that are simple not found in perl/python or php thus any translation would need to find patterns in each language do deal with all the structs that ruby has in it's design, BIG job. > And rails takes > over storage; my impression is that by default it is easy to use MySQL, > but if you wanted to use mongo instead that would be more difficult. > A straight cgi application need not 'connect the dots with shtml.' This > is the manner in which I use ruby. I write cgi scripts that puts html > to the client. And I use ruby's CGI library to read what gets sent. I > don't use rails or shtml. > Thanks very much for your help Mathew. You seem to be in the minority. I would appreciate finding out more specifics of such a setup. Do you have to worry about url's in that do you rewrite to clean up cgi-bin etc. ? Are you on apache, do you use phusion / fastcgi etc. ? Have you done a profiling of ruby in relation to speed ? Thanks!