• Many years ago I was using jQuery (as the web platform wasn’t uniform myself yet) and found myself frustrated with it. I wanted a better ability to reuse code patterns. I wanted to have loose coupling between different pieces of UI behavior.

    This is the bit that I find mostly missing from this analysis, though it touches on it a bit when it talks about React components as higher-level primitives. But to me, it’s not just about sharing components between developers, it’s also about the organization of an application.

    The “platform” doesn’t expose such concepts. It’s a grown set of pieces of APIs for a wide range of functionalities, and not everything is very consistent. When I want a reusable piece, I often need some kind of combination of these functionalities. The platform itself does not let me express this. Web components are a long-standing but not very successful attempt making it happen. Something like React, for all its flaws, does.

    We don’t typically tell people to “use the platform” when they want to draw graphics on the screen. It’s curious to consider why. We know that doing graphics requires a lot of different functionalities, from drawing pixels to mathematics to loading a file in a particular format. We know that there are plenty of options to do each. We know there are high level frameworks (like game engines) that take care of a lot of the things for you. How is the web browser different? I think this is because it inconsistently plays the roles of both higher level framework and providing low level functionality.


    score 1 · canonical