254 points · by simonpure · 3y ago · 144 comments
- you still use html and a templating language for the views
- it mostly looks like old ssr code but you can transparently call methods on the server (like meteorjs)
- you get one of the best ORMs in existence with great relationship handling and generated admins
https://www.django-unicorn.com/examples/search
Not 1.0 yet but I'm using it in production and omgosh is it easy to crank out UIs.
> Note that all examples are deliberately left unstyled to present the simplest implementation.
I've looked at too many documentation examples that show a bunch of things at once, with unrelated tech, making it hard to understand the current point.
Also check out https://laravel-livewire.com (PHP) and https://hotwired.dev (backend agnostic; there are implementations for Rails and Flask) and https://htmx.org
This kind of shit might catch a manager's eye, not a developer's one.
Github and hackernews are both places where developers exchange ideas, so it helps if you explain which tech you build on and what challenges you faced.
This is literally a link to the source code repo!
php didn't use openai IIRC
i kind of cannot imagine what this would use openai for unless it's using it to write a web application for you. which is pretty ...not like php.
I think its a decent example project, its easily readable and you can understand what they're doing, but I think as a general rule its better to do something without external unrelated libs. An AI image generator just seems a bit too specific of an example for something that fundamentally has nothing to do with AI.
[1] https://github.com/reflex-dev/reflex/blob/919f239168d789056d...
[2] https://github.com/reflex-dev/reflex/blob/919f239168d789056d...
Of course, since it’s coming from Google, I suppose it shouldn’t have been quite so surprising.
https://nextjs.org/telemetry https://docs.streamlit.io/library/advanced-features/configur...
Seriously tho, when one sees the first word of a Python project with the description "Performant", or a project put Out There by someone with a handle not linked to a bio (even a fake bio)...
Anyway, software regs ARE coming because The Way of software developers has not been obscured from public view for some time now and the (relatively) recent ransomware of municipalities and hospitals resulting in deaths along with serious tensions among global powers have made it a priority. How ironic is it that Microsoft is best positioned to play the gatekeeper role? https://noguiltlife.com/wp-content/uploads/2023/01/scie-fi-m...
Hacker News is for serious discussions only --wow, already up to 119 comments already at https://news.ycombinator.com/item?id=36967829
"My-iy-iy time don't loooose it."
It sends the information to a remote server, so your IP is obviously shared as well. It also sends a "project_hash" as "distinct_id" which sounds like a unique tracking ID to me.
Installing all the python deps (250mb), and node_modules (500mb) , plus a package size of 3mb of js isn't a great look.
The 3MB of JS is in dev mode or prod mode? (Is this similar to the other comment where they were running in dev mode but when they ran in prod it was much smaller ~ 340KB?)
I wish them the best with their hosting platform.
I'd go so far as to say the patterns are so clean they're almost self-evident, which is remarkable lift for beginners or busy people just mocking up something functional.
So now you have some serious talent looking at the pain points people express about the platform, because ofcourse you want to keep the "devlopers, devlopers, devlopers" happy.
Personally I dont see the attraction of an all python approach to the web. The event driven nature of client side programming has no particular affinity with Python. While JS is clearly a monopoly, it doesnt strike as we are paying a huge price for the lack of alternatives. Maybe its just my lack of imagination. If people complain about JS frameworks is because of the choices and designs and burdens these imply, not the fact they are JS.
The area where an all-Python approach would be a radical new take that opens entirely new horizons is actually not the web, but mobile apps.
What you can fix, though, is an ecosystem built on a pile of left-pad-quality hacks that change every other week. Hence the various attempts to jailbreak the accidental monopoly JS was born with.
Unfortunately, this project doesn't even try to do that, and still relies on that pile of hacks. As such, it's never going to be particularly popular - why suffer most of the JS-ecosystem pain plus the additional pain brought by a transpiler?
Sounds like a pitch that would make VCs start falling over eachother
Yes, and earlier it was crypto, and earlier, $foo_buzzword, and earlier, $bar_hypeword, and earlier, SAAS, and earlier, client-server, and ...
It's not really much of a stretch to understand why they got funding.
Vercel is synonymous with Next.js and JavaScript, not Python. Flask and Django also don't have full integration with React like Next.js (Because it's all JS) and Reflex (Feature of the framework) do.
The value prop is very clear to me. Next.js is extremely popular for good reason, I see a lot of value in bringing that to the Python ecosystem as well, especially with all the Python ML SDKs.
Lets compare this with for example play https://www.playframework.com/ I know from this that it built on Akka, its stateless, aims for predictable resource consumption, has non-blocking io, etc. There is a ton of really important information on what does this web framework actually do that is really important when you are making a choice of a framework.
I have no idea how good this framework is, but besides a few toy examples, I can't see anything that makes me thing "wow this is great I need to use this". Using python to generate front end attributes isn't new, most any web framework can do this also.
No offense, but the play framework docs are objectively worse, it feels very "enterprisey" and too many clicks (the "Hello World Tutorial" spans 3 pages)
In general, I think the readme's not bad. I think the example is eye-catching, and I can imagine this would be really nice to make a prototype with. Whether or not it would scale well etc, yes, it would be good to have some of that detail. But I can see a really good use for it already.
Do we have benchmarks for this? More generally speaking, I don't see more technical differentiation besides it being a Python DSL. Nor do they provide numbers to back it up.
The others are the current latest version, python version we support, how many people are on our discord (A metric to see community activity), and a badge that points to our docs. I think all of these are important but open to suggestions on ones you think would serve a better purpose.
I've used Anvil [0] quite often in the past years for what seems to be a similar purpose (not affiliated, just a happy customer). Does someone know how Reflex compares?
So yeah, full on pivot into python. pip install shiny. Alright!
"No web development skills required. Develop web apps entirely in R I mean Python"...yeah that's not happening.
I realize TypeScript may be doing the same thing but that somehow tastes OK because it was purpose built for the task. (Although I abhor cleverness in general).
Do you mean internally in the library? None of the sample code has any type annotations.
1. huge programmer pool 2. tried and tested legacy code could be easily used / adapted 3. code quality / checkstyle plugins just worked 4. great testing tools
My main gripe was the compile time (often 2-3 mins)...whereas Adobe Flex would crank code out in 3 seconds.
Now, the new language models should help us push through the noise.
There is no denying the importance and usefulness of web apps. You and me may be fine writing JS/TS, but many don’t want to. Why shouldn’t there be an option that works better for those folks?
Really, I think the main driver for isomorphic Python web libraries like this isn't general web apps (though they'll get used for that, too), but the putting frontends on data science, ML, etc., stuff where Python is the dominant tooling language.
Which is why I'm a bit surprised that RPC/APIs still have as much overhead as they do, especially around types.
People use either Java, PHP or NodeJs.
And, while Phyton would not be my preferred choice for robotics, I did write kernels for small 'autonomous' mobile robotics a long time ago in C. The systems ran at 20 hz. I'm pretty confident modern embedded computers running Phyton can achieve 20 hz sense/think/act cycles.
Kind of a weird thing to say when the domain is web frontend where the default (which this wraps) is JS, another “scripting language”, to the extent that label actually means anything (which it mostly doesn’t.)
Tons of software exists for this reason. For example, somewhat relevant here, web apps in R via R Shiny: https://www.rstudio.com/products/shiny/
(There is also Shiny for Python IIRC.)
I'm in this camp.
For services that I'm building that are not heavily frontend reliant, I don't want to learn a whole new language and framework
There's a time and place for quick and dirty interfaces to kick off server-side code, which is what this feels like.
There is definitely that barrier to entry to have to write server side routes and html/js to interact with them.
Completely ridiculous!
But it is more like Python bindings for React and supports multiple web frameworks (Django, FastAPI, etc.).
[0]: https://reactpy.dev/docs/index.html [1]: https://github.com/reactive-python/reactpy
Still not the fastest, but not the slowest at least.
I'd see this as more like Svelte (or at least the projects I'd usually build with Svelte I might consider this for instead).