Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Perl GUI

by marto (Cardinal)
on Dec 29, 2024 at 12:03 UTC ( [id://11163422]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl GUI
in thread Perl GUI

No need to install anything extra, the default browser (like most) supports Kiosk mode and progressive web apps. A browser is a sound suggestion based on what was posted.

Replies are listed 'Best First'.
Re^3: Perl GUI
by Bod (Parson) on Dec 29, 2024 at 16:45 UTC
    A browser is a sound suggestion based on what was posted

    Yes! I feel you are right...

    Even if Tk is a better option to start with, a browser solution will be much quicker and easier to modify later if and when the scope of the project expands.

      And accessible on other devices without modification. Note that home assistant exists, supports all sorts of sensors (as well as many other integrations) provides all of this functionally out of the box.

Re^3: Perl GUI
by harangzsolt33 (Deacon) on Dec 30, 2024 at 16:21 UTC
    I understand that kiosk mode opens the browser in full screen, but that's not the main issue here. A browser window is not sufficient when a GUI requires constant live communication with the Perl program. Sure, you can write a webpage that sends stuff over the internet, and then somewhere your perl program captures that. And you could even install a web server package. But you said you didn't want to install anything extra, so... Anyway, can you imagine a paint software or a stock chart viewer where live data communication is required, and your perl program fetches the data and has to display it live on the screen? I don't know how that would work. In the case of the original post, maybe a live connection isn't necessary, because the temperature doesn't fluctuate or change so rapidly, but still... I'm not sure how one would solve this problem if more data was involved and live display was required.
      A browser window is not sufficient when a GUI requires constant live communication with the Perl program.

      It is if the web service is running on the localhost. I did this years ago. I created a Dancer2 app with SQLite backend that was a full blown indoor grow operation. The front end was a browser window with a single page. All calls were made with jQuery to the webapp. The front end had several widgets that you could move around and organize, and interacted with the GPIO to turn on/off lamps, humidifiers, fans etc.

      All this ran on a Raspberry Pi with a 5" screen, but I could also connect to it remotely which is a big plus.

      I never did completely finish or polish the project, but it can be seen at RPi::EnvUI.

      "A browser window is not sufficient when a GUI requires constant live communication with the Perl program."

      False. Front end using web sockets or pushing/pulling JSON from a perl back end, updating the GUI in real time. This is incredibly common.

      "And you could even install a web server package."

      My web perl framework of choice (Mojolicious) ships with everything needed to develop and run, including a web server.

      "But you said you didn't want to install anything extra, so..."

      Quote where I wrote this?

      "Anyway, can you imagine a paint software or a stock chart viewer where live data communication is required, and your perl program fetches the data and has to display it live on the screen? I don't know how that would work"

      Well, we've been round this loop a few times, you're not particularly knowledgeable and push back against any suggestions regarding modern software or development methods.

      where live data communication is required, and your perl program fetches the data and has to display it live on the screen? I don't know how that would work.

      Behold! I present unto thee, WebSockets!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11163422]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2026-02-18 21:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.