Re:Will Rails be the new PHP
by up_and_up on Friday October 05, 2012 @11:03AM
(#4617160)
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.
Re:Will Rails be the new PHP
by ericclemmons on Saturday October 06, 2012 @01:04AM
(#4619854)
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.
Re:Will Rails be the new PHP
by dkannan on Monday October 08, 2012 @03:08AM
(#4625826)
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
Re:Will Rails be the new PHP
by ericclemmons on Monday October 08, 2012 @10:15AM
(#4626917)
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!
Re:Will Rails be the new PHP
by chaostheory on Friday October 05, 2012 @11:43AM
(#4617316)
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.
Re:Will Rails be the new PHP
by chaostheory on Friday October 05, 2012 @04:47PM
(#4618616)
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.
Re:Will Rails be the new PHP
by drbawb on Friday October 05, 2012 @05:22PM
(#4618737)
>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.
Re:Will Rails be the new PHP
by chaostheory on Friday October 05, 2012 @05:31PM
(#4618775)
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.
Re:Will Rails be the new PHP
by hcarvalhoalves on Friday October 05, 2012 @05:28PM
(#4618765)
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.
Re:Will Rails be the new PHP
by slurgfest on Friday October 05, 2012 @01:04PM
(#4617678)
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.
Re:Will Rails be the new PHP
by trevelyan on Friday October 05, 2012 @10:49PM
(#4619580)
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.
Re:Will Rails be the new PHP
by slurgfest on Wednesday October 10, 2012 @11:28AM
(#4636731)
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.
Re:Will Rails be the new PHP
by countessa on Friday October 05, 2012 @11:19AM
(#4617234)
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.
Re:Will Rails be the new PHP
by kidh0 on Friday October 05, 2012 @10:30AM
(#4617008)
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.
Re:Will Rails be the new PHP
by kidh0 on Friday October 05, 2012 @01:23PM
(#4617762)
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
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.
* 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.
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
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!
other than that, 1. write tests 2. good community. for some measure of good
Perhaps so, but as with Python that way changes over time.
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.
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.
> 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.
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.
https://github.com/oscardelben/words-about-code/blob/master/...
I'm not sure what this is a sign of, but I find it hilarious.