5 ms·
I get get benefit from it, and I saw what Dash and plotly can do for people with a bit of Python and a need for a quick UI. So I get the point of the project,
by BiteCode_dev 4y ago
I get get benefit from it, and I saw what Dash and plotly can do for people with a bit of Python and a need for a quick UI.
So I get the point of the project, I can see a mathematicians getting value out of this.
Still, I would advice against using this for anything else than a small project (in the current state):
- any action your perform means a round trip to the server. This is why the counter seems so slow. Everytime you click on increment, it goes through the entire internet, ask for +1, and get the answer, then update the page.
- easy things will be easy, but even the average things are going to be hard. Every time you will want something that is not provided out of the box, the workaround is going to be painful.
- you are coding with react, one of the most complicated framework there is, but with a layer of indirection turning it into a black box. You better hope everything goes well because I don't wish debugging that on anyone.
- the database layer is going to bite you if you start to get fancy. Guaranteed.
- if you need this, you probably can't assess security. So no way to know if your website is secured. In fact, you can pretty much bet it is not.
This means if you use it for something big, you will eventually hit some kind of a big wall. Or something kind of painful experience that will possibly harm the project.
But of course, if the alternative is to never having started the project in the first place, you should definitely go for it.
The deployment being a pain for most python dev, this alone will make your life way easier, and 99% of projects don't have more that a few requests per minutes and a couple of pages anyway.
Just know what you get into: this is a trade off, as everything in engineering, not a unicorn.
Also, this is the Y combinator, so I assume there is a bigger plan behind this.
Good luck to the creators though, anything that move the needle even is good to attempt.
- wg0 4y agoPlan probably is around a hosted apps model where apps can be embedded in iframes or similar. Vercel to fly, everyone is basically selling a flavour of Heroku with a desirable outcome of lower maintenance overhead. But yes, it is a tradeoff and the abstractions underneath are leaky. It is not just React but NextJS and then the whole NodeJS ecosystem which is surely one of the most challenging ones. That client/web part could have been tackled by writing a micro library in pure JS with no transpilers of any sort - and probably they might do it in future not sure how, but something like Brython[0] could be interesting. [0] https://brython.info https://brython.info
- np_tedious 4y agoYour > any action your perform means a round trip to the server. This is why the counter seems so slow. Everytime you click on increment, it goes through the entire internet, ask for +1, and get the answer, then update the page. Seems inconsistent with OP's > the frontend compiles down to a React/NextJS app, so from the end-user’s perspective it looks like any other website
- 8organicbits 4y agoTry using the example with WiFi off. The counter increments when WiFi is turned back on. OP is misleading.
- np_tedious 4y agoThat sounds like something you could write either way (update first, update after success, update in a gray or provisional-looking way until server success or error) in any react app, depending on your needs rather than a property of this framework. Sibling comment about Websockets perhaps more interesting explanation
- ovi256 4y agoIf the update business logic is server-side (which it probably is if it's written in Python), there's no way the front end can update without connectivity. Anything else would imply some neat but difficult transpiling of Python to JS/webasm to make that update code available in the frontend.
- BiteCode_dev 4y agoIn another comment, OP explains the framework uses websocket to send and get values from the python functions you declare. The python functions are NOT executed on the frontend.
- np_tedious 4y agoGotcha. So the basic "structural" stuff is translated to JS but any non trivial logic remains on server?
- akrymski 4y ago> any action you perform means a round trip to the server Meaning your server-side app is not stateless? Is there an instance for every client?
- BiteCode_dev 4y agoSince it's using websocket, there is no way around that: you need to have some sort of persisting instance for every connection.