Live data from Hacker News

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

news.ycombinator.com

31–40 of 104 posts

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

#31
I've built a large application in CakePHP (and had plenty of PHP experience before that). For most things, it worked well. Last week, I started doing RoR again (after a couple of years), and it beats the hell out of any other ecosystem for webdevelopment. Ruby is (for me) a much better language than PHP. I've done a lot of Haskell, too, and Haskell is even a better language than Ruby, but doesn't have the same amount of web developers.

What's nice about Ruby is that there is a huge ecosystem. Ruby on Rails is already very complete (especially compared to PHP). There are a lot of plugins for Rails that add the functionality you want. For example: adding image uploads (including thumbnail generation) was about 15 minutes of work, adding comments to my models too, and voting on models/comments was also done by installing a plugin. In PHP, there's a lot of code available, but most of it doesn't integrate automatically with other code.

I think that the amount of smart people that are working on a language/framework is very important. In Haskell, for example, there are not too many people working on web frameworks, and there's still a lot missing or broken. In PHP, there are a lot of people working on the language/frameworks, but a lot of the smart developers have moved to other tools, such as Rails/Django/etc. Therefore, I would just follow them and use a framework like Rails.

(A slight warning: this is all very subjective, this post is not based on any objective facts)

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

#33

I've built a large application in CakePHP (and had plenty of PHP experience before that). For most things, it worked well. Last week, I started doing RoR again (after a couple of years), and it beats the hell out of any other ecosystem for webdevelopment. Ruby is (for me) a much better language than PHP. I've done a lot of Haskell, too, and Haskell is even a better language than Ruby, but doesn't have the same amount…

slightly offtopic: What did you use voting/commenting ? When I last looked none of the plugins in that area were maintained

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

#34

My personal opinion is that a project can be language agnostic. You can build in whatever you want. It doesn't matter if you build your app in php, ruby, python, asp or whatever, if you're a good coder you will produce good secure code, if you suck, so will your code. So build in whatever you're most comfortable with and don't pick a language because of a superficial reason.

Maybe the best answer. I would just add, that if you need to integrate with a special system like an already existing business application, just be sure to have a supported set of libraries to access it from within your web application. This is the only constraint that would make me discriminate a language against another outside of the very good points of Tam.

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

#35

I've built a large application in CakePHP (and had plenty of PHP experience before that). For most things, it worked well. Last week, I started doing RoR again (after a couple of years), and it beats the hell out of any other ecosystem for webdevelopment. Ruby is (for me) a much better language than PHP. I've done a lot of Haskell, too, and Haskell is even a better language than Ruby, but doesn't have the same amount…

slightly offtopic: What did you use voting/commenting ? When I last looked none of the plugins in that area were maintained

One of my friends pointed me to this site: http://ruby-toolbox.com/, it's great for finding maintained plugins.

To answer your question: I used thumbs_up for voting, acts_as_commentable for comments, clearance for authentication and paperclip for file uploads.

I found thumbs_up before I knew of ruby-toolbox: I went to the acts_as_voteable github page, clicked on "Network" and scrolled to the right as far as possible. Most rubyists are very active on github, and a lot of the packages are forked.

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

#36

You can just as easily say RoR is slower (than, say, Symfony 2.0 on PHP with an opcode cache) and harder to work with (from a system administration perspective). Take a look down the top 100 website list, and of those sites that are web applications, more of them will be built on PHP than not. I don't think there's even a Ruby application among the top 100 sites except parts of Twitter, but I could be forgetting some…

The problem with this argument is that all of the websites that you mentioned were founded before Ror or alternatives were mature enough. Adam D'Angelo (former CTO of Facebook) said that if Facebook was created now, they would not use PHP (source: http://www.facebook.com/note.php?note_id=137376312958147). I can imagine that the situation is similar with the other websites.

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

#37

Earlier quoted context omitted.

slightly offtopic: What did you use voting/commenting ? When I last looked none of the plugins in that area were maintained

One of my friends pointed me to this site: http://ruby-toolbox.com/ , it's great for finding maintained plugins. To answer your question: I used thumbs_up for voting, acts_as_commentable for comments, clearance for authentication and paperclip for file uploads. I found thumbs_up before I knew of ruby-toolbox: I went to the acts_as_voteable github page, clicked on "Network" and scrolled to the right as far as possible…

Thank you :) I was looking for something that integrates rating (not voting) and commenting in one package. I found this https://github.com/grimen/is_reviewable through the toolbox. But last commit is from 2009. Hopefully someone has forked it or I will have to fix it

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

#38
One nice thing about PHP is that despite its archaism it keeps growing as a language. The 5.3 release alone added anonymous functions, namespaces, consts and many internal improvements. I recently rewrote one of my projects from the 4.x era for version 5.3 and found myself thinking that I don't hate PHP so much anymore. I still don't like it either, but at least I know the language is in good hands anyway.

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

#40

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've run server ops (and do development) for significantly loaded RoR and PHP applications (and still do), and I can say that there is more quality information available for RoR than there is PHP for setting up high scale and stable setups. When setting up a RoR stack, all the information I needed was available, the infrastructure was pretty stable and was easy to debug problems. PHP on the other hand, had close to n…

I highly disagree that PHP has more quality information available than Ruby on Rails. Any time I've ever looked for anything on PHP all I get is ExpertsExchange quality (with the occasional gem on Stack Overflow), but a search for nearly any problem in Rails turns up a multitude of amazing blog posts, Google Groups posts, or gems that solve my exact problem. Failing that, IRC (or just digging through Ruby code which is easier to read than almost any language I have worked with) has been very helpful.
Post reply on HN