Just wondering. I’m new to web dev, now learning with CA through the Front-End Developer path.
In parallel, I’m using new skills to write a website for myself (I’m a musician in the first place) and I keep facing situations when I need some back-end skills for certain tasks. Which is completely alright.
Recently I got frustrated that I need to write a menu bar for each and every page, and then it will be a formal ■■■■ if I need to add or change some links there, so I started looking for a solution. From what I found is that the most right way to solve that is using PHP. Since I don’t know it, I found the way to use JS for that, as a temporary solution at least, however…
The more and more I dig into web dev, seeing more and more websites, the more I see that they use PHP. Take for at least a WordPress division. However, when I look at Back End or Full Stack paths here, I don’t find PHP included (yes, I know it is available as a separate course). So I’m sorry to ask my very beginner’s question: why is the reason it is neglected? Is it irrelevant somehow, or not necessary, or any other reason?
PHP is not without its controversies:
PHP: A bad choice for startups and programmers in 2020? | by Vinay Kumar | Medium
Why developers hate PHP - Je suis un dev
Codecademy used to have a php5 course, which got removed, then codecademy didn’t have a PHP course at all, and finally they released an updated php7 course. Not sure why its not in a career path. Maybe someone else can answer that
this is not true, any back-end language + template engine can achieve what you are after. Sure, php can, but so can many other languages (go, java, c#, nodeJS) to name a few
Thanks for the reply. Yep, as I mentioned, I managed to do that with JS, however, for some reason, most people on StackOverflow and, if memory serves, even somewhere on this forum, recommended using PHP for that. Maybe later I’ll get, why )
Anyway, the question on PHP absence in Paths still stands. I see it widely used in the real world, and it is not even mentioned here.
Thanks for the link, BTW. A good article to read.
But JavaScript is front-end (or nodeJS for back-end), which works. But is the same/doesn’t work the same way
possible, but far from the only option.
the most common approach is to use template or template engine, which will “stitch” your layout (or menu bar) and the rest of the page to together (in the back-end/on the server), and then renders this “complied” template as a response.
but then again, PHP is by far not the only option to achieve this.