in reply to Can Perl create its own searchable db?

I don't know enough about FlashMX to really say much, but I'll try anyway.

I see two basic ways (well, perhaps three or four, but two applicable ways) to get the data from the flash form to the perl script. Either the perl script can be accessable via HTTP (which doesn't neccessarly mean running a full webserver, but I'll get to that in a moment), or you can set up the frontend (the FlashMX program) to run the perl program with some arguments. They each have their own set of problems.

I suspect running a webserver is what you want to do. You can either set up a web server, and get your script to run as a CGI, or you can write a web server in perl. Either is fairly easy -- Apache and IIS are both easy to setup (for a simple server like this), and HTTP::Daemon is rather easy to use. Doing it this way avoids the contention and locking problems you'd have with doing everything on the client side.

You can also have the frontend simply call the backend with a bunch of parameters. However, if you do it this way, you'll end up with a long commandline, which windows may not like. Also, you'll have to deal with locking issues (file locking over a network isn't the easiest thing in the world, though you do have the advantage of a relitavely homogonious installed base, and only one file server). However, you won't have the administrative and security problems associated with yet another server.

I'm sure I'm forgetting somthing, but I normaly am. For that matter, "am" can refer to either being sure, or forgetting somthing... no what did I do with my brain again? It's around here somewhere, I'm sure.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

  • Comment on Re: Can Perl create its own searchable db?

Replies are listed 'Best First'.
Re: Re: Can Perl create its own searchable db?
by simp (Novice) on Jan 12, 2003 at 18:46 UTC
    If you are adventurous you could try to make your exe a perl script instead of a flash projector.

    Using Win32::OLE and/or this package Win32::GUI::AxWindow you should be able to coax perl into firing up a flash movie (swf) as a windowed activex control.

    Then you can get/put variables between the two without a webserver using fscommand() (from flash) here is a tutorial covering moving vars from flash to vb. I can't remember the method for moving vars from vb to flash but I have tried it based on another tutorial whose url escapes me right now.

    At least you can know it is possible.