> In short, the modern PHP ecosystem gives us the best of both worlds: the ability to build quickly and confidently in PHP, while still having powerful options (C, Rust, Go) for performance-critical parts. This hybrid approach lets us stay productive without sacrificing speed where it matters most. I understand this for a large codebase where rewriting is not feasible. But if that wasn't the case, a C# APIs achieves…
The Rise of Hybrid PHP: Blending PHP with Go and Rust
51–60 of 158 posts
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#52The one thing I don't like about PHP is that the whole application is bootstraped (and autoloading and the configuration is re-evaluated) in every single http request. Sure thing there's cache and all, but it just doesn't feel right (compared, to, for instance, an http server written in golang)
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#53I'm starting to build a bit of antagonism to all-encompassing frameworks (e.g. Spring, Larvel, Phoenix, etc.), because while they are productive to build new things with, I seem to always have the same issue on legacy projects built with them. It always seems to be a challenge to upgrade dependencies for these projects. Its usually because (in building the thing) one can't fully follow the "prescribed" way of doing t…
If you're making a simple app then web frameworks can feel downright magical (like the original "Build a blog in 15 minutes with Rails" demo [1]), but for anything that gets even remotely complicated, I find that they generally just get in the way.
I personally have grown to prefer the "mid-level" HTTP setups, like Express with Node.js or Vert.x with Java.
[1]
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#54I'm starting to build a bit of antagonism to all-encompassing frameworks (e.g. Spring, Larvel, Phoenix, etc.), because while they are productive to build new things with, I seem to always have the same issue on legacy projects built with them. It always seems to be a challenge to upgrade dependencies for these projects. Its usually because (in building the thing) one can't fully follow the "prescribed" way of doing t…
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#55Earlier quoted context omitted.
> I think you really have to decide based on the complexity you need I don't really agree. I think the goal should be to reduce complexity where possible, but not if you're inevitably painting yourself into a corner. If you want the simplest and most scalable way forward, write static pages and avoid server-side rendering.
How would you be painting yourself into a corner with PHP more than with JS? If you use PHP, you can just serve/use JS later. But if you use JS, you will have a hard time serving HTML from PHP later. Aside from both languages kinda being painting oneself into a corner, I don't see how one would do more so with PHP than with JS, out of all the things.
It's inevitable that you will need to host the pages somewhere else like a CDN to lower latency, integrate with other backends, and the biggest one is allowing the frontend devs to have complete control of the HTML so that stylesheets and javascript don't randomly break for reasons out of their control. They should be able to develop everything locally with mocks instead of your server and use whatever build tools and frameworks they want. There are also SEO and accessibility concerns with the page structure. The backend devs should not be making decisions about any of that. Sometimes the client may want quick turnaround on simple but very specific changes to the pages. None of that process should depend on backend teams who don't care and will drag ass about it because they will have to refactor their junky code that hasn't been touched in years.
Getting rid of dependencies and having good boundaries in the code that align with the way dev teams are organized is always a good thing. I'm not sure why anyone would go for SSR unless they haven't done web dev in a while or are working on a legacy project. Even if this starts out as a hobby project, you need to keep things clean for future maintainers.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#56Earlier quoted context omitted.
> The only reason PHP still exists is because of shared hosting companies and Wordpress. Unfortunately I can't think of anything constructive to say about this nonsense. > Today, it’s so easy to run JavaScript, I can build a basic jsx site in under an hour, just like I can with PHP and includes. You assume people agree that it's preferable to work in JavaScript.
And still nobody outside of Meta cares about hack. The niche I think PHP had back in the day has largely been supplanted by Python. Maybe it’s better now, but after moving on from it to basically anything else after a 25 year career, I don’t miss it.
Because everyone is OK with PHP. I'm not even using it directly but most of the web runs on it.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#57> In short, the modern PHP ecosystem gives us the best of both worlds: the ability to build quickly and confidently in PHP, while still having powerful options (C, Rust, Go) for performance-critical parts. This hybrid approach lets us stay productive without sacrificing speed where it matters most. I understand this for a large codebase where rewriting is not feasible. But if that wasn't the case, a C# APIs achieves…
I would never use a Microsoft language since they discontinued VB6. Open Source languages are the only sane option.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#58Earlier quoted context omitted.
The only reason PHP still exists is because of shared hosting companies and Wordpress. PHP’s initial appeal was you could do scripting on the server side, “turn off PHP with a ?>” spit out normal html, and “turn back on PHP with a For a beginner programmer, it was simple, easy to understand, and had an include so your designs were’t nested table hairball messes of garbage. (but your CSS was definitely garbage). Today…
PHP might have a bad reputation but I honestly don’t think JavaScript is a better language in real world terms. I do get why JS appeals to people, but switching from PHP to JS feels a little winning an internet argument — you might feel smarter for doing so but in reality all you’ve done is sunk time into something that doesn’t make you any better off.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#59Earlier quoted context omitted.
The only reason PHP still exists is because of shared hosting companies and Wordpress. PHP’s initial appeal was you could do scripting on the server side, “turn off PHP with a ?>” spit out normal html, and “turn back on PHP with a For a beginner programmer, it was simple, easy to understand, and had an include so your designs were’t nested table hairball messes of garbage. (but your CSS was definitely garbage). Today…
> The only reason PHP still exists is because of shared hosting companies and Wordpress. Unfortunately I can't think of anything constructive to say about this nonsense. > Today, it’s so easy to run JavaScript, I can build a basic jsx site in under an hour, just like I can with PHP and includes. You assume people agree that it's preferable to work in JavaScript.