4 ms·
Rasmus's point in the article is that as soon as you move away from simple apps under light load into real applications, it is no longer enough just to rely on
by dasil003 17y ago
Rasmus's point in the article is that as soon as you move away from simple apps under light load into real applications, it is no longer enough just to rely on Rails magic.
This seems backwards to me. I consider PHP to be ideal for simple apps. Rails comes with a certain amount of overhead (memory being the most important as far as cost is concerned), therefore I think it's only really useful for applications of a certain complexity. What makes Rails useful are some basic architectural assumptions (MVC + a bunch of low level assumptions / web helpers) that are surprisingly applicable to a large chunk of web apps. The magic is just some Ruby tricks to streamline things, but you don't "rely on it". Where Rails tends to fall down are limitations of the Ruby runtimes, or applications where the web front-end is not a significant enough part of the problem to warrant the Rails approach.
PHP is similar in some ways--it includes many web-based assmptions, but it doesn't make any architectural assumptions, which means there is no way to benefit from common conventions (eg. knowing where to look for a certain file or class definition, what a variable or database table should be named, where is the default place to put certain types of logic, etc). As such, PHP is better than any other raw language for web work, but it doesn't really allow you to easily utilize best practices that we've collectively learned over the last 15 years of web development.
That's not to say Rails is just plain better... to the contrary, I think PHP is a better templating language. The difference is that with PHP you are better off moving to a real language for your back-end on any moderately complex application fairly quickly. Rails, on the other hand, will let a significant portion of web apps (if not a majority) go quite far without any separate back-end.