From: Marcin Raczkowski Date: 2007-10-02T00:59:36+09:00 Subject: Re: Ruby vs. PHP Richard Conroy wrote: > On 10/1/07, Marcin Raczkowski wrote: >> Hello >> >> My company is trying to get big contract for creating and maintaining >> HUGE website (nation wide portal). We're trying to convince investor >> that Ruby (i don't mean rails) with custom tailored MVC framework is >> best solution, we're going to make prototypes in rails FAST, then port >> heaviest and most frequently used parts to my custom framework, rewrite >> AR into tuned SQL queries etc. > > Why is this a good idea? why not? rails is easy to prototype but is painfully slow and hard to optimize, i know caching is going to play huge role but optimized complex sql queries are also important > >> investor was quite impresed with speed of development but of course >> there's trouble in paradise .. he hired a consultant :/ - this guy AFAIK >> did lot's of work but only in PHP and he is trying to convince investor >> PHP is way to go. > > PHP beats Rails in certain aspects; for instance if development of the > site is seasonal in nature, as opposed to continuous, the customer > is likely to be hiring as they need. The large availability of PHP > developers plays in its favour. > possibility of continous development is one of strong points of rails, and that's why i'm advertising it, code writen by that large group of php developers is usually unmaintainable. I had plenty of expirience with php and i know how strangely can be php written, and rails forces good practices like MVC, and ruby i much cleaner langue then php to begin wth >> could you please help me find some benchmarks comparing speed of PHP vs >> Ruby (especially YARV/JRuby, if ound some benchamrks that show Ruby is >> slower in interpreter), mayby comparsions of security(in Rails it's >> preatty imposible to do sql injections if programmer is carefull enought >> to use properly constructed queries). > > Well none of that is true, or really important. Sure its easier to secure Rails. > But if you are making a large nationwide portal (I am going to assume that > that means you have high activity) then the performance of your rendering > component (PHP or Rails) doesn't actually matter. if it's easier to screw up in PHP with security, then here it's REALLY important, try to imagine hacker group logo in something like msn/yahoo main page > > PHP isn't exactly assembler speed itself. Ruby is in the same league (slower > with 1.8, faster with YARV). There is a reason that PHP is a central component > in a LAMP stack - probably the solution of choice for websites with high user > load. In principle Ruby can do the same, in practice we have only had > about 2 years > as a community to get big Ruby sites up. You also have an equivalent ASP > stack based on windows components. what is the reason? php was never solution of choice for high-load or professional websites, it was promoted becouse suposed ease of use and installation > > All of these stacks are glued together with languages that are at least an order > of magnitude slower than Systems languages like Java. > >> also I'm open to any arguments(preferable documented, with showcases, >> and understandable by investor(who never had much expirience with >> computers except for e-mail and www)) that would help convince him that >> ruby is much better then php :) > > There's plenty of sites out there doing pretty heavy stuff with Rails, > but beyond > Rails there is not much evidence that shows pure Ruby custom web solutions > to scale. Rails has a lot of features and best practices built in to > help it scale. > In a pure Ruby solution you are committing to re-writing all of that > from scratch. any examples? i know google is starting to use Ruby. thanks for your response, it rises valid point that i have to think over