Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

So I suppose I should chime in since my one huge Perl project at the moment is a desktop app that works precisely this way. I got my inspiration for it from the node GUI with HTTP::Daemon and I have to say that while I was poking at it the one thing that struck me was, wouldn't it be good if there were an API for this. Tomorrow when I get in I will see how well this API matches my program structure and hopefully that will give me the basis for a more useful reply.

Regarding threads, I've played with threads once or twice during the lifetime of this particular project, and so far the benefit isn't really hitting me. The only clean way I can think of to use threads is to simply start off by spawning two threads, one to handle the HTTP::Daemon loop and one to do any work not directly related to generating the response. I don't think spawning a thread for each request will be good because it's too much overhead.

In terms of security, the most important thing is that you listen only on localhost, which you're already doing. You could also try generating a magic key to go into the query string like Google Desktop does, but I have not yet figured out what the security benefit of that is.

And don't forget, this may be cross-platform but an application developer still has to deal with the issue of users actually having Perl. For applications, you might want to use PAR to package executables for the platforms the app needs to run on.


In reply to Re: A different approach to generating a GUI by Errto
in thread A different approach to generating a GUI by qbxk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found