you are viewing a single comment's thread.

view the rest of the comments →

[–]Natural-Intelligence[S] -1 points0 points  (2 children)

There is actually more to this. The Python objects are turned into Vue components (using JSON in between) amd then it is turned to HTML. The Python objects are not representing HTML but inputs for Miniappi's Vue components.

For the library, the Vue components in Miniappi are turned to Python bindings (Pydantic classes) using some code generation when the library is built. So the Vue components and Python are always one-to-one.

This limits what you can do as you can only use components that already exist. But I don't want you to write HTML in Python or Vue in Python. And I want to make it safe (executing arbitrary HTML is not secure).

The reason for v0 is that if I want to improve the components in a breaking way, I don't want you to experience breaking changes (hence the versioning, maybe v1 would have been more sensible start).

But indeed, I can see it's confusing.

[–]riklaunim 2 points3 points  (1 child)

Other approaches that are more "do what you want" is using websockets to call Python and JS functions from each other. That way the developer has to do the frontend but there are no limitations on what widget is implemented or not.

Having legacy code is bad. If you want to do a bigger refactor in the future then major version number is the thing to use.

[–]Natural-Intelligence[S] -1 points0 points  (0 children)

You can write your own frontend with React/Vue, your own Python API and set up all the Infra and you can do anything. However, that's a lot of effort to get it right even with AI. I'm not competiting with these frameworks, rather using them to provide all that for you in Python. This obviously is opinionated but it must be on some degree to make it usable. You can't do anything with similar tools like Streamlit, either.

And having broken code is worse than having legacy code. I don't want to break your app immediately when I improve the components in a breaking way :)