Re:Is Rails still relevant in 2018?
by wolco on Tuesday August 28, 2018 @09:06AM
(#17858492)
Curious why someone would pick rails over php in 2018. Existing pool of developers perhaps.. Any other reason?
[ Parent
| on HN ]
Re:Is Rails still relevant in 2018?
by psychometry on Tuesday August 28, 2018 @09:16AM
(#17858547)
Because even in 2018 PHP is still PHP?
What does PHP mean to you? What are your personal views?
From a language perspective it's stable, fast, easy to deploy. Why wouldn't you choose to use it? For most it's not a difficult language to learn and start using.
Here's why I wouldn't choose it. When I look at a screen of idiomatic, PSRx-compliant PHP code I'm lucky if it contains 10 lines of code. Most of the space is occupied by KR-style space-wating layout plus blank lines between every line of code. Then there are the half-screen doc comments. Ruby, by contrast, is concise and code-focused instead of boilerplate-focused.
PHP makes it really easy to write insecure software, because the first googleresult is often outdated and hacked in a short time by automated scripts.
The defaults of functions/methods in the standard library are often insecure.
if you want to write good PHP i can recommend following resources: https://paragonie.com/software Would use their stuff if i wrote PHP https://www.phptherightway.com https://phpdelusions.net even though the name sounds abrasive it is a good resource on dbaccess if you want to know specifics. It is from a guy with several SO gold badges.