kungfoo,monkee has asked for the wisdom of the Perl Monks concerning the following question:

Hey,

So here's what I need help to determine.

I've got a bunch of perl scripts that process XML files, and the end product of most of these script is in fact an XML file. Those scripts are done and work well. It's those XML files I hope that Flex will use, since Flex works pretty happily with XML.

Now I want an interface and I want to try work with adobe Flex. I am using Flex because it can do a lot of very nice visualizations for me. Unfortunately the Perl-Flex Community is not very large.

Here's what I need to know from people someone. I know that Flex can work great using Java or PHP for example with the intermediate of an ASP.NET or PHP server. I don't have those servers available to me, I've got all my Perl scripts on a UNIX server and I don't have a web server available to me, but I know I could set up Apache locally on my machine as a temporary fix. Do you think it could be possible to get Perl to communicate with Flex builder in a way similar to Java?

I know I need to consider how I am going to host this internet app, but at the moment I need to make it work locally so my supervisor can be happy...

I apologize if this isn't clear, I'll know by the replies. I admit, I am only learning all these tools because I needed to learn them for the project. I've never done client-server coding. I don't need someone to hold my hand through it, but maybe to tell me some useful tricks and if it's possible. I appreciate any help!

Replies are listed 'Best First'.
Re: Using Perl with Adobe Flex
by samtregar (Abbot) on May 20, 2008 at 21:10 UTC
    Why do you need Flex to integrate with Perl? Can't you just point Flex at the XML files Perl generated?

    -sam

      I need to also execute the Perl scripts with the files with user input from the flex interface...then yes I could just point flex to retrive those XML files..

        I think you should setup a web server and get your Perl code working as a CGI or mod_perl app. Then you can make requets from Flex and it'll get the XML in return. I know nothing about Flex but I bet it has the ability to make HTTP requests.

        There are some simple Perl-only HTTP servers on CPAN that might be faster to get going than Apache. If search.cpan.org wasn't broken I'd even find one for you! But Apache is a better choice if you have any interest in performance or stability.

        -sam