Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Check out XUL-Node on CPAN.
    • Nice... I see it's a rather recent addition to CPAN. This is rather nice, but without proper xpcom support, wouldn't be as extensible. With XPCOM, everything that you can do DOM wise in the browser with javascript you can automatically do with perl, giving you the ability to have:

        <script type="text/perl" language="perl">
          my $text = $document->createNode('p');
          $text->{'value'} = 'Hello World';
          $document->body->appendChild($text);
        </s

      --
      -Scott McWhirter- | -kungfuftr-
      "JAWK - Just Another Whiny Kid"
      • Your example becomes, in XUL-Node:

            Window(Label(value => 'Hello World'));

        It is just a little Perl sugar over the API you showed.

        What can you do in Javascript with XPCOM that you cannot in XUL-Node, which makes it more extensible?
        • the full DOM API (including most of DOM2), things like dynamically append and reappend element nodes to different locations within the document. XUL::Node allows you to print elements very easily, but it doesn't let you mess about with that document once its been rendered. Some good documentation on this sort of stuff is along the lines of is to have a look at seamonkey's XPCONNECT ability and the python/ruby xpcom bindings.

          What would it mean... well say for example you've got a javascript event that fi

          --
          -Scott McWhirter- | -kungfuftr-
          "JAWK - Just Another Whiny Kid"
          • > the full DOM API (including most of DOM2), things like dynamically
            > append and reappend element nodes to different locations within the
            > document

            Next version will have support for disposal of nodes, and re-parenting.
            Very easy to add.

            > XUL::Node allows you to print elements very easily

            Yes it allows you add nodes to the document very easily.

            > but it doesn't let you mess about with that document once its been
            > rendered.

            You mean re-parenting and disposal?

            Or do you mean calling attribut
            • I suppose what i mean is, that XUL::Node is very dependant on their being an external engine which does lots of different bits and bobs. There's also this issue that you're using 2 extra layers (HTTP+JavaScript) which means that it's more prone to error.

              We've been doing something similar my current employer, but more on a HTML basis as posed to an XUL one and there are quite a few limitations to the RPC mechanism... for example:
              How do you make the software interact with external devices such as barcode

              --
              -Scott McWhirter- | -kungfuftr-
              "JAWK - Just Another Whiny Kid"
              • by eilara (5138) on 2004.07.01 17:25 (#32062)
                > I suppose what i mean is, that XUL::Node is very dependant on their
                > being an external engine which does lots of different bits and bobs.

                Do you mean the XUL::Node code itself? But if there was a viable Perl-
                XPCOM bridge you would be dependant on that. What is the difference?

                Anyway, nothing in XUL-Node does lots of anything. It is a very simple
                tool.

                > There's also this issue that you're using 2 extra layers
                > (HTTP+JavaScript) which means that it's more prone to error.

                Yes, you can now be hurt by XUL-Node developer Javascript errors. But
                this is only if XUL-Node is not done right. In which case I would not do
                it at all.

                There is also the issue of speed.

                Once you try it, you see these are non issues at all.

                > We've been doing something similar my current employer, but more on a
                > HTML basis as opposed to an XUL one

                Cool. The Half Object pattern is very useful.

                > and there are quite a few limitations to the RPC mechanism... for
                > example: How do you make the software interact with external devices
                > such as barcode scanners, smart card systems, ...

                As you say later in your post, these are Javascript security limitations.
                RPC is not the problem.

                Ok, I see what you mean. XUL-Node is not for you. It is focused ONLY on
                the XUL user interface concern. Not the full mozilla enchilada.

                It could be extended for what you want, but as you say, the extension
                itself would not be in Perl.

                XUL-Node is aiming to provide an alternative for web developers, not
                desktop developers.

                > XUL::Node looks lovely and i'll definitely be playing with it

                And tell me what you think!