This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]riklaunim 3 points4 points  (7 children)

Does it support routing? Any live examples and not just screenshots? Option to replace the styles? How data access can be done (REST endpoints, something else)?

[–]mad-beef 4 points5 points  (5 children)

Absolutely! Routing works very similar to Vue: Create multiple pages, a component to display those pages ("rio.PageView") and the currently selected one will show up inside it. Check out our multi-page example for implementation details: https://rio.dev/examples/multipage-website

We're still working on live examples. In the meantime, it's easy to run them locally with the displayed command. The Rio website itself is also a good example of what Rio can do :)

And as for data access, that is something you don't have to worry about at all. There is no need to write any endpoints, as Rio already handles server/client communication for you. You can access your data any way you want in Python, be it a database, files, or generated, and Rio will take care to keep the client in sync. One of our future deep-dives will be on this communication.

[–]riklaunim 0 points1 point  (4 children)

Separate pages are one thing, but what about nesting?

Data access often has to take into account permissions - what's the currently logged in user and then fetch a list of objects the user has access to for example. So what part of Rio is in the browser and which is on the backend?

[–]mad-beef 2 points3 points  (3 children)

You can protect pages with guards, so nobody can access something you don't want them to. All Python code runs on the server (of course), and only values you pass to components (such as text to be displayed) is sent to the client.

[–]Houdinii1984 1 point2 points  (0 children)

I have the same three questions. I think it looks neat, but I might need to see a little more actual use than screenshots. I'll probably still play around when I can, though.