Re: has anyone made an all-Ruby website? how'd it go?
Paul Vudmaska <[email protected]>
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Ruby Baby wrote: >I run a website that's all PHP now, but was due for >a total re-write anyway. (The old code is a mess.) > >It's more MVC style - where the code comes first and >outputs HTML from templates - NOT embedded code inside HTML. > >I love Ruby so much that it's very tempting to write >my new version in Ruby (mod_ruby + Apache). > >But I wonder if anyone who has already done a whole >interactive website in Ruby/modruby could share their >experience with it? > >Were there any featured you really missed or any surprise >problems? Would you recommend it for someone else? > >I know the question is vague, but I can't tell if I'd >be making a big mistake by trying it this way, especially >if I didn't realize until I was a month into it. > >Thanks! > > > > I'm using mod_ruby on 5 sites now and counting. Each of these sites is for one customer so far(besides my own). All the sites run from one code base for user and content mgt (and other modules such as calendar, faqs etc). This has been a heck of a time saving design desision and mod(ruby) has been up for it - tho I hit some pot holes. shared space - i ran into that one with someone who had modified a library class(session ) - took some time to figure that out and almost ran me off to be honest. Prefix all classes. Use as few names in the global space as possible. Class everything. Think about moving some classes - say session into your own space and qualifieing your path. require vs load - in development you definately want to use load(from my experience). This forces your files to load every time. Otherwise mod_ruby tries to cache them. This can lead to some hairy/intermittant problems(perhaps this problems was exaserbated since since they were used across many sites[with different configs]). I've chosen to load everything - and all has been good since. I'll change that at some time in the future to see what happens(changing one flag) or if performance becomes a problem. CGI - can be kind of non-intuitive at least for me but after some hurdles all is good (using cookies, simple sessions and upload) database access - simple!!- the dbi interface just blows away everything else i've used (php,ms ado) -it is definately databases the ruby way. spend time /working /and not in the docs. for more sophisticated querys use postgre(instead of mysql) - without changing code thanks to dbi (i've only used mysql so far but have some reason to consider postgre). Its nice to have the choice. xml - much like databases above- using rexml is great. The biggest question in my mind are scalability and the fact that mod_ruby has shared space with other sites. Oh and also, the fact that ruby is relatively obscure. I'm doing full time contracting and looking for a real job. I have ruby on my resume and folks say...what have you been doing the last 6 months...i say ruby...they say ....huhhhh??? So i've taken to learning .net and hope to get a couple of certs -if only to make some potential employees happy. I think .net is kick ass, to be honest. Given the choice - simpler is better tho. :P