Live data from Hacker News

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

news.ycombinator.com

41–50 of 104 posts

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

#41

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…

  You can just as easily say RoR is slower (than, say,
  Symfony 2.0 on PHP with an opcode cache)
You can say that, but is it true? I did not investigate it, but the last time I saw some comparison PHP frameworks were horribly slow compared to RoR.

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

#42

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.

There still is the question of how much time you're willing to spend to hunt down bugs in the interpreter/standard library/framework or to work around certain idiosyncracies that once upon a time might have looked like a cool idea. Will a "good coder" tolerate more or less such wtf moments?

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

#46
Lately these questions and discussions are everywhere and most times I think people are missing the point: it's all about code you want to write.

We created all those high level languages to make code easy to read, to make them people understand. I mean you could probably write your website in Assembla but the language won't help you to write down what you really want.

As a developer you are trying to develop something you do not want to mess around with a language. The language you use should help you focus on what you want to develop not distracting you with "ugly" code.

If you understand what the code is doing (even if you coded it on your own you sometimes have to think about what is going on there) it lets you help to focus on your goals.

If you brain works better with PHP code you should probably use PHP as your coding language but if not you should try something else like Python, Ruby or maybe Haskel until you find a language which is boosting you while developing. Don't get me wrong I don't say a programming language should do everything for you while you are drinking coffee. No, it should help you to think better what to implement next and how to implement it. It should support you while reading and understanding.

Again, we only created all those high level languages to make it easier to understand.

And now my standpoint to PHP: I don't like PHP cause it is a noisy language IMO. PHP is not OOP. You can use OOP in PHP 5 but the PHP core is not OOP so this seems weird. Even in PHP 5 you can't get a string length like: $str->length No you have to use strlen($str) and this is ugly.

Also I don't like those "symbols" PHP is using (maybe symbols are not the correct word here but I can't find a better fitting word at the moment). In PHP you have variable names with a $ symbol. Why? I don't know but this doesn't work for human beings cause human brains are assuming the dollar symbol has something to do with money or numbers but in PHP it's not. So you have to getting used to it.

It's really the same with the "dot" symbol in PHP. You wouldn't expect that it's concatenating strings.

Ruby as language is for me like reading a book. For example you can write code like this: if user.has_comments? ... end

That's why I love Ruby and I would prefer working with RoR for my project cause it helps you on rapid development.

One last thing: Ruby lets your focus on what you want to build without noise that's why (IMO) there are so much gems and a really huge community!

(Sorry for my bad english, it's not my primary language. I'm working on it :)

EDIT: corrected some typos.

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

#47

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…

YouTube was written in Python. Just wanted to add a unique (and possibly non-obvious) data point.

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

#49

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…

You can just as easily say RoR is slower (than, say, Symfony 2.0 on PHP with an opcode cache) You can say that, but is it true? I did not investigate it, but the last time I saw some comparison PHP frameworks were horribly slow compared to RoR.

codeigniter is VERY fast, and it doesn't get in your way. codeigniter is commonly referred to as the Ruby on Rails for php by some.

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

#50
Any advise you can get by asking such a broad question, is anecdotal. From a technical point of view, it usually doesn't matter - You can build applications on both platforms. If your application is atypical, there might be a point in picking one over the other, but what really matters is the people that should work with it. If you have php programmers at hand, using php is probably a better idea.
Post reply on HN