Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

A chat: Perl vs Java

by perlinux (Deacon)
on Mar 17, 2004 at 14:21 UTC ( [id://337335]=perlquestion: print w/replies, xml ) Need Help??

perlinux has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

I have a little question:
I'm a newbie and I would know the real possibilities of Perl and modules (of course :-P ) in the development of a chat with a simple graphical interface. All my friends (and maybe much people!) are thinking of this in Java!!
Give me your wisdom..

Thanks.

UPDATE:
I'm searching for differences between Tk and Java applets; it will be a little chat with areas and users with privileges etc.. It's the beginning of an idea, and this is a general question about modules to make it.
Thanks and excuse me for my english.

I have nothing to declare except my genius - O. Wilde

Replies are listed 'Best First'.
Re: A chat: Perl vs Java
by jeffa (Bishop) on Mar 17, 2004 at 14:40 UTC
    All my friends (and maybe much people!) are thinking of this in Java!!

    All the more reason to do it in Perl. You simply have not provided us with enough criteria, not to mention that this is a Perl community, and while a lot of us code in Java, most of us are going to say either use Perl ... or use the right tool for the job. It you are truly dealing with a simple graphical interface, then ANY language which provides the ability to do so is the right tool for this job. It's really up to your personal preferences from there.

    UPDATE:
    Just wanted to point out the a web page form could be considered a simple graphical interface ... i assume that you are talking about Tk vs. Java applets.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: A chat: Perl vs Java
by Abigail-II (Bishop) on Mar 17, 2004 at 15:13 UTC
    A few years ago, I followed a weeklong Java course. One of the exercises was to create a simple graphical chat client. It wasn't hard to do - but it wouldn't an exercise I would student do during a week long Perl course (I've given many Perl courses).

    Some aspects may be easier in Java than in Perl. Other aspects will be easier in Perl. So, the answer is, yes, you can do this in Perl, but it's not clear whether that's a better choice than Java.

    Abigail

Re: A chat: Perl vs Java
by hardburn (Abbot) on Mar 17, 2004 at 15:47 UTC

    If you're thinking along the lines of a webpage-based chat system (like the CB here on Perl Monks), then I'd say go for the Java. Having to refresh an entire web page every time you want to update the conversation is quite inefficient. Java applets can offer a true real-time chat.

    If you're not limited to doing this within a browser, than you have a stronger case for Perl. Or just document the protocol well and implement in both languages.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Re: A chat: Perl vs Java
by bean (Monk) on Mar 17, 2004 at 22:48 UTC
    Do the client using in a Perl terminal (curses) application using Curses or POE::Wheel::Curses just to prove you're hardcore...

    Seriously, though, I'd do the client in Java (for portability and the GUI capabilities) and the server in Perl - you should be able to find a messaging protocol that's been implemented in both (BEEP is a possibility, although it may be overkill) or in C (in which case you can use SWIG to wrapper it in both languages).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-24 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found