Live data from Hacker News

Show HN: Dumbo – Hono inspired framework for PHP

github.com

51–60 of 70 posts

Re: Show HN: Dumbo – Hono inspired framework for PHP

#51

Earlier quoted context omitted.

Out of curiosity, what do you dislike so much about Laravel?

1) *magic* 2) Its ORM of choice uses ActiveRecord pattern which I find to be hideous. DataMapper is far superior 3) Its weird facade patterns is terrible I can (and have!) gone in-depth into my misgivings with Laravel, but it is fine for most projects and teams. It has elevated the average codebase quality throughout the PHP community and introduced many engineers to what PHP can do. Its creator and community have be…

Too much angst about non standards and preferences. Everyone codes the way they feel comfortable and decides what to implement because the more mumbojumbo pattern magic included the more complexity you introduce to your codebase. And the development time skyrockets.

Just because someone wrote a book about patterns, it doesn't mean it's the high standard and the holy bible by any means. These people are mostly control freaks, who like to exert control on people and think their excrement is akin to a lump of gold.

And then there are the preachers - like you - who disseminate the bullshit these pattern monkeys rant day and night.

Re: Show HN: Dumbo – Hono inspired framework for PHP

#52

Earlier quoted context omitted.

Out of curiosity, what do you dislike so much about Laravel?

1) *magic* 2) Its ORM of choice uses ActiveRecord pattern which I find to be hideous. DataMapper is far superior 3) Its weird facade patterns is terrible I can (and have!) gone in-depth into my misgivings with Laravel, but it is fine for most projects and teams. It has elevated the average codebase quality throughout the PHP community and introduced many engineers to what PHP can do. Its creator and community have be…

We are in agreement about Laravel's ORM, but I disagree about the magic. Laravel's "magic" is just convention over configuration, and most things can be configured as well.

Re: Show HN: Dumbo – Hono inspired framework for PHP

#53

Earlier quoted context omitted.

1) *magic* 2) Its ORM of choice uses ActiveRecord pattern which I find to be hideous. DataMapper is far superior 3) Its weird facade patterns is terrible I can (and have!) gone in-depth into my misgivings with Laravel, but it is fine for most projects and teams. It has elevated the average codebase quality throughout the PHP community and introduced many engineers to what PHP can do. Its creator and community have be…

We are in agreement about Laravel's ORM, but I disagree about the magic. Laravel's "magic" is just convention over configuration, and most things can be configured as well.

But really, who thought mixins was a good idea? It's the only place in the wild I've seen somebody bind $this when calling closures.

Re: Show HN: Dumbo – Hono inspired framework for PHP

#54

Earlier quoted context omitted.

Out of curiosity, what do you dislike so much about Laravel?

1) *magic* 2) Its ORM of choice uses ActiveRecord pattern which I find to be hideous. DataMapper is far superior 3) Its weird facade patterns is terrible I can (and have!) gone in-depth into my misgivings with Laravel, but it is fine for most projects and teams. It has elevated the average codebase quality throughout the PHP community and introduced many engineers to what PHP can do. Its creator and community have be…

What do you think of Slim Framework as far as best practices for modern PHP in a micro framework (which is similar to OP's Dumbo)? Are there any other micro frameworks you recommend?

https://www.slimframework.com/

Re: Show HN: Dumbo – Hono inspired framework for PHP

#55
post #2

I wish the market didn't determine the technologies we get to work with. because at times the market can be wrong due to incentives. e.g the market was wrong on graphQL. btw Hono is cool, but found the api surface area insufficient for my node.js usecases.

How was the market objectively wrong on GraphQL? I ask a a REST turned GraphQL advocate to be clear but criticisms I hear tend to be opinions or issues with specific implementations but not ones based on the technical shortcomings of the technology

GraphQL has too many foot guns for your typical SMB to implement successfully, especially pivoting from REST. It requires you to architect your solution much further ahead than most companies have the capability to.

I prefer it over SOAP, but I think it's far too easy to ignore:

N+1 issues

Security (found that we had our entire schema open including internal data routes at my last job), also we had to refactor from patients being company -> patient to company -> pharmacy -> patient... that was fun

Overcomplicating resolvers

Not implementing pagination upfront

Dead end schema designs, since you need to plan much further ahead it really hurts when you mess it up. In REST you can make a V2 of a route and move on. Especially since many people ignore modules at first. Even large corporations get stuck with UserEntity_V2, updateUser_V2.

IMO if you are going "wow if only we had GraphQL" and your team only knows REST you are always better off improving your REST tooling and standards. For example, when adding a new entity/resource you can just plan to understand how your own teams intend to query for this data, rather than guessing with GraphQL or implementing every search pattern.

Re: Show HN: Dumbo – Hono inspired framework for PHP

#56

We actually target a HUGE legacy PHP codebase (its over 16 years old, with over 1M LOC) with Haxe. I would not EVER write vanilla PHP for anything else than a toy website, because there is no amount of testing that makes it stable enough. We still have a lots of legacy PHP, but its slowly being refactored to Haxe. With Haxe we get a really nice typesystem, and a "faster than Go" compiler. It has pushed our productivi…

Very interesting to hear about the Haxe PHP target being used like that. How did you start introducing it to the codebase? Were there any devs familiar with Haxe in the company already?

Re: Show HN: Dumbo – Hono inspired framework for PHP

#57

You're requiring PHP 8.3 but not using some of the most powerful tools in 7+: strict types. ``` /* @var array Variables stored in the context */ private $variables = []; ``` This should be typed as `array` (heck, I'd argue ArrayObject instead) and all your classes should have `declare(strict_types=1);` at the top. Your `Dumbo\Helpers` classes are basically static mine traps that you are unable to mock in unit tests.…

[deleted]

Re: Show HN: Dumbo – Hono inspired framework for PHP

#58
post #54

Earlier quoted context omitted.

1) *magic* 2) Its ORM of choice uses ActiveRecord pattern which I find to be hideous. DataMapper is far superior 3) Its weird facade patterns is terrible I can (and have!) gone in-depth into my misgivings with Laravel, but it is fine for most projects and teams. It has elevated the average codebase quality throughout the PHP community and introduced many engineers to what PHP can do. Its creator and community have be…

What do you think of Slim Framework as far as best practices for modern PHP in a micro framework (which is similar to OP's Dumbo)? Are there any other micro frameworks you recommend? https://www.slimframework.com/

At the risk of being piled on by fans of Slim (see fans of Laravel), I don't use slim frameworks.

For large projects when you get down to it, slim frameworks are simply frameworks where you have to add in components yourself, vs shipping with sane defaults.

Symfony comes with Doctrine, Twig, etc, but you can choose not to use them or even include them.

With slim frameworks if they are built correctly they will have hooks to add these components but you have to choose them and import them and set them up.

I have not worked on a small project in years, and have not bothered looking at slim frameworks in as much time, so my knowledge might be out of date ... but a quick glance through Slim's documentation tells me I'm still fairly close.

Post reply on HN