|
|
|
|
|
by aastronaut
1235 days ago
|
|
You're question seems more on the side of "Why use a micro framework when you can use a mature full-fledged one?". I feel a lot if new ideas in the web development space are first available as "micro" packages, so that's just what you use when you want to stay on the edge. I feel there is still so much momentum in the JS/TS community. Would you genuinely pick PHP for anything else besides Laravel? I would also question you're mentioned frequency to update packages tbh. Just pin a stable version with a lock file, track the required node engine and use an OCI image to provide just enough reproducibility. I never had to do anything more than cd-ing into a directory and run npm ci after coming back to a project for a few years now. |
|
I'm not talking about staying on the edge though, I'm talking about connecting to databases and logging - stuff that would be considered basic when working with other languages.
You're right though... If there existed a fully-fledged framework for the backend (with dev tools) which had been around for a few years and fairly stable, I'd consider it. Frontend JS frameworks like Next.js are pretty great. They still feel a bit immature and prone to large changes, but they're on the right track and get a lot of things right.
Also, yes, I would probably still use PHP even without Laravel. I have PHP projects which are over a decade old which use a very minimalist framework I created for simple projects. It still works fine and I haven't changed the framework in over a decade. You're right that you can just pick some stable packages, but what happens when you're running Node 12 and you want to upgrade to 14 or 16? Do you upgrade and risk breaking packages or just continue running an out-dated unsupported version of Node? I've had this specific issue several times now.
I think some people here think I'm saying Node is unusably bad, but I'm not. I'm just saying I don't get why people / projects who would have used PHP a few years back are now moving to Node when Node is still so immature and PHP has improved so much. I guess I'm not sure why my view of PHP has improved so much, while the industry as a whole seems to be dismissing it for the JS ecosystem which in my opinion has a lot of problems.