Perhaps this is a good place to mention a buzzword. If one knows some JavaScript as well as Perl, they can make a powerful team. Using JavaScript to dynamically call the server and update a web page, one can get lots of Perl (or another language) goodness combined with JavaScript's access to the client and its DOM. The buzzword here is 'AJAX'.

Also, there are a number of tools meant to ease the production of AJAX-enabled web pages from Perl. Some seem to even lessen the need to know JavaScript well for more basic uses. AJAX gives us HTML::Prototype, HTML::Prototype::Js, OpenThought, AEAE, HTML::AjaxTags, JQuery, and more.

This doesn't give exactly the same kind of advantages that Flash and such do. However, it can get pretty close, and there's no plugin required. When (if?) SVG is standardized across browsers, it'll be even closer. JavaScript isn't in every browser nor allowed to be active at every location, but then neither are plugins.

A thought occurs to me that it wouldn't even be a good idea to focus efforts on securing a Perl plugin and promoting it. ActionScript is pretty powerful, and Flash is pretty widespread. There's nothing keeping other languages from compiling down to SWF, which is a more-or-less open format.

The HaXe language does just that. HaXe can target Flash, JavaScript, or nekoVM although what's possible is a little different in each case. Some of the functionality is through libraries, so the core language doesn't get polluted with target-specific abilities that don't exist on other targets.

Multiple backends is a goal of Perl6 IIRC -- parrot, a JIT, JVM, perhaps CLR, etc. Perhaps modules could be made that allow Perl5 and/or Perl6 with some graphics and sound lib calls to compile down to Flash. I'm not sure Tk, Gtk+, SDL, OpenGL, or whatever would be exactly suitable, but perhaps a subset of one or more of those could be squeezed in. A separate Flash library module might be necessary.

Update (2007-09-07 21:12Z): I've found references to SWF::Builder and SWF::File. Those require a some knowledge of the Flash concepts, but they look usable enough. It shouldn't be any harder than picking up a Perl interface to some other library. teabag has a pretty interesting CUFP using SWF::file at plong - a pong clone with SWF::File.


In reply to Re^2: Perl/Tk Applet for Web by mr_mischief
in thread Perl/Tk Applet for Web by neversaint

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.