Live data from Hacker News

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

news.ycombinator.com

81–90 of 104 posts

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

#81
I am a 15-year veteran of PHP and am still using it to build apps. Why? Because I have 15 years' of experience, and nothing surprises me anymore. I can fix nearly any bug in a very short time. Also, it's fast, mature, proven, and rock-solid, and I don't spend much time worrying about the surrounding infrastructure.

I haven't switched to Ruby personally yet because I am too busy to worry about having to spend hours/days dealing with issues that are new to me. OTOH I am allowing developers on my team to found new projects in Ruby since they already know the stack and I certainly have no aversion to learning new things.

PHP isn't a great language for applying the latest metaprogramming techniques and other modern patterns that make life easier. Although PHP 5.3 makes that much better with the addition of lambda, it's still tough to do certain types of patterns or write easily testable code in some circumstances. Mixins are also still a bit tricky since there's no language built-in for doing them.

However, some of the RFC's on grafts and traits are very promising in this regard, and frankly I think these patterns are better than doing the same in metaprogramming b/c the compiler can help you instead of delaying all errors to runtime.

In any case, if you don't already have lots of PHP experience I would recommend choosing a different language to build your knowledge base on. Ruby, python, clojure, javascript any of the other "hot" languages of today that attract lots of attention and offer a clear path in the future built on a solid foundation.

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

#82
post #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 somethi…

FYI, your English looks rather good for someone who's learning it. The only real issue I saw is how you make almost every sentence into it's own paragraph.

Thank you for your tip. You are right my comment has to many paragraphs in it and they are often misplaced. I will try to improve that.

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

#83

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.

"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."

Can we please link to this in every new language discussion/flamewar?

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

#84
post #60
post #55

Earlier quoted context omitted.

kohana 3 is more like RoR for PHP, CI is like RoR for PHP4 :)

Seconded, Kohana really wipes the floor with CI nowadays (this from someone still forced to maintain a couple of CI-based sites...) :P

I like Kohana much more than CI, if only for tossing PHP4 support.

However, but I've found that there is lots of fragmenting in the community/documentation. See the differences between 2.3.4 -> 2.4 (lots of breaking changes) -> 3.0 (almost entirely different framework). Which is kind of a bummer when using it for long-life projects (we have a few projects are stuck on 2.3.4).

That said - Symfony 2.0 looks fantastic, and very much like the next "Rails-like" PHP framework.

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

#85
yes. languages are tools. use what you need to get the job done.

if you know PHP and C, it'll be much easier and faster for you to build your startup with PHP and C, instead of toughing it out learning RoR enough to get things done. perhaps RoR is "faster" and "easier", but it won't be faster and easier for you until you're competent with it, and that takes time.

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

#86
post #14

Earlier quoted context omitted.

Whilst you may have an easier time finding PHP developers I actually think it is harder to find good/great PHP developers in comparison with Ruby devs. The reason for this is that Ruby/Rails development seems to focus more on TDD, CI, logic/display separation and other good practices, where as PHP, being older, hasn't traditionally had this approach. Having these practices at the core of what you do (IMO) makes you a…

It's hard to find good/great developers period and when you find them language is rarely a concern. It's easier to find PHP developers though and dispite wanting to you'll never get to staff your team with just great developers once you grow over a couple people. Say you have a job posting and you get 100 php developers and 5 Ruby ones. Of those 5 ruby ones 3 will people people who watched the screen casts. 2 will be…

From my experience, a good way of weeding out the 50 horrible php programmers, is to ask about (even simple) OOP.

Then to differentiate Junior from Senior just ask them what testing tools they use (testing is not [as] ingrained in the PHP community [yet]). If they can talk intelligently about PHPUnit, mocking, etc. they are more than likely senior level, or at least passionate enough to learn more than most PHP developers.

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

#87

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…

There are major Ruby Apps out there in the top 100: http://rails100.pbworks.com/Compete+Rankings

hulu.com yellowpages.com

also major sites: like justin.tv. slideshare etc

The argument that "Ruby cant scale" just doesn't hold. Check out Ruby EE by passenger.

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

#89

If you are a software entrepreneur as opposed to an individual coder, one of the things you have to consider is how easy it is to hire someone who knows the platform or language you've selected. It's a fact that in the US and around the world, PHP developers outnumber Ruby developers by a significant margin, probably at least an order of magnitude. In some ways, this may seem like an unfair comparison (by way of anal…

But you have to ask yourself what your new hires are going to be bringing to your company? Are you going to be hiring dinosaurs or mammals?

I'm not sure what this means, but I think it reflects an incorrect bias that everyone you ever hire must necessarily be "plug and play". This assumes that humans are not educable which is not the case with the possible exception of certain conservative legislators.

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

#90

Earlier quoted context omitted.

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

Abandoned gems is one of the biggest problems I have with Ruby. Rubygems is starting to look like CPAN, which makes my sysadmin life hell.
Post reply on HN