Live data from Hacker News

Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

news.ycombinator.com

321–329 of 329 posts

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#321

You could make about a trillion dollars if, instead of asking people to write Python, you just gave them a WYSIWYG and let them build web apps by pointing and clicking like in MS Publisher/Powerpoint. Literally everyone in the world would buy it to make their own web pages. I get that nerds like to write code, but it is really depressing that we still can't just point and click and share content on the internet, we n…

Most graphical tools with WYSIWYG miss version control and the ability to show diffs between versions. But this is very important for debugging web apps and also for collaboration between developers. Also if the logic is more complex than a simple If-Else, you can express that much shorter and more efficient with text instead of a graphical representation of some tree.

But note there is one area where GUIa are used for coding: game development. But Unreal 5, Unity etc. don't exactly have a simple GUI.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#322
post #171

Earlier quoted context omitted.

Then you might like Rails 7 which defaults to Hotwire for a minimal-JS front-end.

In simple terms, what does Hotwire mean / provide?

Hotwire allows you to handle front-end page/view updates and state from the server instead of relying on an SPA framework. Rails sends the minimal amount of JS to update the page without a full reload and for many use cases it's all you need. When you click a link configured with Hotwire turbolinks intercepts the call, fetches the new content from Rails and strips out everything except the body tag and its contents then uses that, with a sprinkling of JS, to update the page/view.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#323
post #81

I'm not exaggerating but this might just be the highest impact library I've seen. As a backend developer who has lots of great project ideas but bail at the thought of having to use JavaScript and HTML, this library is a godsend! My only question is why it took so long for someone to implement it? And where are the equivalent libraries for Go, Rust and Java?

> And where are the equivalent libraries for Go, Rust and Java? Not aware of anything yet for Go/Rust, but Java and Python have had libs like this for a while now (to the point that Pyjamas hasn't been updated in a decade): * GWT (Java) * Pyjamas (Python) * Vaadin (Java) Those are general purpose. After that you have the sci/data-oriented python frameworks like dash, streamlit, etc.

One for C++ is

https://www.webtoolkit.eu/wt

by https://www.emweb.be/

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#324
post #271

Earlier quoted context omitted.

The state is updated through Python functions that are run on the server, so the state needs to be on the server

Why don't you just transpile the frontend Python code to JS at build time and just have normal HMTL/JS/CSS in the final deployed web app with a Python backend? You've mentioned no-code tools. For a client, I had to work with the no-code tool Bubble a lot. They do something similar, where the front-end is not built statically but dynamically and uses WebSockets to communicate with the back-end. I don't think this is a…

> front-end is not built statically

In fact the Pynecone frontend is built statically. But UI event handlers are run on the backend. The latency scenario is identical to if you used HTMX or Hotwire or a traditional web server. You click, it gets posted to the backend, an output comes back and is rendered.

The click counter thing is contrived and maybe Pynecone should have avoided centering on that, since the users they're targeting for sure don't care about frontend-only click counters.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#325
post #271

Earlier quoted context omitted.

Why don't you just transpile the frontend Python code to JS at build time and just have normal HMTL/JS/CSS in the final deployed web app with a Python backend? You've mentioned no-code tools. For a client, I had to work with the no-code tool Bubble a lot. They do something similar, where the front-end is not built statically but dynamically and uses WebSockets to communicate with the back-end. I don't think this is a…

> front-end is not built statically In fact the Pynecone frontend is built statically. But UI event handlers are run on the backend. The latency scenario is identical to if you used HTMX or Hotwire or a traditional web server. You click, it gets posted to the backend, an output comes back and is rendered. The click counter thing is contrived and maybe Pynecone should have avoided centering on that, since the users th…

Is it possible to take the optimistic approach and update the UI before getting response from the back end? Obviously for simple things, like counters, that need an immediate update to the UI.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#326

Earlier quoted context omitted.

> front-end is not built statically In fact the Pynecone frontend is built statically. But UI event handlers are run on the backend. The latency scenario is identical to if you used HTMX or Hotwire or a traditional web server. You click, it gets posted to the backend, an output comes back and is rendered. The click counter thing is contrived and maybe Pynecone should have avoided centering on that, since the users th…

Is it possible to take the optimistic approach and update the UI before getting response from the back end? Obviously for simple things, like counters, that need an immediate update to the UI.

You could designate some handlers to be “frontend-only” and then compile them to wasm or js and run them in the browser. There might be usability/ergonomics issues with having “special” functions that don’t really work like normal ones.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#327
post #322

Earlier quoted context omitted.

In simple terms, what does Hotwire mean / provide?

Hotwire allows you to handle front-end page/view updates and state from the server instead of relying on an SPA framework. Rails sends the minimal amount of JS to update the page without a full reload and for many use cases it's all you need. When you click a link configured with Hotwire turbolinks intercepts the call, fetches the new content from Rails and strips out everything except the body tag and its contents t…

That's sounds pretty good, actually.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#328
post #15

I started as a backend dev, moved to full-stack and initially didn't find JS too alluring. I've since liked JS for frontend stuff (not so much backend still). I _really_ like Dash for some things but quickly find myself hitting the boundaries of it's use cases. I will def have to check this out and keep it on my radar. I used to work for a consulting place where we would have to spin up tons of one-off apps and this…

What are the edge cases of Dahs you ran into?

Basically handling user input/dynamic content becomes a bit painful. Usually this is just a case of trying to extend Dash beyond what it was designed to do though.

Say for example, you have Model A on a server which has parameters X, Y and Z.

To load Model A in Dash is easy enough. To load its parameters as inputs with all those callbacks and imports becomes a bit messy. I've found react to just be better for that, at the end of the day.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#329
post #69

Earlier quoted context omitted.

Have you tried Django? https://www.djangoproject.com/

In my experience using Django for my webapps hasn't meant I can avoid HTML and javascript. Writing templates is writing HTML, and any relatively fancy UI including charting etc. requires using javascript

well, I am not sure how you can build a webapp by avoiding HTML, JS and CSS.
Post reply on HN