Remix.run Logo
ollysb 5 days ago

When they transitioned to the app router it was like they'd given some bootcamp graduates a crack at "improving" on the express apis - which are mature and roughly align with the composable russion doll approach taken in servlets, rack, plug and any other server interface I've ever seen.

Aside from the abysmal middleware api you also have the dubious decision to replace having a request parameter with global functions like cookies() and headers().

Perhaps there is some underlying design constraint that I'm missing where all of these decisions make sense but it really does look like they threw out every hard fought lesson and decided to make every mistake again.

arend321 5 days ago | parent [-]

I believe the obsession with streaming is a major factor in the new constraints. Together with supporting the lowest common denominator, edge runtimes.

Etheryte 5 days ago | parent | next [-]

And the reason they're all in on streaming to begin with is because they're sending massive amounts of data back and forth all the time. Like Sean Goedecke said in his API design writeup [0], a technically poor product can make it nearly impossible to build an elegant API. I believe we're seeing the same thing with Next.js, all of these wonky interfaces derive from the underlying architectural issues.

[0] https://www.seangoedecke.com/good-api-design/

conradkay 5 days ago | parent | next [-]

Maybe it's a good design from the perspective of making more money from your hosting business

5 days ago | parent | prev [-]
[deleted]
n2h4 5 days ago | parent | prev [-]

[dead]