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
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.
| [reply] |
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 | [reply] |
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
| [reply] [d/l] |
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).
| [reply] |
|