PHP is great when you use it right. The problem is, most people don’t use it right. That old way of rendering html through PHP, or worse, injecting PHP into html, is antiquated.
IMO, PHP is a great language to use for making your backend API. Use whatever flavor of the week on your front end.
There’s always a use for server rendered html. Maybe JavaScript is an issue. But it’s usually not. The list is pretty short though.
I can’t think of many situations where I would say yes if I asked myself “if you could re-do the system today, would you still choose server-rendered html?”
I’m sure other people have use cases where it would make sense. I build admin utilities and ERP stuff.
PHP leaves a bad taste in my mouth and I’d be happier if we were rid of it (or it continued changing for the next 10 years), but even I can see this article is worthless.
In the given example they don’t make much sense but I assume they’ve done that in case they want them to be extended with new behaviour for certain ones separate from their strategy pattern section in the future
Yeah I assume the same, but I’d really like to see a concrete example of that being done instead of having to guess (as someone who has never used the Strategy Design Pattern).
Mainly because you’ve got to setup PHP to be debuggable in the first place.
And setting up PHP is already a hassle. When a dev has to set up php in about 5 separate ways just to figure out which one is actually debuggable, then PHP has a problem.
Hey, I’ve came over from Reddit and thought I’ll introduce myself as well. As every programmer, I’ve started way too many pet projects and almost all of them are starving. In terms of framework, I prefer Yii2 over Laravel every day. I feel like Laravel provides you a dozen different (seemingly equally good) ways of doing something. You could say it’s lacking clarity or guidance for the developer.
Hey, welcome! Classic haha, I have far too many pet projects as well 😅
And yeah agreed, it’s a bit dizzying to choose a Laravel “path”. Would probably be helpful to have a documentation page sort of like the Remix Stacks where they talk a little bit about which “path” to choose depending on app needs.
Docs is another topic I really don’t like about Laravel. Why don’t you have a simple API doc with available functions and their parameters instead of that blog-style documentation. And no, I don’t want to watch a video about how to use X, I want to know what functions I can call. Oh and don’t get me started on all their global “helper” functions.
php
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.