Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Choosing a GUI scripting language

by Tanalis (Curate)
on Nov 22, 2002 at 08:43 UTC ( [id://215032]=perlmeditation: print w/replies, xml ) Need Help??

Monks,

This is a subject I've been meaning to post about for about the last week or so, for various reasons, most importantly to find out what the rest of you think on the matter.

I work for a Very Large Corporation, and, as such, we have a large amount of "custom" software/scripts, simply because we have to be certain that everything does exactly what it's supposed to be doing. Much of this was developed in-house, and much of it is written in Perl (using a whole variety of versions from 4 up), making use of whichever modules were around at the time to make life easier.

Now, as part of my work at the moment, I'm developing a series of GUIs to sit on top of a shiny new database that we're (also) developing to allow users to, well, interact with the database.

It's important that these GUIs be portable (we use both WinNT and Unix), and the GUIs themselves will have little function except as a pretty front-end for data entry and updates.

I'm looking at my language options to code the GUI itself. The obvious choice is Perl, with Tk or a similar module to handle the widgets. A part of me, though, is saying that that's not the best way to go - and I'm looking as well at the possibility of using Java with the Swing toolkit (or something similar).

Java, in my opinion, would have a number of benefits - it's web-deployable for a start, which makes installation and revisions much easier than having to update a number of user systems sequentially. I guess I also see it as a language better-suited/better-equipped to handle a complex GUI than perhaps Perl/Tk.

On the other hand, most of the people here are Perl coders with little or no Java experience .. from a code/application maintenence point of view, that could make life a little more interesting. As such a large proportion of our code is already Perl, I guess it also makes sense to stick with that for consistency purposes.

I guess I should mention that Perl and Java aren't the only options available, although they do seem the easiest/most obvious choices.

I'm interested to know what others think about this - what would you choose, language-wise, in my situation, and why? Both seem to have benefits and drawbacks, as far as I can see, and it doesn't seem as clear-cut as I thought at first. I'm a firm believer in using the right tool for the right job, it just seems a little more difficult to choose that tool right now.

-- Foxcub

Replies are listed 'Best First'.
Re: Choosing a GUI scripting language
by AcidHawk (Vicar) on Nov 22, 2002 at 09:14 UTC

    I work for a large outsourcing company where we have to manage customers sites, which includes servers, network devices as well as applications and databases. As you can imagine there are tons of tools and databases with infomation on the operational health of each customer. Too make matters worse this is an international company.

    Most of our tools are also developed internally to our company and are almost all in perl. We started developing a toolkit that would incorporate certain of the tools (starting and stopping services, queries on certain databases, some graphing and reporting etc) The problem we had, was having to distribute the binaries and libraries and keeping versions updated and the same throughout the enterprise.

    So we decided to put the tools on an intranet and use cgi to do most of the gui stuff in forms. This was we have 1 version of this toolkit and everyone can use it the SAME. Should we need to make changes we do it in one place.

    The reason we stuck with perl is because all the guys can currently work in perl and only 1 out of 5 can work in Java. One of the other guys is looking into PHP but we all kinda agree that from a support point of view it is far easier if we all use the same language. Working well for us so far.

    -----
    Of all the things I've lost in my life, its my mind I miss the most.
Re: Choosing a GUI scripting language
by cjf-II (Monk) on Nov 22, 2002 at 09:42 UTC
Re: Choosing a GUI scripting language
by Abigail-II (Bishop) on Nov 22, 2002 at 09:48 UTC
    I'd stick to Perl. For what you are describing what the tool needs to do, I figure it would take about the same amount of work to do it in either Java or Perl. Which means that if your coders are mainly Perl coders with little Java experience, Perl would be the way to go.

    It isn't wrong to pick a language based on the programming knowledge that's available. ;-)

    I'd be interested to hear what other options you are considering. C?, C++?, Python?

    Abigail

Re: Choosing a GUI scripting language
by dingus (Friar) on Nov 22, 2002 at 09:35 UTC
    Now, as part of my work at the moment, I'm developing a series of GUIs to sit on top of a shiny new database that we're (also) developing to allow users to, well, interact with the database.

    It's important that these GUIs be portable (we use both WinNT and Unix), and the GUIs themselves will have little function except as a pretty front-end for data entry and updates.

    This looks like the sort of problem a webserver intermediate tier solves. This has loads of benefits - such as no need to roll out libraries of perl to all your users, ease of maintenance...(copy & past other benefits from your favourite 3 tier arch slideset) - and makes the whole thing just a question of a CGI-script (the CGI script coul dbe a java servlet or a perl script)

    If you want to use Java then of course you can do so but from what I'm reading the GUI requirements are pretty minimal and these days people are instantly familar with browser based queries.

    Dingus


    Enter any 47-digit prime number to continue.
Re: Choosing a GUI scripting language
by simon.proctor (Vicar) on Nov 22, 2002 at 12:25 UTC
    You could also consider using Jython for this as you can, effectively, script Java classes together.

    However, I wonder why you cannot simply use a web interface and make use of the excellent templating tools already available to you? This way the target user needs only a web browser and login and reduces any complexities of installing and maintaining revisions of software at each and every client.

    Seeing as you admit there is little or no Java experience, attempting any form of Swing is going to be a very big job. Writing Swing is fairly easy but writing Swing well and stably (is that a word?) isn't. Believe me I know ;P.

    As mentioned above, you could make a middleware tier and simply query it via SOAP and abstract your data management even further if you found it necessary to. This would tie in nicely either with a GUI or web-front end.

    HTH
Re: Choosing a GUI scripting language
by MadraghRua (Vicar) on Nov 22, 2002 at 23:48 UTC
    We tend to use the web page approach as well. GUI wise we are mainly using GD from Lincoln Stein and the SVG modules (based upon the work done at Adobe). Try out SVG essentials and Programming web graphics with Perl and GNU software - both O'Reillys - for a bit more insight into this.

    MadraghRua
    yet another biologist hacking perl....

Re: Choosing a GUI scripting language
by zentara (Archbishop) on Nov 22, 2002 at 14:56 UTC
    Don't overlook Gtk-perl. It has a nice tutorial at Gtk-perl. It is not as well supported as perltk, but it has the advantage of being able to port your scripts to c easier.
Re: Choosing a GUI scripting language
by derby (Abbot) on Nov 22, 2002 at 18:27 UTC
    I'd have to agree with AcidHawk. Set yourself up a an intranet webserver and let HTML forms be your GUI. HTML/Perl/RDBMS is pretty much bread and butter these days.

    -derby

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://215032]
Approved by rob_au
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-24 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found