
Will Rails be the new PHP - mikegirouard
http://roytomeij.com/2012/will-rails-be-the-new-php.html
======
MattBearman
As someone who started life a PHP dev and is now a Rails dev I'm gonna go
ahead and say no.

Rails pretty much forces you into using good practices, where as PHP (without
a framework) allows you to do all kinds of stupid shit.

If anything, new devs going straight to Ruby on Rails will actually give us
less shitty developers.

------
up_and_up
I dont think so. Having migrated to Ruby and Rails from PHP there are a number
of compelling differences that will avert the gloom and doom the author seems
to mention:

* Rails is driven/maintained by really high quality developers who adhere to best practices

* The project is well-organized, opinionated and focused, developers tend to follow the one right way of doing things.

* The Rails Ecosystem of gems and plugins has whole gamut of solutions to various engineering problems. These gems vary from excellent to horrible, with the excellent ones floating to the top and become standard for use.

* Rails encompasses best practices that were learned from years of making mistakes with PHP and Java development. It is that much more evolved as a result.

In general, I would say the main difference is Rails seems more top down in
the direction of ideas and best practices. People tend to mold themselves and
their code to fit with the best practices displayed by core or by seasoned
Ruby developers.

PHP on the other hand seems more like a free for all, with little top down
influence at all.

~~~
ericclemmons
Find/Replace "rails" with "Symfony" and you'll have the PHP equivalent. Also,
"bundles" instead of "gems". This is why PHP negativity has been increasingly
misguided for the past 2 years.

~~~
dkannan
most of the PHP devs i know write raw PHP. they do not use a framework. one
team built their own (4 years back). And NONE of them wrote tests. Actually i
have never seen or heard any php dev writing and evangelizing tests

In ruby, mostly everyone i know, uses rails and mostly everyone writes some
test. either TDD or after writing the code.

It is not as bad as PHP but personally even for me, i should write better
rails code

~~~
ericclemmons
That's exactly the point I was making. Symfony developers are similar batch of
developers like you see with Rails - writes tests, utilizes
frameworks/components, very active in open-source.

Any developer, PHP or otherwise, that knowingly ignores contributions within
the community is dangerous :)

No matter what language you use, you can always write better code, even with
PHP!

------
chaostheory
I think this article makes a really really bad comparison. With both Ruby and
PHP, there are many ways to write something terrible (especially with Ruby's
more than one way to do one thing Perl philosophy). However with Rails being
an opinionated framework, there is typically one really publicized opinionated
way to do one thing (ala Python style). With the opinion coming from good
developers, I don't see quality going down anytime soon if newbies just follow
it. To add to this, a lot of good ruby coders tend to do educational blog
posts, which really helps out the community. Compared to the other language
communities I've experienced (python, java, perl, and php), I think Ruby does
the best on the education front. For now, it's what gives the language its
edge.

~~~
chromatic
_However with Rails being an opinionated framework, there is typically one
really publicized opinionated way to do one thing (ala Python style)._

Perhaps so, but as with Python _that way changes over time_.

~~~
chaostheory
Staying on subject - does it matter, as long as that evolved way remains a
reasonable and good way to develop?

I started with Rails 2.x, and I did find it painful to transition to Rails 3.x
after a few years of not using it. In the end though, I find myself really
liking the decisions made for Rails 3.x. It's helped my productivity a lot.

~~~
drbawb
>Does it matter . . .

To you, no; to me? No.

The same thing happened to me: Rails 3 came along. My web applications weren't
so large that the port would be unreasonable, so I gritted my teeth and came
out feeling like I had gained something. (Knowledge, experience,
productivity.)

\---

For every "you", however, there is someone with a non-trivial Rails 2.x
codebase that simply won't invest the time or energy to port it. So they'll
keep using it; keep developing libraries for it, keep patching it, etc.

Continue this trend, and I'd imagine you end up with something like the
Python2/3 schism.

For an example of what this leads to, look at Rust.

Arch Linux uses Python 3 as the default for /usr/bin/python, Rust (0.3 and it
looks like 0.4) fails to compile because LLVM can't stand Python 3. [This is
described in the Rust 0.4 release notes. Of course the fix is a simple symlink
and an EXPORT= away once you install Python2.]

So you end up with _new and exciting projects_ that require you to install and
maintain old tools and libraries. Why? Because eventually _a non-negligible_
number of library maintainers stop trying to hit a moving target.

I'm not saying Rails will _necessarily_ go down that road; but Python has
already been there, and the Python 2/3 schism isn't pretty. It's a possibility
worth entertaining, anyways.

~~~
chaostheory
You have good and valid points that I agree with, I was just arguing was from
the standpoint of "Rails / Ruby becoming another PHP"

> I'm not saying Rails will _necessarily_ go down that road; but Python has
> already been there, and the Python 2/3 schism isn't pretty. It's a
> possibility worth entertaining, anyways.

I feel the Ruby community is different from Python's. I think people who work
with Ruby and/or Rails like new toys and they are willing to adapt in order to
keep playing. If anything I feel the bigger danger is for Ruby devs migrating
to nice shiny toys that node.js has to offer.

------
hcarvalhoalves
If you consider the majority of new web projects are being made in Rails
rather than PHP, I think the comparison applies.

I think the panorama is more diverse nowadays though. Back in the day, you
basically had PHP or ASP (with Windows hosting being more expensive), and only
higher-end hosting had the option for CGI. Now it's more like an equal split
between PHP, .NET, Java (all frameworks), Rails, Python, et all.

------
sandfox
Will $framework be the new $language? Fairly apple and pears comparison and
somewhat pointless.

~~~
slurgfest
PHP is somewhat unusual in the extent to which things normally reserved for
frameworks are included in the language. For example, PHP comes with a
template language. It isn't so unreasonable to compare these facilities to
analogous ones provided by frameworks.

~~~
trevelyan
PHP has a large number of frameworks that serve the same purpose as Rails. I'm
fond of both Rails and CakePHP, and while there are differences between the
two, talking about how "Ruby" avoids messy code by forcing MVC onto people but
"PHP" doesn't is silly.

~~~
slurgfest
The existence of (say) CakePHP does not affect my point, which is that core
PHP includes a lot of facilities that in other languages are part of a
framework written by a third party, such as a template language.

------
purephase
One very small example of why I don't see a correlation:

[https://github.com/oscardelben/words-about-
code/blob/master/...](https://github.com/oscardelben/words-about-
code/blob/master/2012/04/rails-internals-inside-attribute-methods.md)

------
jeremysmyth
Original article has a question mark at the end of the title, making it easier
to ignore.

~~~
jkap
<http://en.wikipedia.org/wiki/Betteridges_Law_of_Headlines>

~~~
phpnode
really, do we have to beat this horse to death every single time?

~~~
kidh0
seems that everytime that there is a comparison between Ruby and PHP, it turns
to a personal fight

~~~
phpnode
I agree, but I really meant that there's no need for a link to Betteridge's
Law in every single post involving a question mark, it is tiresome.

------
countessa
There are bad coders in ever language/platform....and coupled with that, we
all have days when we write bad code. The size of the community has very
little to do with it I think.

------
vindia
Previous discussion <http://news.ycombinator.com/item?id=4592865>

------
true_religion
The follow ups and updates and TL;DR are beginning to rival the article in
word count.

I'm not sure what this is a sign of, but I find it hilarious.

------
kidh0
Everybody knows that PHP is infected with bad programmers 'cause is an easy to
run language. You have a mac? Just make a .php and you can kill some baby
seals with you lame code.

~~~
hadem
You are making yourself sound like a Rails fanboy with little to no real
knowledge of PHP.

~~~
kidh0
I'm a PHP developer (damn, this sounds like I only use PHP, but it's my
favorite one). I really like PHP, it's easy to learn, easy to deploy, probably
one of the most documented language. But let's be honest, all this easy stuff
brings people with poor or no knowledge. Probably if ruby or python were easy
as PHP to deploy, we probably would see lame ruby and python code too

