News for hackers. Stuff that matters.

pierstoval

Re:FrankenPHP: Modern PHP App Server on Thursday May 30, 2024 @06:11AM (#40521989)
FrankenPHP is just Caddy + PHP, but in one binary.

The threads thing, the worker mode, etc., all of it is optional, but basic Caddy + PHP is already production-ready, I've been using this kind of setup for a while, and switching to FrankenPHP when you already have Caddy is completely harmless.

The only thing FrankenPHP does not is providing multiple versions of PHP in the same binary. For that, I'd still use Caddy + PHP-FPM, and it's fine.

Re:FrankenPHP: Modern PHP App Server on Thursday May 30, 2024 @06:04AM (#40521957)
It doesn't matter you wrote perl before PHP, actually. You're talking about PHP6 like it's a thing (spoiler alert: it was never released), and you don't seem to have ever used one of the famous frameworks PHP had seen since the 2010s. Even Symfony 1 was here in 2005, and PHP 5.3 brang a complete revolution and growth of the entire ecosystem (thanks to closures and namespaces, at first), which made people embrace PHP more willingly, Composer was released, incredible frameworks were created and used Composer (that's how we got Symfony 2, and Symfony later helped Laravel come as an extremely popular framework). All of this was funded by companies that believed in PHP, while PHP-haters moved to something else (I know that: my older brother, who's also a dev, did some PHP back then, but was more appealed to other techs like Java). You moved to Go? Good: PHP doesn't do everything that Go does, because it wasn't meant for that. We do PHP instead? Perfect: Go wasn't created to develop web-apps in the first place, it's a low-level network-related project, and turned into something way bigger that allows you to code web apps quicker than in Go's early life. PHP has always been about creating web applications, and will always be, even when some people try to tinker with it on some other levels (like servers using async & threads, or desktop apps).

And honestly, FrankenPHP is an incredibly good combination of both worlds: brings all the scalability of Go, with the flexibility of Caddy (which is written in Go too) in the infrastructure, while allowing us to continue coding with all the incredibly powerful frameworks we have in PHP to create the web app. It's the best for all the people that have an interest in that. You can't hate on that unless you just hate for the sake of hating.

Re:Performance benchmarks of front end frameworks on Thursday August 24, 2023 @07:20AM (#37247542)
I spent quite some time creating benchmarks for most famous frontend frameworks and some of their variations.

Basically it's about Angular, React, Svelte and Vue, with or without their full-stack framework (like Next for React, SvelteKit for Svelte, and Nuxt for Vue), and there's even a variation of using React with Vite as bundler instead of Webpack.

Turns out that, of full-stack frameworks, Svelte Kit has really good results.

A quite interesting conclusion for now is that runtime performances are not really significant: using a headless browser, repeating some tasks 200 times that imply no network calls and only DOM modifications. Everything takes about seconds, and for 200 actions that should be super quick, as said, it's less than 10% difference on the slowest versus the fastest.

What do you think of these tests?

Feel free to comment on the method, everything is in the repository for you to criticize so that we might have better benchmarks at some point :)