The future of plugins and extensions with Hype

:ok_hand::+1:

Move here from other thread

Some thoughts (my opinion):

Hype is (still) on the trajectory of a big monolith that offers everything in a very controlled way. It focused only on its own capabilities as seen in the animation engine and the runtime. This constrains gave it its "powers" in world of browser wars and vendor prefixes as it could be the abstraction layer that make features work across devices.

Going forward the "basics" are slowly coming together across the browser sphere and the browser wars are pretty much over. If you would conceive of a Software like Hype today it would be much more generic and try to be an assembly hub for all the technologies emerging as they overwhelm even a big team of developers.

Plugins could solve this as it distributes the load across people implementing stuff and making it compatible and easily accessible. If Hype goes the route of plugins many of the things that already take up space like Matter.js, waypoints, sound support etc. could be plugins. Leaving you with a choice to even replace basic features with another approach provided by a plugin.

Only big problem I see with this is the animation engine is so custom and baked into the runtime (symbol lookup etc.) that it won't be replaceable and it's not the intention of Tumult to consider it therefor … this is a problem as many other plugins need a way to changes values over time and would always have an extra dependency on a tweening engine or each plugin will have to come up with its own approach.

1 Like

Thanks for your thoughts!

In many ways, items like waypoints and matter.js are already plugins in that they are conditionally loaded. Yet there’s a certain level of heightened runtime awareness these need. For example, just bridging matter.js and the Hype runtime is nearly ~1600 lines of code, with ~200 of which are highly interleaved into other Hype features such as flexible layout, movement, animation, vector shapes, and so forth. With any plugin API, there’s a balance between simplicity and reservation for 1st party features against expressiveness for 3rd parties. In cases like physics, I don’t even think a basic runtime could consider all the right end points – even call ordering can be highly important. This is just to say that going “full plugin” as a runtime structure can lead to interoperability issues or missed opportunities to combine features.

The flip side is that the Hype app and runtime were both developed knowing that there would always be new CSS properties to integrate, so adding property support is very easy and ripe for being part of a plugin structure (along with a few additional hooks).

3 Likes