Live data from Hacker News

Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

news.ycombinator.com

1–10 of 104 posts

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#2
While RoR is getting better in this respect, PHP is vastly better documented (both officially and all throughout the web) and the community is (at least, for now) superior to RoR. This is something that simply requires more time for RoR, as PHP has had quite a few years head start to get to where it is.

In practice, it honestly boils down to what you're doing and what's easier for you (and your team). If you want to test the waters, follow a few tutorials for each that you're unfamiliar with, and see what suits you better.

If you're using a shared server, you also have to make sure that your host supports RoR (most hosts don't). So that could be an extra expense to consider.

Me personally: I'm a php person. I prefer PHP + CodeIgniter, and I'm all happy :) RoR is fine and dandy, imo, but wasn't worth 9 years of PHP experience when PHP works amazingly well for everything I've ever asked of it.

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#3
It all comes down to the code. Good code in a bad language is better than bad code in a great language. The nice thing about RoR is it kinda forces you to do a few 'best practices things' so even newbie developers tend to end up with 'ok' code. Of course, there are many PHP frameworks that also apply this sort of way of coding.

Also, note that there will be a learning curve (probably small, but you will notice it) when you first start learning rails. Like all new languages, you'll overcome this eventually.

There is really no reason to choose one or the other. You basically already know the answer. Whenever people ask me this question I say 'What do you think the pros/cons are for each language?' and then right after they list them I say 'ok, pick one'. This is really not a subject worth dwelling on with established languages/frameworks.

PS: If it were me, I'd choose RoR :)

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#4

While RoR is getting better in this respect, PHP is vastly better documented (both officially and all throughout the web) and the community is (at least, for now) superior to RoR. This is something that simply requires more time for RoR, as PHP has had quite a few years head start to get to where it is. In practice, it honestly boils down to what you're doing and what's easier for you (and your team). If you want to…

In practice, it honestly boils down to what you're doing and what's easier for you (and your team)

That's definitely a huge consideration, especially the team part. Plus, you're going to have a much easier time finding PHP developers than Ruby developers.

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#5
PHP is not equivalent to Rails. It would be more accurate to compare PHP to Ruby and compare Rails to a PHP framework like Kohana.

I've worked with both Kohana and Rails. Rails is more popular so it is easier to find solutions and add-ons. However, it does a lot of things by 'magic' and a beginner will have a hard time modifying rails source or creating a gem (if they want to do something non-default). Kohana on the other hand is easier to understand, extend, and modify, because the entire source is in your project folder as PHP code.

Good luck!

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#6
I have been doing RoR for over three years now and absolutely love it. A few things make it great

* The best practices are well documented and if you follow them, you are gonna end up with good code. Good code helps you iterate faster (and with more confidence) and thats crucial when building a startup.

* There is pretty good documentation available and tons of great books that you can read. Also with every release, it gets easier to do things in Rails. Ofcourse you should have test coverage to make sure that you can upgrade rails easily. This basically boils down to the first advice about following best practices.

Basically to get most out of rails, you have to buy their philosophy and follow the best practices. If you do, you can be assured of great productivity and programmer joy :)

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#7

While RoR is getting better in this respect, PHP is vastly better documented (both officially and all throughout the web) and the community is (at least, for now) superior to RoR. This is something that simply requires more time for RoR, as PHP has had quite a few years head start to get to where it is. In practice, it honestly boils down to what you're doing and what's easier for you (and your team). If you want to…

I disagree with the documentation point. Type in any Ruby class whether it's a standard class, something from Rails, or a gem and you'll find a community run rdoc page with a ton of information on it.

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#8
Absolutely. The point has been made here already, but PHP + (Framework of your choice) + MySQL can still be used to produce great web applications quickly and easily. My framework of choice happens to be Symfony, but there are many good options. I also really like Compass for CSS and Capistrano for deployment (both borrowed from the Ruby folks) and that's fine too; they don't require any server-side Ruby support to be useful.

I would argue that a lot of the frameworks seem to be converging in ideas and functionality and borrowing heavily from each other, so whether you use PHP/Symfony, Ruby/Rails, Python/Django or whatever you probably will have more shared core concepts across them than differences. I think that a more interesting question would be "Is PHP/MySQL still practical for building web applications if I don't use a framework?" And the answer there is "that depends..." :-)

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#9
there is another comment that speaks to this ("it comes down to code"), but i'd just like to say - use what ever you can to get the job done, then think about porting/optimizing/frameworks...

TO the question at hand - Yes - php and sql can get the job done... i mean are you building it for 1,000 users? or 100,000? php and sql can handle both...

Code tight and code well, tell everyone else to go to hell

Re: Ask HN: Is PHP/MySQL Still Practical for Building Web Applications?

#10
post #7

While RoR is getting better in this respect, PHP is vastly better documented (both officially and all throughout the web) and the community is (at least, for now) superior to RoR. This is something that simply requires more time for RoR, as PHP has had quite a few years head start to get to where it is. In practice, it honestly boils down to what you're doing and what's easier for you (and your team). If you want to…

I disagree with the documentation point. Type in any Ruby class whether it's a standard class, something from Rails, or a gem and you'll find a community run rdoc page with a ton of information on it.

An rdoc is only as useful as it's included use-cases. About the best thing about PHP is the fact that there are zillions of included comments on the php documentation pages. While most are not at all what should run in production, a single good comment can give you a lot of insight as to how to use some code.

Tests != actual usage.

This is actually why a readme for a gem, plugin, extension, module etc. is so important, and why I think Github has been good for the developer community at large.

Post reply on HN