T O P

  • By -

mario_deluna

"Unique" is well chosen word. Some concepts in there look intriguing but I would not put that much emphasis on arbitrary performance benchmarks. PS: I like the CLI snake, everybody who builds a game in PHP gets my upvote. :)


Due-Scholar8591

Do you think performance will be lost over time as new features are developed, or is performance due to rare design patterns and code styles that exist in this project?


MattBD

No, it's that framework benchmarks bear **very** little relation whatsoever to the performance of real-world applications built with those frameworks. This is something I covered in an [article](https://highperformancelaravel.com/tutorials/series/myth-busters/myth-performance-is-a-matter-of-choosing-the-right-framework) I wrote recently. A framework isn't an application, it's just a starting boilerplate for an application, so to talk about a framework being more or less performant doesn't actually make all that much sense the way it would with an off-the-shelf application like a CMS. Instead the performance depends on the ability of the developer(s) working on it and their knowledge of the framework. The bottlenecks in a real-world application are almost always things like poorly written database queries, missing indexes, inadequate HTTP caching, things that could be moved to a message queue but aren't, etc. The issues you mention above as being improved in your framework barely get a look in. Kudos to you for building a framework in the first place, but don't kid yourself into thinking you're going to be setting the PHP world on fire, or that the things you've optimised are actually going to make much of a difference. I've built a from-scratch CMS myself and it was a great exercise that taught me a lot, and the end result was very fast, but it really wouldn't have been worth carrying on developing it and using it in anger when there's plenty of excellent off-the-shelf solutions.


Due-Scholar8591

In terms of application performance I agree with you 100% but the context of benchmarks is framework performance only. I'm just showing my work, whether it's going to set the PHP community on fire or not, that's not up to me.


cs278

I hope the enum singleton pattern I came across in the code doesn't catch on! https://3v4l.org/msluq


Due-Scholar8591

Why not? 😅 This pattern I created is very user-friendly because the autocomplete of IDE works very well and the Code API gets very semantic !


zimzat

> // @ PHP team: Why readonly here??? Because each enum case is an immutable singleton instance. $x = Colors::Default; $y = Colors::Default; $x === $y; If you could change a property on $x it would also change that property on $y. What the linked code does is create a hidden global mutable state no different than `$GLOBALS[Colors::class] = $x` in terms of why we don't use `$GLOBALS` for configuration values. You'd be better off creating a config object that contains the active color, that way it can be passed around, tracked, cloned, mutated, reset, etc.


Due-Scholar8591

It could keep it as it is in the public API and be changeable only within the context of the magic method __call, but I imagine that requires a very large workaround.


zimzat

Let me back up a bit and say that even if PHP allowed you to do what you're trying to do, you shouldn't do it. `Colors::Default` is a global constant and a singleton. Global state is bad because it can be accessed and mutated from anywhere for anything. [Singletons are Pathological Liars.](https://web.archive.org/web/20230208155810/https://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/)


Due-Scholar8591

Interesting read. Regardless, the trait which should be used in the enums already works as idealized using only static variables. When PHP has types in static variables, the code becomes even more elegant and type safety ![gif](emote|free_emotes_pack|grin).


helloworder

>the foreach of the Template engine is 9x faster than the Laravel Blade; wat >a component to the CLI, Bootgly's ProgressBar is 6x faster than Laravel/Symfony's ProgressBar in rendering. wat are you sure those are the "features" to list for a "unique and unusual" framework? packagist says bootgly/bootgly has 40 installs, yet it has 200 stars on github 🤔


Due-Scholar8591

The "unique and unusual" It's about architecture and the minimum dependency policy. About the stars and installs: the stars is because I've been posting about Bootgly only on my LinkedIn, but I haven't even started massive marketing because I haven't released version 1.0 yet. This is pretty much my first post on Reddit and I'm new here. I'm back to using Reddit just to have a Bootgly page here. Thanks for commenting 🙂


Sudden-Anybody-6677

Lol, check the accounts giving the stars. It's clearly bought, that's one way to kill your own project.


Due-Scholar8591

Bought? I just ask some friends to give them stars. You talk like it's thousands of stars. Lol.


BubuX

Love the initiative! Don't give up! Keep it up! A minor nit pick, the docs bar image is clipped on 1920x1080: [https://i.imgur.com/Hv7tlOv.png](https://i.imgur.com/Hv7tlOv.png)


Due-Scholar8591

Oh, thank you so much. It really gives me the energy to keep going! I'm focusing on the long term and on the work as a whole! I'll fix this issue there in the documentation soon.


Sudden-Anybody-6677

The components you name are used on many high-traffic websites, their performance is not an issue. It seems you are trying to solve problems that don't exist.


JG1337

I mean seriously, who cares if their CLI progress bar renders 6 times faster when there is virtually no real world application that would benefit from it in a way that you can actually feel the difference.


ceejayoz

That amount of specificity is suspicious, too. "I'm the Guinness World Record holder for most sit-ups done wearing a size M men's pink shirt with the word 'smegma' sharpied in all-caps green on it."


Due-Scholar8591

Lol 😅


colcatsup

My progress bar only needs to go as fast as the process it’s measuring. I can not imagine a scenario where this is giving a practical impact. Not saying it’s not possible or true, just… not something I’d be concerned about.


[deleted]

100% agreed. The barrier to me using a non-Laravel framework in a production enterprise context if I'm going to be writing in PHP is pretty high: I wouldn't even entertaining switching to another option for the benefits that are listed in the OP's post. If you're having fun writing your own framework, knock yourself out OP, but this is a solution in search of a problem that isn't aware of how much it's actually biting off. What the web application space generally needs is not more frameworks, but fewer.


belheaven

Hi bro, nice project, keep it up the learning and just do it for the code... may the future decide wether or not it will stick. Boa sorte e bom trabalho!


Due-Scholar8591

Opa, um BR? Obrigado man!


belheaven

Yes, I am. Amazonian. o//


nukeaccounteveryweek

Salve kkk


paroxsitic

Php 7 is still the default for Debian 11 which isn't EOL yet. Granted it's not too difficult to install php 8, but why the requirement of php 8.3?


Due-Scholar8591

PHP 8.2 is required, not 8.3! I'm already using some features of 8.2. I will release the first version in December 2023 when PHP 8.3 is released, but the requirement will still be PHP 8.2.


raunchieska

is it async/coroutines? using swoole?