Hacker News new | past | comments | ask | show | jobs | submit login
Pglet – Web UI framework for back end developers (github.com/pglet)
94 points by d4rkp4ttern 51 days ago | hide | past | favorite | 36 comments



I tried it on a hello world example and was surprised to see that when I run `python test.py` it opens the app at a https://console.pglet.io URL -- it seems to copy my code into the cloud when I run it.


You need to run a local server via the pglet binary, and add local=True to pglet.app


That's an odd default to send it to the Internet...


And a disturbing trend that it is becoming so common as to be normalized.

Soon people are going to be asking "you don't have anything to hide, do you" when you want to run and debug locally.


For me it means that project is just a toy. Maybe an amazing one, but still.

In most of my positions in the past pushing random company data outside is a serious nono. I have enforced and agreed on that myself. So me using recklessly such a project naively thinking it will act politely means I might not have a job any more.

So - maybe I would play with it at home, but if I won't ever use it at a job (AGPL also adds to it), why bother?


I initially interpreted this as pg (postgres) let. Still interesting, but slightly disappointed


Yeah, I kept searching for how this used postgres and ultimately was disappointed. What an odd name.


Sounded lispy to me, so I thought it was Paul-Graham-let. ;)


Oh, no, I've missed my HN moment! :) Anyway, hope it's not too late to say hi and answer some questions.

Hi, I'm Feodor - the author of Pglet. The project is still in "alpha" and there is still a lot of experimenting around default modes and API will probably have some breaking changes going forward.

Thank you for the constructive feedback you guys gave here!

Re: licensing - Only Pglet Server is under AGPL at the moment, multi-language client libraries which are embedded in your app are MIT. Selection of AGPL is not final and was mostly influenced by recent fear/trend of big co incorporating your service into their cloud offerings.

Re: remote mode by default - your app code is not being uploaded to console.pglet.io, but it's UI is "streamed" there only. However, I agree this looks scary for the initial experience - will roll it back to "local" mode by default with explicit "publish" option.

Better docs, more examples and other languages support (Go, Rust, Deno) are coming later this year. Stay tuned!


The tortured ghost of CGI has entered the chat.

Seriously though, for small web apps, or even light REST API this could be useful


CGI is still going strong, supported by more Web servers than most things.


So this is basically a web version of Gtk-server? One then wonders if this couldn't have Gtk-server's interface. Or, vice versa, if Pglet interface couldn't be added to Gtk-server.


PyWebIO seems similar: https://github.com/pywebio/PyWebIO, it can turns python command line script into web with only very small change.

And PySimpleGUI mainly for Desktop: https://github.com/PySimpleGUI/PySimpleGUI



Terrible choice for a license. I never go near AGPL.


Presumably someone who chooses AGPL intentionally wants to exclude people who "won't go near AGPL", in which case this can't be a terrible choice, by construction.


Why?


Because most of us aren’t in a position where we can give away our code.

There is a minefield regarding using AGPL servers and I prefer working around it.

If I build AGPL code into my code or vice versa however it becomes very clear as far as I cam see: I have to provide a download link to the entire product.

For many of us that is not an option: My clients would of course reject that, and of course I would not use it for my own for-profit projects either.


I realise it's probably still no-go for enterprise, but from 'how it works':

> Pglet UI does not become embedded into your program, but is being served by an out-of-process Pglet server.

Which seems aimed at addressing what you need to share and under what circumstances.


It's dubious and untested whether the "but it's an external process" defense works against AGPL, especially when you're writing your program literally against the API of the project. It also seems inaccurate given the example from the README:

    . pglet.sh
    PGLET_WEB=true pglet_page
    pglet_add "text value='Hello, world!'"
Clearly code from the project (pglet.sh) is embedded directly into your "application".


> but is being served by an out-of-process Pglet server.

Then I guess it is a server and not a framework?

And if it is it only means we are going from well defined non-commercial and into the minefield that is using AGPL servers in a commercial setting?


Show me a demo of double binding data table with async loading, filters, sorters and groupers then we'll talk.


i'm convinced two-way binding is an anti-feature in reactive UI. bindings should flow one way from model to view, and view changes should be reflected back to the model via events.


Wt is a similar idea for C++/Java https://www.webtoolkit.eu/wt/ though seemingly more complete.


Looking at the Pglet docs, I don't think it is similar to Wt.


Looks really nice but sadly there aren't many PowerShell examples. I will stick to Universal Dashboard until they can provide some examples of this working with PowerShell.


For PowerShell at least, this one is the best:

https://github.com/Badgerati/Pode



Similar framework for Java: https://github.com/vadimv/rsp


I wish there was a Go client. Sad that the server is Go but they dont have any released Go bindings.


Looks like there's a Go client here https://github.com/pglet/pglet-go


Just looked through the source, that is not a client! There is only a constructor to create a "Page" but the page has no methods, and there is nothing else exported.


Fair enough, I only read the description, didn't check if it was complete.


Why isn't it just called Piglet?


already exists: https://ollycope.com/software/piglet-templates/latest/

also this one is very popular too: http://pyglet.org/

I would personally avoid the current name as it sounds phonetically the same as the above.


Also "pg" could be short for page -- as in PgUp or PgDown. So it's kind of cute in a sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: