Hi all,

Recently, I was having a discussion with a programmer I really respect. The discussion was about a possible project. The concern for this project was making sure that the graphical user interface would work under any platform. The conclusion was that we would end up using JAVA. Now, I'm no great lover of JAVA, in fact ever since I started programming in PERL 2 years ago, I've started wondering why people would want to program in anything else. The conclusion I have come too recently, is that people use stuff like java because it comes with something perl does not. A GUI API that is truly cross platform that comes with the standard distrobution. The programmer I was talking to pointed out that the JAVA distro is really an environment and not just a language because it comes with all these things. After some thought, I came to the conclusion that the distro of PERL is also an environment but it does not have some of the same advantages.

Would it be a ludicrous idea for PERL distrobutions to come with a GUI API that is unique to PERL. I know from a programming aspect this would be a daunting feat. And at first, I'm sure it would not be included in the standard distro. Actually, at first I'm sure it would only be around as a seperate module. In the past I have seen many modules that would map over other libraries to give access to a GUI library. But from a programming stand point, wouldn't it be easier to have a single API for designing GUI's. I'm not saying get rid of the others. I'm saying introduce one that you know will work under the most platforms.

Of the few languages I have dealt with, PERL has helped me the most with accomplishing the things I want to accomplish. Of late, I have started writing apps for multiple platforms and the GUI issue has started to become a concern. It would be nice if I could write my application once and write it in PERL.

Sincerely :) pete

Replies are listed 'Best First'.
Re: GUI
by gaspodethewonderdog (Monk) on Nov 21, 2000 at 21:24 UTC
    Certainly I am not a huge fan of Perl/TK and if given a choice for something different I'd probably consider using it if my main goal was to make a stand alone application.

    However I think you may also be looking in a direction that isn't entirely necessary and is probably reinventing the wheel. With a particularly useful and cross platform interface such as HTML why aren't IE, Netscape, Lynx and the myriad of other web browsers fine? HTML is an especially easy way to create a simple quick and easy interface and there is enough extendability that you can quite easily bury yourself in complex designs and interfaces.

    Most of the work that I do, co-workers and friends in Perl that requires more than a rudemntary interface that can be done on the command line I usually just have the browser and CGI.pm handle it.

    In my mind I guess the effort that would need to be put into replacing Perl/TK probably isn't worth it, and although the Java API might sound like a good foot print or reference for a design it can't really mesh with Perl well. The biggest problem probably being that Java is multi-threaded and Perl is sort of with the implication that it isn't even supported. So a lot of the cool tricks that you can do with Java to make a GUI just wouldn't translate well into Perl without a significant rewrite.

    Maybe we'll see a whole new Perl out of 6 though and it may close a lot of the technical gaps that make many of these things difficult at best.

    And I also don't mean to burst your bubble or anything, I think that something *very* cool could be done right now in that space. There certainly are no short comings of web browsers, *NIX platforms or anything else. It is always good to have choices and it is especially fun to do something else somebody has done so you can do it better!

Re: GUI
by BigJoe (Curate) on Nov 22, 2000 at 00:38 UTC
    I have thaught of this too. It would be great if there was a GUI module like the DBI module. Make a common interface but then have drivers with a win32 or a TK, etc. Maybe someone wanting to create a great module set might see this and take notes.

    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.
Re: GUI
by swiftone (Curate) on Nov 21, 2000 at 22:23 UTC
    I think Perl philosphy has two main problems with this idea:
    1. TIMTOWTDI (though you leave options open, the basic philosophy still has problems. And a standard API would have problems with plug-in GUIS, because the way X-forms looks at windows (for example), and the way GTK does, are quite different)
    2. Cross platform? Java's not half as cross platform as the hype, and Perl has wider boundries yet. Tk and GTK are both striving for cross platform, and I think they both beat out Java, but they can't come close to everywhere Perl runs.
      I recently tried to write a simple Java counter just for kicks. I would have had to download a bit of stuff just to make the same code work in Navigator and IE. Geesh.

      I'd like a simple, easy to use GUI module, too. Something as universal as the CGI module, perhaps. But as a completely unversed newbie, I'd have to leave it up to high powers than I.
      Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.

      -Howard Aiken