Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't want to be inflamatory, but:

PHP has already been replaced by Ruby/Rails as the good thing that should be used for new projects. Only PHP developers don't see that.

You lost me when you tried to argue that ORMs are not useful. Its easy to see why PHP developers think that, though.



You're being inflammatory. Rails has nowhere near the install base that PHP has, and furthermore, it's a framework, not a language, so the comparison is unequal. Further, setting up and installing Rails is nowhere near as frictionless as installing, for instance, CodeIgniter. Until that can be said, Rails is not a viable alternative.

I'm all for a PHP alternative. I use it because it's ubiquitous, but I have no love for the syntax or the internals. But the only way you can compete with it is to have the same kind of momentum mixed with the kind of frictionless use that comes standard.


If installing Rails (or Flask, or whatever) isn't trivial compared to the difficulty of writing the actual code, then either your project is a toy, or your web host needs to get its act together.


I take it you have never tried to get major changes to core server infrastructure approved at large bureaucratic institutions. Writing your code in php is often orders of magnitudes faster, easier and cheaper than getting a decent RoR setup installed.


That's your experience, and highly subjective. And yes, I deploy code to dozens of enterprise servers for a global company. And that company is looking into Rails, not PHP.


My point isn't so much rails vs php, but about the non-technical difficulties in getting major infrastructure changes done (especially if it's for a minor project) . I'm sure it'd be equally hard to get a ASP.NET MVC stack set up at a company with a big RoR setup already in place.


Looking into rails? What are they using currently?


.NET, like most enterprises, afaik.


major changes to core server infrastructure approved at large bureaucratic institutions

It sounds like you've already lost.


How so? I find out what I have to work with, work within the limitations set, deliver what the client asks for (if I feel it can be done in a reasonable way) and collect my paycheck.


I didn't mean to be so snarky, I was just projecting. I personally don't have the patience to deal with organizations like that anymore. Life is too short and they aren't the only source of paychecks that I can find.


Let's be clear, we're talking about popularity here. We're talking about the massive popularity of Wordpress and Joomla, of which no Rails project can match. We're talking about the fact that most websites on the web, by that standard, would be "toys". But that doesn't matter, because those toys are what power the web. Not everybody is Facebook, not everybody is looking to secure VC, not everybody is coding their own site.

In fact, I'll go so far as to say that what you're saying is indicative of the kind of out-of-touch response that keeps any of the proposed alternatives from replacing PHP.


I was not talking about popularity, I was talking about mindshare, two very different things. If you're talking about popularity, Java, C and C++ are more popular than php, but I don't see you pointing them as viable solutions. tiobe.com


but I don't see you pointing them as viable solutions

Java, C and C++ are viable solutions, due to their popularity.


As the author points out, Rails is a framework and PHP is a language. There are countless (great) frameworks for PHP - my current favorite is Symfony 2. And PHP developers do in fact know and value ORMs, hence the existence of Doctrine 2.


Because all projects are CRUD apps?

You aren't going to convert the masses of php hacks with an opinionated and rapidly changing framework like Rails. These are people who still mix logic with templating and you want them to learn an ORM, Coffeescript, Sass and Moustache?

> You lost me when you tried to argue that ORMs > are not useful. Its easy to see why PHP > developers think that, though.

Really? So the object-relational impedance mismatch problem isn't real? You lost me when you completely ignored the real engineering trade-offs involved in choosing abstraction layers like an ORM. Its easy to see why Ruby developers think that though.


There are problems with ORM, but there are much larger problems with PHP+SQL. Most of the problems created by ORMs are easy to workaround, though (to the point of having to write SQL sometimes), while problems created by SQL only are not (like n+1).


I will argue that ORMs are not useful to the majority of good developers.

The PHP app I am currently saddled with generates anywhere from 100 (absolute minimum) to 40,000 MySQL queries on every single page view thanks to a developer who didn't know what ORMs are for and was clearly behind the curve when it came to architecting scalable applications.

I have never seen a PHP application abuse a database connection so thoroughly in my life. If he had just stuck to a nice, lightweight PDO wrapper and been able to craft some decent SQL statements, we wouldn't be rewriting this thing right now.


If you have unlimited hardware at your disposal, work on projects where a slightly faster development for certain, specific cases can be obtained, or work on projects of a size that can be managed by the performance of a single machine, sure. If not, R/R isn't replacing PHP.


Rails doesn't really need that much hardware, that's a very common misconception. PHP is not the fastest thing in the world either, unless you go with a compilation cache server. Rails can be easily perform well under single machines. I have VMs with 512Mb of ram handling thousands of users per day with Rails with no problem.


Of course, it's not like a modern first person shooter or anything. My point was that on one and the same machine, PHP gets a whole lot more done per portion of computer power than Ruby does :)


As a Python developer in SF, I can 100% agree with this. Ruby/Rails has replaced PHP for almost the entirety of new projects going forward out here — at least with the developers I know and respect — and Python makes up the rest.


So by looking at a tiny subset of programmers (those that you respect), of a tiny subset of programmers (those that you know), of a tiny subset of programmers (those in SF), you feel you can say something representative about programmers and programming as a whole.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: