Live data from Hacker News

Rio: Web apps in pure Python

github.com

41–50 of 205 posts

Re: Rio: Web apps in pure Python

#41
post #12

This kind "you don't need JavaScript, HTML and CSS" approach always fails flat. We already went down this route several times since the first dotcom wave and all the frameworks that tried to target the browser as if we don't need to know "JavaScript, HTML and CSS". Until we need to debug the application, or why it isn't rendering as it should. It is also why I am not a big fan of Blazor, even though I admire its engi…

At yes lets use a screwdriver to do something which a hammer was meant for and call it progress.

That is what I read when I read the title. People should think about what a language's purpose is before planning to interate a technological design around it. Python is very good for many things just not this...

Re: Rio: Web apps in pure Python

#42
post #12

This kind "you don't need JavaScript, HTML and CSS" approach always fails flat. We already went down this route several times since the first dotcom wave and all the frameworks that tried to target the browser as if we don't need to know "JavaScript, HTML and CSS". Until we need to debug the application, or why it isn't rendering as it should. It is also why I am not a big fan of Blazor, even though I admire its engi…

Remember GWT? I sure do.

Re: Rio: Web apps in pure Python

#43
post #34

Every framework, requires a learning curve. You need to spend time learning how it works, what are it's limitations and what not. The newer it is, the fewer components, help and support you have at your dispose. I don't like these frameworks because it tempts people to learn something that isn't going to get mainstream adoption. We already have to be careful when choosing a framework like React, vue, svelte etc... Ar…

What would solve these issues is backwards compatibility. I want to be able to write a full JS/HTML app, a full "framework specific" solution, and anything in between.

Let me migrate my current project into the new framework and see what the experience is like. Let me hack some stuff together for fun, only then I'll consider the framework.

Re: Rio: Web apps in pure Python

#44

Looks like htpy, but with some components and a different syntax? https://htpy.dev/

Unlike Htpy, this one has callbacks and state in Python.

Storing state in-memory is usually not a good idea for web apps, most use databases with persistence. I got curious and found the example code for implementing password-based authentication on SQLite. I don't think it's very compelling when the alternatives include Django.

https://github.com/rio-labs/rio/blob/41a6bb828c2e20eb7fdc5c6...

Re: Rio: Web apps in pure Python

#46

Earlier quoted context omitted.

+1 for Reflex. Truly amazing.

How is it writing React without multi-line lambdas? They are everywhere in JavaScript and I couldn't imagine my day-to-day without them!

Rio components are classes, so you could create a named class method and reference it. Obviously not the same thing as multi-line lambdas but it'd be the pythonic approach imho.

Re: Rio: Web apps in pure Python

#47
post #12

This kind "you don't need JavaScript, HTML and CSS" approach always fails flat. We already went down this route several times since the first dotcom wave and all the frameworks that tried to target the browser as if we don't need to know "JavaScript, HTML and CSS". Until we need to debug the application, or why it isn't rendering as it should. It is also why I am not a big fan of Blazor, even though I admire its engi…

Now, python having some experimentation like this is quite nice to see.

I agree with some of what you’re saying and it made me think of how common this is or not.

It appears this renders html using python syntax.

Just like any html avoidant libraries of JavaScript that need to be debugged.

React can have debugging too to output html.

Maybe less so but still the case for Rails for Ruby.

Re: Rio: Web apps in pure Python

#48
post #12

This kind "you don't need JavaScript, HTML and CSS" approach always fails flat. We already went down this route several times since the first dotcom wave and all the frameworks that tried to target the browser as if we don't need to know "JavaScript, HTML and CSS". Until we need to debug the application, or why it isn't rendering as it should. It is also why I am not a big fan of Blazor, even though I admire its engi…

It would be a lot easier if they didn't rename things. 'Text' becomes 'span' and 'justify' becomes 'text-align'. Unless there's more I'm missing, it looks like they've just added a layer of indirection. rio.Text(self.name, justify="left"), Becomes: Dataset 1 I'd prefer: rio.Span(self.name, text_align="left")

Using the term "justify" is very common outside of web. It's been used for decades in print ("left justify / right justify / center justify"). This is indeed a web project though, so I hear what you're saying.

Re: Rio: Web apps in pure Python

#49

These frameworks are cute, and I understand the desire to avoid the modern SPA JavaScript build systems, but it always seems like so much more work than just writing HTML. I swear, HTML/CSS + Flask + HTMX gets you so far these days. Then, you can throw in some AlpineJS for any inter-element interaction you need and build a responsive SPA without almost any JavaScript.

Alpine is great for your blog, but it's not even a little bit tempting for real world professional projects. Looking back at every project I've worked on there's no shot I would ever select Alpine for any of them.

These type of condescending comments really scream "I'm not even a web developer but here's my strong opinion as someone who only makes toy front ends to demo my data work"

Post reply on HN