Hacker News new | ask | show | jobs
by darrelld 3509 days ago
jQuery might not be the fancy new hotness on the block, but it still works and is still used.

I get the feeling more and more that developers are embarrassed about using it, similar to how some devs are embarrassed about using PHP, yet it's still a workhorse.

2 comments

It's really silly that is how the culture behaves. The right tool for the job is a common moniker in other industries, yet in ours its the source of heated debate and hipsterdom.
PHP is some tool that was never really good, but had some compelling features that no other tools provided. Except that now there are better tools for any task it solved, excluding the task of "maintaining a PHP codebase".

If you are starting a new project on it, you should indeed feel silly.

I disagree, -- sure if you're building native php apps w/out a framework.. but Laravel is probably the easiest MVC framework out there to pickup and build something that works super fast without having to know how to deploy a VPS, etc... For small to midsize php is STILL a workhorse -- but I wouldn't recommend wordpress or vanilla php themselves.

Laravel collections alone make it almost a functional language when using it w/ laravel.

Have you looked at the PHP landscape over the past few years? You may still not love the syntax, but PHP as a language, an ecosystem, and a developer community is extremely strong. It's a fantastic choice for a web app in 2016.
Honestly, no, I haven't look at it in the last 7 years. (It's being that great! Thanks for lighting-up my day.)

Also honestly, I don't think I should look now. The PHP applications I see around are still the ones getting serious vulnerabilities found every week, the same ones that other communities found ways to pack the solutions into tools and conventions that are easier to use than not to. I also don't see anybody claiming PHP has any new template system to replace the dated original one.

I've seen some progress on the language, but not nearly enough to make it compelling. I have plenty of stuff already on my ToTry list, PHP would have to say something better than "I'm not a complete mess anymore" to enter it.

You can of course choose to still avoid it - but your advice to other devs to do the same makes little sense. It's a completely different beast than it was 7 years ago.
Do you know of any compelling reason, instead of problem fixes?

Because the language is a bit archaic (has maintainability problems for large codebases, has the "too little power" problem for small codebases); as far as I have looked, the ecosystem still does not include a good templating system (although it does include most of the tools available on other web ecosystems); and the community is still heavy on applications with the same kinds of security bugs they always had, and many, many "X-only" developers.

And, anyway, fixing those outstanding problems can only make it an ordinary language. And there's no reason to look at any language that the best claim is "it's not worse than any other random language".

I disagree. Let's try adding 0.2 and 0.3 with the JScript library of your choosing and see if it's any easier than PHP.
Javascript being bad does not make PHP any better.

There are more than 2 languages available for backend programming. Some even get both templating and IO right.

Floating point math has been around for a very long time, I don't get why that's what you would pick as a problem; a lot of languages have the same behavior. I'm not a fan of JS either, so you don't have to give me a reason to dislike it.
I wasn't necessarily giving you a reason to dislike it. I was giving you a reason why I personally believe it to be over-hyped and convoluted (and why I disagree that PHP is embarrassing by comparison).

I picked floating point math as a problem because JScript would give you an incorrect answer.

PHP should be significantly more embarrassing than jQuery. The jQuery interface is well designed and reliable.

The fact that it still works is important. As long as I've got clients asking for IE 8 support, jQuery's going to be in my toolbox. And probably even after.

Ouch. PHP dev here. We write design-pattern-influenced code with classes, abstract classes, DI, interfaces, etc. It's not all bad.
You know, it's been well over a decade of seeing the anti-PHP stuff and I still have yet to see a "PHP is evil" argument that doesn't fall apart after a little scrutiny. I proudly use it and am happy to look at it's usage vs. alternative languages in any of the real-world projects I've developed.
React (plus a couple shims) works great with IE8 up until v15.
PHP has a renaissance now, nothing embarrassing at all.
$Do $you $still $need $dollars $everywhere?
Of course, we don't code for free.