The fact that we're still pretending PHP is a valid solution for almost anything after all these years is a joke. Not only that, but now we have these "frankenstein" solutions with all the interop problems on top of PHP. Just shows that as a species humans really can't learn.
The Rise of Hybrid PHP: Blending PHP with Go and Rust
111–120 of 158 posts
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#112> 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…
Having been in the C# world for a long time, and the various web/api frameworks. PHP is really nice if you dig into it, it includes so many great functions and functionality built in for creating web stuff. It also has a number of issues,. but to quikly put something together PHP take the win in my limited opnion.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#113Earlier quoted context omitted.
But the question always is: was the rewrite the reason for the gained efficiency, or the new language?
Both. Go made this worth it and it also was easy to hand over to another experienced developer.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#114Earlier quoted context omitted.
good idea, which language you choose for that ? also with frankenphp you can just write those required apis to be really fast as go extensions.
Go, naturally.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#115I'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…
In Laravel, the issue is that the framework is sold as "productive" as default. There is no real "beef" to the framework though, IMO. It is better today, but historically it is just a wrapper around symfony with some dependency injection through reflection, questionable serde, tons of magic, and with some unique takes on templates and routing, which are arguably not very good takes? Maybe components are better, but b…
The fact this happens to lead to more organized and testable code masks the wastefulness in the original goal of such an effort. It simply trades back-side efforts that may or may not ever be required for additional front-side effort with the result of making things easier later if it happens to be needed. I’m not saying it is completely a bad thing, more that it isn’t de-facto a good thing either.
I guess, like with all things, the important part is finding the right balance for the situation.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#116Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#117I'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…
This matches my experience, literally took months to migrate an older Spring project to something with fewer CVEs and bugs. Created some new bugs and issues along the way, including one where compiling it on Windows would produce a .jar that runs fine, whereas compiling it on Linux changed something in how the Spring beans are initialized, leading to it failing to even start (the settings for allowing lazy initialization changed nothing).
> Using a selection of libraries to build up the elements of a web service, and creating your own high-level abstractions for utilizing them, does require an additional time investment, but it leaves you in more control to do upgrades piece by piece, and to pivot the way things work when it is needed.
Yes and no. If you only wire things up, then sure. But depending on how much code your devs have to write (and depending on the devs), you might actually end up with a bespoke mess if you have to dig into writing various base mechanisms (think transaction handling, scheduled tasks, task pools for parallel execution, key/value stores and caching, validations, auditing and metrics, file uploads and downloads etc.) - one that will have less documentation than something like Spring Boot, you won't be able to ask anyone how to solve issues in it, alongside sometimes just having architectures that neither scale nor work properly, because it isn't something battle tested over literal decades.
> I feel like the Go ecosystem follows the latter approach more than most, and it was bit of a mindset shift for me at first, but I've grown to appreciate it.
I still agree with this, to me it feels like the correct approach is indeed to give you most of the tools you might need for the technical bits and make you (or other devs) only write a bit of glue to wire everything up, to order how data moves through your system (resources, services, validators, repositories etc.) according to whatever business rules you might have. Things really go south when you miss out on that detail.
In the Java land, I think Dropwizard is a good example of that: it uses a bunch of mostly idiomatic libraries that are well tested, without being quite as rigid as Spring (and Spring Boot), letting you set things up as you please and also not getting in the way too much: https://www.dropwizard.io/en/stable/getting-started.html
In Go, I really like that a lot of the stuff is already present in the standard library.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#118The complexity with debugging and maintenance seem to be overlooked, if you have the option don't do this.
thanks. but may you explain more. we just choosed frankenphp but i did't see if it makes debugging it much worse.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#119Earlier quoted context omitted.
In Laravel, the issue is that the framework is sold as "productive" as default. There is no real "beef" to the framework though, IMO. It is better today, but historically it is just a wrapper around symfony with some dependency injection through reflection, questionable serde, tons of magic, and with some unique takes on templates and routing, which are arguably not very good takes? Maybe components are better, but b…
Never really understood using a template language when PHP is first and foremost its own template language. I also don’t understand developers making decisions now about things that might one day have to be replaced. It’s like building a bridge, but letting the plan to maybe have to tear down the bridge 50 years later dictate all the design decisions. The fact this happens to lead to more organized and testable code…
Twig and Blade are both fine templating engines with their own quirks and features but they’re also battle tested and have proven their use over the past decade+. If someone wants to use a dedicated templating language for abstracting away chunks of HTML, it’s low on my list of complaints.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#120I'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…