Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #12521

Re: Swing is dead! Long live Swing.

From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
Newsgroups comp.lang.java.programmer
Subject Re: Swing is dead! Long live Swing.
References (4 earlier) <MPG.29acbd14a4041de9896f2@202.177.16.121> <6f72r.16359$L12.15612@newsfe23.iad> <MPG.29b489064e43ada39896f5@202.177.16.121> <jidthv$psp$1@dont-email.me> <MPG.29b7714321f8377c9896f6@202.177.16.121>
Message-ID <BAm3r.14416$vo2.12997@newsfe07.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2012-02-29 05:53 -0400

Show all headers | View raw


On 12-02-28 06:19 PM, Wanja Gayk wrote:
> In article <jidthv$psp$1@dont-email.me>, -@. says...
> 
>>> I've been frequently annoyed by tools that do their binding by matching
>>> Strings to classes or component names, because every time you move,
>>> refactor or mistype something you're bound to get screwed. And it likes
>>> to happen in the worst possible moments. I'd rather avoid it, if I have
>>> the choice.
> 
>> I tend to agree, strongly.  For situations where I might be tempted to 
>> just use strings, I try to substitute enums.  For example, instead of
>>
>>   bind( someComponent, "event-name" );
>>
>> I'd use this:
>>
>>   bind( someComponent, Events.NAME );
>>
>> It provides automatic syntax checking, and is much easier to refactor if 
>> names need to be changed or moved around later.
>>
>> Any thoughts on this idea?
> 
> I think the same way.
> I'm even going further and strongly propose preferring Enums to boolean 
> parameters and this is why:
> http://brixomatic.wordpress.com/2010/02/24/boolean-harmful/
> 
> Kind regards, 
> Wanja
> 
This little sub-thread I would have re-declared a few posts ago. You
guys are advancing good ideas, but confusing the issue by making it
sound like, in the context of the original discussion, that the end-user
developer of FXML is going to be worried about these details when in
fact he or she is not: it's the tools builder who is.

That changes the discussion radically. Tools often use techniques and do
things which sometimes cannot be recommended for the developer pool at
large, because they are tricky and/or dangerous, and only above-average
programmers ought to be doing things like that.

I happen to agree in general that you use enums when you can. I don't
see what these recommendations for Joe Average Coder have to do with a
discussion of potential tool support for FXML.

AHS
-- 
-- Gaiety is the most outstanding feature of the Soviet Union.
Josef Stalin, November 1935

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Swing is dead!  Long live Swing. Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2012-02-15 19:25 -0800
  Re: Swing is dead!  Long live Swing. Roedy Green <see_website@mindprod.com.invalid> - 2012-02-15 20:13 -0800
    Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-16 18:33 -0500
  Re: Swing is dead!  Long live Swing. Novice <novice@example..com> - 2012-02-16 19:13 +0000
    Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-16 18:32 -0500
      Re: Swing is dead!  Long live Swing. Novice <novice@example..com> - 2012-02-17 16:35 +0000
        Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-17 18:00 -0500
          Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-27 21:05 -0500
  Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-16 18:29 -0500
    Re: Swing is dead!  Long live Swing. Knute Johnson <nospam@knutejohnson.com> - 2012-02-16 15:50 -0800
      Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-16 18:52 -0500
        Re: Swing is dead!  Long live Swing. Knute Johnson <nospam@knutejohnson.com> - 2012-02-16 16:01 -0800
          Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-16 19:07 -0500
        Re: Swing is dead!  Long live Swing. Wanja Gayk <brixomatic@yahoo.com> - 2012-02-20 20:27 +0100
          Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-20 18:39 -0500
            Re: Swing is dead!  Long live Swing. Wanja Gayk <brixomatic@yahoo.com> - 2012-02-21 02:09 +0100
              Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-20 20:28 -0500
                Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-20 20:29 -0500
          Re: Swing is dead!  Long live Swing. Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-25 11:37 -0400
            Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-25 10:58 -0500
            Re: Swing is dead!  Long live Swing. Wanja Gayk <brixomatic@yahoo.com> - 2012-02-26 18:24 +0100
              Re: Swing is dead!  Long live Swing. markspace <-@.> - 2012-02-26 10:27 -0800
                Re: Swing is dead!  Long live Swing. Lew <noone@lewscanon.com> - 2012-02-26 13:16 -0800
                Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-26 18:05 -0500
                Re: Swing is dead!  Long live Swing. Wanja Gayk <brixomatic@yahoo.com> - 2012-02-28 23:19 +0100
                Re: Swing is dead!  Long live Swing. Lew <noone@lewscanon.com> - 2012-02-29 00:00 -0800
                Re: Swing is dead!  Long live Swing. Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-29 09:10 -0800
                Re: Swing is dead!  Long live Swing. Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-29 05:53 -0400
                Re: Swing is dead!  Long live Swing. Wanja Gayk <brixomatic@yahoo.com> - 2012-02-29 11:11 +0100
              Re: Swing is dead!  Long live Swing. Lew <noone@lewscanon.com> - 2012-02-26 13:16 -0800
                Re: Swing is dead!  Long live Swing. Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-26 19:32 -0400
                Re: Swing is dead!  Long live Swing. Lew <noone@lewscanon.com> - 2012-02-26 16:59 -0800
                Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-26 21:03 -0500
                Re: Swing is dead!  Long live Swing. Lew <noone@lewscanon.com> - 2012-02-26 21:22 -0800
                Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-27 21:00 -0500
                Re: Swing is dead!  Long live Swing. Wanja Gayk <brixomatic@yahoo.com> - 2012-02-28 23:34 +0100
  Re: Swing is dead!  Long live Swing. markspace <-@.> - 2012-02-16 16:43 -0800
  Re: Swing is dead!  Long live Swing. Roedy Green <see_website@mindprod.com.invalid> - 2012-02-17 09:24 -0800
    Re: Swing is dead!  Long live Swing. Arne Vajhøj <arne@vajhoej.dk> - 2012-02-17 17:52 -0500

csiph-web