←back to thread

75 points notrab | 6 comments | | HN request time: 1.322s | source | bottom

Hey HN, I last PHP professionally over 15 years ago, and I loved it. I switched to Ruby on Rails, then Node/Go/React/GraphQL as there was a lot more demand for those roles. However, PHP is back!

In true JavaScript fashion, I decided to learn PHP again by building a framework to put all the pieces together in my brain.

I absolutely love Hono.dev, and decided to base the PHP framework on that. Dumbo isn't intended to compete with Laravel, Symphony or Slim, if anything, it's something people can use in production, but also contribute to and be used as a learning resource for others.

Show context
dzonga ◴[] No.42172050[source]
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.

replies(1): >>42172914 #
no_wizard ◴[] No.42172914[source]
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

replies(3): >>42173003 #>>42174801 #>>42184153 #
1. davzie ◴[] No.42173003[source]
I can't comment on all the shortcomings and this may be reflective on my lack of experience with different implementations, but doesn't using GraphQL basically just enable a tonne of unoptimised database queries to occur that, at scale, could cause some serious load issues?
replies(1): >>42173029 #
2. no_wizard ◴[] No.42173029[source]
GraphQL says nothing about databases at all. Resolvers can get resources from anything, they’re agnostic.

None of that is inherent to the technology but it’s a common folly among developers. This is an issue with REST too but it can be more obfuscated

replies(1): >>42173357 #
3. ITB ◴[] No.42173357[source]
If a certain arrangement makes it more likely to write bad queries, and it requires extra care to write optimal queries, then it’s a worse interface to a database. I bet for really database intensive applications graphQL adds more work than it saves.
replies(1): >>42173807 #
4. no_wizard ◴[] No.42173807{3}[source]
It’s not though. Especially since GraphQL makes no mention of databases. It’s a resource agnostic protocol.

This isn’t a technical issue with GraphQL. It’s a culture issue among developers who shoehorn GraphQL and don’t use it appropriately

As someone who works on very database intense application GraphQL saves me more work than its ever caused.

replies(1): >>42174121 #
5. jayknight ◴[] No.42174121{4}[source]
Any chance you can point to a good graphql implementation/framework that someone could use to learn best practices?
replies(1): >>42175795 #
6. no_wizard ◴[] No.42175795{5}[source]
You're talking about the implementation of the protocol, right?

That is a good implementation of it, called GraphQL Yoga[0]

However I'm concerned there is a slight disconnect here. I'm saying that the technical specification of GraphQL does not lend itself to being bad, rather its the failure of developers to really understand its purpose and what its for (its a giant aggregator, with various ways to optimally aggregate things together, depending on what is optimal for a given problem set)

For that, I recommend becoming more familiar with the specification itself[1] because thats what I'm talking about. The specification (and thus its technical nature) doesn't prescribe anything regarding how you get data on to the graph. Many people equate GraphQL with database problems[2]

This doesn't mean I don't understand that GraphQL has shortcomings, but all approaches to APIs have short comings. I have found GraphQL has the least amount

[0]: https://github.com/dotansimha/graphql-yoga

[1]: https://spec.graphql.org

[2]: Common complaint I see all the time. I find it stems from a failure to understand how the entirety of GraphQL is meant to work, and some of the mechanics within. Like when to appropriately leverage DataLoader[3], for instance.

[3]: https://github.com/graphql/dataloader