+1. I feel like laughing (and then crying) when I see the GTK LAF.
It's yuck. How can one expect sleek and professional apps to be
written this way? Just not done. I started exploring PyGTK (and
Python).
For a long time Java has had many issues, both technical and political
and they will stick for a while. And the entry curve is still steep --
Swing is bloody hard and not very rich. I've never done much work in
GTK, but developing GUIs in Qt is just nicer with the tutorial
actually creating a little game[1]. I've done that tutorial with
highschool kids many years ago and it worked, they happily extended it
in the end. Despite Java being easier I can't see that working with
standard Swing libraries.
I think there will be a lot of adoption of server-side Java soon. Both
Debian and Ubuntu have set up Java taskforces, and I assume the other
distributions have similar structures. Tools like Tomcat will soon be
just an "apt-get install tomcat" call away, quite possibly even in the
core repositories. But if you ask an average Gnome dev about Java they
will still hate it and will continue to do so for a long time. KDE
might be a different story with the Jambi option.
If Sun would really care about the opinion on desktop Java, I'd
strongly propose fixing Swing. It still lacks basic features, not just
the smarter widgets like the aforementioned DatePicker, but even more
importantly an application framework to manage setup/teardown,
actions, session management and so on. What Hans Muller started looked
good, I hope it will continue soon. Little things like just adding
EDT-assertions all over the code would be good, too -- noone really
understands what exactly has to be on the EDT and what not, I
regularly see experienced developers arguing over it.
BTW: one of the technically most convincing Java apps in the Linux
world is FreeCol [2] -- not only does it not look like Java at all, it
also beats the SDL crowd of games with a full-screen mode that doesn't
screw up the keybindings of the window manager. Some people might say
"it's just a game", but I think it is quite convincing in terms of
what Java can look like. Acording to their history page they are fully
Java since 2003.
Peter
[1] http://doc.trolltech.com/4.4/tutorials-tutorial.html
[2] http://www.freecol.org/
distributions have similar structures. Tools like Tomcat will soon be
just an "apt-get install tomcat" call away, quite possibly even in the
core repositories. But if you ask an average Gnome dev about Java they
I guess so. I must admit that I haven't really tried Mono myself yet,
and that is due to previous experiences with MS as well as Gnome and
the way Miguel tends to write. So all personal and not technical :-)
>> If Sun would really care about the opinion on desktop Java, I'd
>> strongly propose fixing Swing. It still lacks basic features, not just
>> the smarter widgets like the aforementioned DatePicker,
>
> I don't think a DatePicker is a "smarter widget" in that it has always
> been a core part of visual basic and Delphi, and I have yet to see a
> corporate/business application which does not somehow involve the
> manipulation of dates.
It's smarter than most of the ones Swing comes with ;-)
> Again, it's caused by the missing component
> model which can also be witnessed inside Sun itself, they effectively
> sponsor two independent yet similar hierarchical table components, one
> through SwingLabs known as JXTreeTable and the other from OpenIDE
> known as Outline. As someone with considerable investments into
> JXTreeTable, this divide obviously scares me.
I don't really see the connection. In fact you call the two things
"hierarchical table components", so there is some notion of a
component, isn't it? ;-) I think the core problem here is that Sun
never expanded the basic widget set.
>> but even more importantly an application framework to manage
>> setup/teardown actions, session management and so on.
>
> It was not possibly for me to convince Hans into adding a restart
> functionality such as to avoid the aforementioned native wrapper of
> NetBeans. So now if you wish to change Locale in your application, say
> change the language from English to German, you will require the user
> to restart manually (due to the fact that Locale.setLocale() does not
> broadcast any events like a UIManager.setLookAndFeel() call would). So
> I don't see JSR-296 as a great time saver I'm sorry to have to say, a
> NetBeans RCP based approach would be my recommendation after having
> tried both.
That not only seems to be a feature way beyond the basic needs of your
average application, it also seems like the wrong thing to ask: if you
want to change the locale dynamically why don't you ask for the real
thing which would be swapping the locale in the running code.
I don't know what Hans' reason was to reject that feature, but my
first hunch is to follow his lead on that one. Too specific for a
first release when there is so much ground to cover in terms of
features most applications would use.
Peter
i've recently take a loot at openswing[1] framework who offer a great
escape for JTable and databinding. It has it's own DataGrid
implementation, which is really cool, because you can create it using
visual development in netbeans. So i think Delphi and VB developer
will have good reason to migrate to java.
But, this is not in java standard distribution, so hopefully more
developer promote it to others
--
It seems the link is broken. Maybe http://oswing.sourceforge.net/ ?
oh, yes, thank you for the correction
--
Senior Engineer @ ArtiVisi Intermedia
Java Training Center
See our course @ artivisi.com
I'm German ;-)
> Dynamic locale change would be the best, sure, but as I mentioned,
> when you call Locale.setLocale there is no event firing in Swing (i.e.
> no LocaleChangeEvent) that widgets, renders etc. could pick up on -
> contrary to what we know from UIManager.setLookAndFeel which does
> inform each and every component in the object graph that a new L&F has
> been set. You can work around this to some degree by manually trying
> to handle hooks in some custom LocaleRegistry but it does not work
> consistently in practice and it's very hard to maintain, especially
> with 3'rd part components which exercises their own view of the world.
Normally I expect an application to pick up the locale from my desktop
environment or OS correctly without me interfering at all. In the
applications I have written I tend to have an override option (e.g.
command line switch), but I don't really see the need for special GUI
features to make changing the locale easy since I would normally
expect a user to change the locale once the right one has been set.
Additionally: what stops you from writing your own application-level
event broker, where you can publish a LocaleChangedEvent that any
interested component can use to update itself?
>> I don't know what Hans' reason was to reject that feature, but my
>> first hunch is to follow his lead on that one. Too specific for a
>> first release when there is so much ground to cover in terms of
>> features most applications would use.
>
> Perhaps, but JSR-296 caches resources extremely aggressively through
> it's singletons (which is used pervasively) so there is just no way to
> change locale once the application has been realized. Again, if it can
> keep people from having to mess with native launchers (i.e. nb.exe on
> windows) then I have a hard time understanding why this is too
> specific. The only way I have been able to work around this is to
> extend the framework myself and place a bootstrap launcher for an
> application specific classloader in the launch method, however I was
> never successful in getting this working in a web start scenario so
> abandoned it.
>
> I still think it's fair to ask a swing application framework to be
> able to handle changing of Locale better than having to ask the user
> to restart manually - which get's tricky when you're running in an
> applet or webstart context.
I just fail to see the use case. Maybe I'm blind on one eye somehow,
but for me picking the locale is something to do only once, so it
don't see why you want to have that change made easier.
Peter
> I just fail to see the use case. Maybe I'm blind on one eye somehow,
> but for me picking the locale is something to do only once, so it
> don't see why you want to have that change made easier.
I can't explain it any other way than I have, so I guess we're just
not going to agree on this one. It's a real requirement on the
applications I've worked on however, not something I make up just to
argue ;)
I have no horse in this race, but if one person says, "I don't see a use case," and another says, "I do," then provided the second is not completely off his/her rocker, the first person is wrong. As programmers, we should be weary of making assumptions, kinda like "By the time people will need 4 digits to express years, this software will not be in use."
I totally disagree, that is the road to Wordiness. The development
team has to take care of the design of the user-facing aspects of the
product, which in case of an application is its UI (and the team
hopefully has one or more UI designers), in case of a library or
framework it is the API (and the team should have an experienced API
designer).
There is also a question of resource management. If you just do what
the loudest user wants you typically don't use your resources well and
you will probably never get into any mode where you truly innovate.
That's why I ask for use cases and tend to reject features without. A
use case (or even better "scenario" in the Cooper sense)
contextualizes a feature request and allows the designer of the UI or
API to integrate a user's needs into a consistent whole, instead of
just accumulating features. If a user can not provide that then I
consider it highly suspicious -- chances are that it will be a feature
that's not even going to be used.
From what Casper described his use case is that locales are broken in
his Citrix environment. That is a problem with that environment and
unless it is very common around the target group of the AppFramework I
would say it should have an extremely low priority. It sounds more
like a deployment issue than anything else.
Peter
You are still talking features here. The aspect I'm lacking is the
motivation in the story. You ask for a feature, but you don't really
explain why someone would need it. I could as well claim that a user
should be able to select an application-specific speed for the mouse
pointer on startup.
It's the motivational angle which distinguishes a good use case from a
plain feature request and it is what can make the difference in
creating something consistent instead of just collecting features.
Peter
Localization is there, you are asking for a more dynamic way of changing it.
> By your own logic, does the current
> ability to change L&F lack a good use case as well then?
The use case would be a person trying to find the right L&F for them.
A preview would work (as most desktop environments do), but you don't
want them to restart the application just to find out how it would
look under a different L&F. The locale should not need experimenting.
But even then I would still not consider this high priority looking at
the general state of affairs in the Swing world.
Peter
Ooops. I didn't even notice -- since I never wanted a GCJ or other
free Java stack I have always installed Java tooling manually. I
suppose I could have installed the Tomcat package this way and then
swapped the Java configuration around. I had been burned with these
approaches on SuSE before, so I got into the habit of just doing
anything Java manually.
So let's rephrase my statement: "soon you can run 'apt-get install
tomcat' and get a Tomcat running on the JDK you want without thinking
too much about it" :-)
Peter
Even in the bad old days of closed source Sun JDKs, the JPackage.org
project has made it possible to take the Sun JDK and meld it into
distribution specific RPM or apt packages. Such packages can
participate in the distribution's package dependency calculations just
as the GCJ packages can, thus given you a system where things are easily
managed. Here's my write up for JPackage back in 2004:
http://www.weiqigao.com/blog/2004/11/23/an_introduction_to_jpackage_org.html
However this approach turns out to be foreign and brutal for my Windows-
and/or Mac-oriented Java colleagues that when faced with the task of
setting up a Tomcat or JBoss server on a Linux machine, they'll try it
for five minutes and give up. They then proceed to do the manual
install of a whole bunch of Java stuff and run startUp.sh or some such
in a terminal after every reboot.
> So let's rephrase my statement: "soon you can run 'apt-get install
> tomcat' and get a Tomcat running on the JDK you want without thinking
> too much about it" :-)
Thanks to OpenJDK, Java life on Linux is getting better.
--
Weiqi Gao
weiq...@gmail.com
http://www.weiqigao.com/blog/