PHP like JS is popular. No question about the fact that you can do great things in PHP and that great things have been done with it.
I appreciate all bootstrapping courses that teach programming.
That being said, your post does not demonstrate anything.
Saying “But when written properly, following methodologies such as DRY, SOLID and MVC” is not a valid point. Simply because :
PHP is fast fo pick up, has a model that fits fine with the HTTP protocols ( stateless request / response), can be run everywhere, have great frameworks and a great community. I think that to begin with PHP is not a bad choice, especially if you aim at being operational fast.
However PHP7 does not fix PHP, it helps but it does nor fix it. Yes it is broken : eev.ee/blog/2012/04/09/php-a-fract...
In the space of distributed application, PHP lacks maturity compared to Java (jvm rocks) by example, in the space of concurrency and parallism, there are also better choice.
In short, yes PHP is not dead.
Statistics don’t say that it’s a good, just that it’s there.
Yes every languages have flaws but very few have flaws like PHP (where is PHP 6??) which are important to know.
It does matter for those who plan to work in challenging environments in the futur.
(Edits some mistakes)
My question is if those patterns are not valid, what is a verified method? Your response did not give an apparent valid method that you are seeking as an example. I'm curious because I use MVC and design patterns as a base of understanding and translating a system. Or what do you mean by validity?
I also think every system is broken. Every framework is broken, but it does move us forward from where we were before sometimes, too.
Systems are inherently, just like humans being perfectly imperfect. :)
I liked reading your response as it was well written and gives me room for thought. Thanks!
Thanks for the appreciation :-)
Before replying, I just want to say once more that I find the initiative which allows someone to get a job, to be a good thing, using PHP or whatever.
My original reply was to demystify the idea of the bad press against PHP, is being done by programmers with bad practice.
I agree that every system in general, like everything humans do, have flaws. Perfection is out of this world, to keep trying is part of what makes thing better. Another part is letting things go.
We do not know, how to let go in our industry, so we often debate / rant / troll over things, over and over. I find that most of the time it comes down to the idea of: Cost vs Benefit.
I called PHP broken, because of the cost of these points:
PHP is only relevant by its market share, which is reason enough, to being taught (imho) and use but hardly qualify the platform as relevant in itself. PHP7 brings no innovation or game changing feature whatsoever. NodeJS does for example, despite its flaws (still not my thing though), like the way it solves concurrence issue while focusing on performance.
One can argue that, PHP is still fine for small things. I do agree on that.
About MVC or Design Patterns in general, I got no issues with those. However, it’s important to remember that Design Patterns were presented with use case scenario and the cost of using them.
I found useful to read / overview original papers on those subject, you often find little details which changes your perspective. This article about MVC, is a good example, of what you can get when you dig on this: badoo.com/techblog/blog/2017/06/15...
So, in short my point was not about MVC in itself but about the fact that MVC does not guarantee good software. Saying that if I write a piece of software properly using MVC, does not mean that if MVC is used the software has been written properly, neither does it define the term “properly”.
Writing software is hard, that is why good code is rare and that is also why, tooling and the platform being used are as fundamental as using patterns / skills and understanding architecture.
Without knowing which problem is being solved, in which context / constraints, it’s better not to make a statement about any piece of code in my statement.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.