seriously? 2020 and you'd pick php for a greenfield project?
and you mention this here, where we're discussing a project that provides: strong typing, typed safe queries, type safe templates, and more.
interesting.
seriously? 2020 and you'd pick php for a greenfield project?
and you mention this here, where we're discussing a project that provides: strong typing, typed safe queries, type safe templates, and more.
interesting.
PHP 8 is due to be released this fall which improves the situation even more.
Symfone is the web framework that had the highest count of contributions over all frameworks in all languages.
The PHP community took a 180 degree turn from the 90's style flat files with a mix of HTML, SQL and code in the last decade. That times are gone (of course that kind of code is still laying around)
For someone who already knows PHP, starting a project in 2020/2021 in PHP is an excellent choice.
I had the same! Then I invested in learning some Haskell/ Elm/ Reason/ Rust/ Kotlin: it changed my preferences for ever. I now look for proper sum types and (pattern) matchers, strong typing discipline and null safety.
While PHP is still a joke compared to even Java which it very hard tries to become (which I think is a good thing), for someone who only knew PHP the entire time, the situation still got much, much better over the last decade...
Almost no one is solving FANG problems, and people literally throw their clients/businesses money away on poor value because they've lost focus on what's important: delivering a solution for what they need right now, not what you want to spend your time playing with.
Also what is the big deal with type safe templates when you're literally just abstracting building HTML strings?
I've heard you can combine React with Symfony, which sounds really cool.
React is not a language. TypeScript is very close to PHP, both in imperativeness, in OO-ness, in did-not-initially-support-it-but-sometimes-added-it-later-but-now-its-a-mess-ness, in BW-compatible-ness, in quirkiness.
I know React is not a language, but I listed the whole stack to compare it to IHP, which seems to try to combine everything. Which is good! I’d love a Django/RoR esque Haskell platform.
But it depends on what you are doing ofcourse.
Exactly, this is a real reason for not using the technologically superior.
If these other languages were better in a holistic sense, businesses would switch.
I would argue against the "technically superior" position on three merits:
1. Finance, 2. Median productivity 3. Long-term product stability
Network effects mean that familiar languages will dominate. PHP, C#, and Javascript are familiar.
PHP has had staying power because it is extremely well-documented (with examples) for the novice, prioritizes backwards compatibility, and is reasonably if not very productive for most developers. The documentation section of PHP.net is probably the most important language "feature" of PHP - it trumps almost any language design feature you think is important.
It reads easily. It's easy to implement. It interacts natively with JSON in a completely fluid way. The database handling routines are rock solid and fast. The core language team spends a lot time improving the safety and performance of existing code. There's a good debug story.
It's its own templating language - no need to bolt on a hand-rolled templating mechanism. Just PHP all the way down. It prioritizes language features (reflection) that make writing libraries and frameworks easier. It promotes building reusable tools. Important features are pulled directly into the runtime, based on popularity in the ecosystem. The kitchen sink is included and it's portable.
Basically, it's a language that has been developed by people who actually have to build and maintain projects over a long period of time. A useful language is more than it's design.
I see the other side: it's a sinking ship. FB comes to rescue PHP, but internally seems to like anything but PHP for greenfield projects: Java, C++, Erlang (chat msg broker), OCaml/Reason (messenger.com app), even Haskell is used for some spam filtering tool.
So now we just mostly deliver things in old, boring but very standard tech. Using almost written by us and definitely no custom low level stuff like we used to. Because we did all that work before, we know how to optimise for performance everywhere, how to optimise dbs, how to optimise frameworks and webservers. We do everything according to the standards and best practices; now we know that we can get people in 20 years to work on our code. But it is much much slower at the start; so much setup and plumbing. Very boring and tedious. I guess that's the point.
In relation to PHP, really? Sure it has come a long way recently, but there's too much still in there that can never be fixed.
I dont think what IHP delivers is some sort of "fashion": they choose to be server-side only, pretty old school. The typing discipline is not very fashionable either: old, time tested, established, but not often leveraged for the development of simple websites/webapps.