Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Java IDEs


Stephen Graham asks:

> Also, I would appreciate any general comments people have in terms of
> working with Java GUI apps (Swing library or others).  Is Python/Tk a
> better option? My main concern is portablilty across M$, MacOS,
> Solaris and IRIX platforms, I plan to link to a C++ dynamically linked
> library (cross-compiled with GCC, or I have access to C++ compilers on
> all the mentioned platforms barring MacOS) for all the grunt number
> crunching.

I can't really comment on Java / Swing since it is a long time
since I looked at it. That long time ago, the Java GUI interface
was not really cross platform. (I would be interested to hear
what the situation is today. How's printing? Is awt still lurking there?) 

I also can't really comment on Python / Tk, except to say that
Python looks very clean, and has a syntax that is readily
understandable.

Python / Tk probably lags behind the native Tk stuff.

Tk itself has come on leaps and bounds in the last year or so.
Previously, it really didn't have a full featured widget set, and
was slow.

Tcl/Tk is now quite fast, with very powerful widgets indeed.
There are some extension widgets, TkTable, which are likely to go
into the core. TkTable is a table widget.

For combining C/C++, Python or Tcl would probably be the easiest, I
would guess. Check out a tool called SWIG which can automagically
take a header file and make Python, Perl, Tcl and Java bindings.

The biggest drawback people have with Tcl is the syntax, yet
I find it very very regular and easily understood within several days.

None of these tools are useful without a fair bit of reading
and playing around.

There are also tools for making a single 'executable' from your Tcl
scripts, C stuff for Windows, Linux and Macs.

In addition, there are some fantastic Tk extension packages. BLT
has a complete vector package and a graphing widget. There is
also a Tk broswer plugin for Netscape / IE, for web based
apps (BUT don't expect Joe random user to download it!)

For dialog boxes, Tk is very easy. There are layout tools, but you
don't need one. It is not too hard to have a very good looking dialog
box just by coding. Check out the grid layout manager.

Having said that, Java has a lot of momentum behind it. But my own
preference is to combine low level C with a scripting language.

The scripting language to do GUI, file massaging tasks (including 
Regex type stuff, associative array stuff, and socket / comms 
stuff); C to do the nitty gritty.

People who I respect do things differently.

I can't speak favourably of Perl. It certainly works, and has
masses of extension packages (including the Tk GUI interface)
and a lot of people use it. I never get any joy from looking at
Perl code, it really is hard to read. (However, it is still far
better than many alternatives and is definitely the right tool
in many, many cases).

I hope this has given you yet another perspective.

Jamie