You know what I like is jquery
I still love PHP and JavaScript
391–400 of 402 posts
Re: I still love PHP and JavaScript
#392Earlier quoted context omitted.
Wordpress is just bad. PHP is leader in CMSes but the old ones Wordpress, Drupal have to support so much legacy stuff. Including wierd patterns hand hacks from the past. Modern CMSes like Craft, Kirby, Twill, Bolt, October… it is very different story.
WordPress is great, they maintain backwards compat forever. Same reason I like PHP and can't stand working with NPM. I'm sure the other CMS are fine but I want my site to auto update itself and all its plugins for the next 20 years with me hardly touching it.
Reality of that is that most people will use some plugins or their theme wont update or your code will have breaking change.
The auto update is nightmare. Because so many people are trying to hack WP you gotta do it and every other update becomes stresfull event. Good luck updating someone elses plugin.
Much higher chance of website working 20 years is - take simple preferably file based system. Make manual update every 5 years. If its good system then the migration will be well documented and painless probably taking 5 minutes.
Re: I still love PHP and JavaScript
#393I love to hate PHP. From a design perspective it is pure garbage. It allows you to do so many basic and stupid mistakes which better language design could have prevented.
Re: I still love PHP and JavaScript
#394I kinda like js but hate php with passion. Having said that php has one really very big thing going for it - people who use it are simply addicted to getting things done.
> Having said that php has one really very big thing going for it - people who use it are simply addicted to getting things done. does that mean every other language the people don't get anything done?
Re: I still love PHP and JavaScript
#395Re: I still love PHP and JavaScript
#396Earlier quoted context omitted.
> That is a ton of wasted work, and there are literally sections in the PHP docs about tools to circumvent this problem.[0] Install opcache, done. No need for hyperbole.
Good to know it's that easy. Do you ever run into race conditions? And how does it handle cache coherency?
Re: I still love PHP and JavaScript
#397PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…
> - no "unknown unknowns". it's so tried-and-true, there's no surprises This part is laughable. People who have been programming PHP for 20 years (several of them at my company) still routinely discover hidden bugs, quirks or general behavior that is totally unintuitive and nowhere found in the documentation.
Re: I still love PHP and JavaScript
#398Earlier quoted context omitted.
- it's stateless by design (much easier to scale) That's sort of true, but the default state mechanism (session files) doesn't scale well, or even work across load balancers that don't maintain server affinity for each client. Scaling a PHP app isn't hard, but it can be non-trivial if you've written the code without considering scaling. Other serverside scripting languages (Python, Ruby with Rails) nudge you in the r…
It's trivial to configure PHP to store sessions in redis.
Re: I still love PHP and JavaScript
#399Earlier quoted context omitted.
> PHP was really nice to get into programming and make a spaghetti website Facebook manages quite well with PHP. Maybe it's your fault you didn't learn how to use modern PHP practices which have been well-documented for over a decade now.
>> Facebook manages quite well with PHP. I didn't say you can't make it work. You can build great stuff using just bash scripts. I'm pretty sure you can have success with any programming language. That doesn't mean it's the "best" way to do it. >> Maybe it's your fault you didn't learn how to use modern PHP practices which have been well-documented for over a decade now I doubt it's my fault. I'm not "special". I thi…
Not in 2022. I avoided PHP for a long time. I got back to it and found that the Internet and books are full of best practices and I have not had an issue with documentation either. Would you please give me an example of how PHP is more prone to bugs vs. other languages in this area? I have found it to be really difficult to write buggy and insecure code. For example if you have not heard of PDO and you do not prepare, bindValue/bindParam, and then execute, that is your fault (make use of filter_input() as well!). It is advised literally everywhere today. Regardless, my return to PHP was pleasantly surprising. I finished my project pretty quickly and I have not used any frameworks. Security vulnerabilities? Perhaps, but so far so good. We will see. I tried my best and I have done my research. Every time I mention that it is written in PHP, people frown because they are stuck at PHP 5 or so. That said, subpar defaults in php.ini is still a thing though.
Re: I still love PHP and JavaScript
#400Earlier quoted context omitted.
>> Facebook manages quite well with PHP. I didn't say you can't make it work. You can build great stuff using just bash scripts. I'm pretty sure you can have success with any programming language. That doesn't mean it's the "best" way to do it. >> Maybe it's your fault you didn't learn how to use modern PHP practices which have been well-documented for over a decade now I doubt it's my fault. I'm not "special". I thi…
> I doubt it's my fault. I'm not "special". I think PHP is prone to bugs and bad practices both due language design and bad documentation. Not in 2022. I avoided PHP for a long time. I got back to it and found that the Internet and books are full of best practices and I have not had an issue with documentation either. Would you please give me an example of how PHP is more prone to bugs vs. other languages in this are…