Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Editable issues

Reply
Thread Tools

Editable issues

 
 
Arved Sandstrom
Guest
Posts: n/a
 
      01-31-2013
On 01/30/2013 09:04 PM, Arne Vajhj wrote:
> On 1/30/2013 6:34 PM, Arved Sandstrom wrote:
>> On 01/30/2013 12:32 PM, Lew wrote:
>>> Arved Sandstrom wrote:
>>>> Arne Vajh�j wrote:
>>>>> I strongly suspect that it is not:
>>>>> lack of GUI builder tools => desire to hand write Swing code
>>>>> but instead:
>>>>> desire to hand write Swing code => lack of GUI builder tools
>>>>
>>>> If I parse your English correctly, Arne, you're suggesting that folks
>>>> *prefer* to code Swing directly rather than make use of GUI builder
>>>> interfaces?
>>>
>>> No, he's suggesting that in this particular case the person might be
>>> deliberately
>>> doing it by hand. I guess programmers do that when they want to learn
>>> what they're
>>> actually doing.
>>>
>>>> Man, I'm not sure I buy that. I've suffered through writing Swing code
>>>> from scratch a few times, I don't see how it's any more useful to do
>>>> that than hand-coding JSF Facelets .xhtml and backing bean boilerplate.
>>>> Which is to say, not useful at all. You gain nothing over using GUI
>>>> builder tools, and you lose time better spent on real logic.
>>>
>>> Yes, even you have written Swing by hand. What's so odd that others
>>> might also?
>>>
>>> Didn't the experience teach you about Swing? That wasn't useful?
>>>

>> During the learning phase, sure. Makes sense.
>>
>> But in routine work, once I've gotten the technology, no, I don't want
>> to write all the tedious boilerplate. Swing, JSF, JPA etc - I generate
>> as much as I can if I can, or I wish I could if it's not possible. All I
>> really want to spend my time on is modifying the generated code.

>
> That requires the generated code to be as good as handwritten code
> to work.
>
> That is rarely the case.
>
> Arne
>
>

I disagree that the generated code needs to be as good as handwritten
code. Handwritten code at what stage - initial layout? Final layout?
Styled and beautiful? All the actions added? Actions all do something real?

You see my argument? At what point do you consider the handwritten code
to be done?

What I see as a complete waste of time is handwriting the code for
layout, for geometry. The generated code only has to give you an
initial, compilable decent representation of layout, that is all. It
doesn't have to be as good as several of the later hand-tuned stages.

AHS
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      01-31-2013
On Wed, 30 Jan 2013 08:32:09 -0800 (PST), Lew <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>No, he's suggesting that in this particular case the person might be delibe=
>rately=20
>doing it by hand


There is a generic problem with generators. If for any reason you
have to modify the generated code, it becomes impossible to maintain.
If you change at a high level your tweakings will be lost. If you
change at a low level, you must deal with the generated spaghetti.

You need a very good separation of visual and any other logic, so the
generator deals purely with visual code, with no need to jump outside
its box.

Generators sometimes give you stubs to insert your own code, but
figuring out how to use them is often much harder than just writing
the whole thing out long hand.

The other generic problem with generators is they are one more tool
you and anyone modifying your code has to learn. This drawback
suggests if you only have a little bit of visual code you should spell
it out longhand.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
Reply With Quote
 
 
 
 
Arne Vajhj
Guest
Posts: n/a
 
      01-31-2013
On 1/31/2013 10:26 AM, Peter Duniho wrote:
> On Thu, 31 Jan 2013 04:15:57 -0800, Roedy Green wrote:
>
>> On Wed, 30 Jan 2013 08:32:09 -0800 (PST), Lew <(E-Mail Removed)>
>> wrote, quoted or indirectly quoted someone who said :
>>
>>> No, he's suggesting that in this particular case the person might be delibe=
>>> rately=20
>>> doing it by hand

>>
>> There is a generic problem with generators. If for any reason you
>> have to modify the generated code, it becomes impossible to maintain. [...]

>
> This may be true of poorly designed GUI editors. But frankly, it does not
> _have_ to be true of all editors. In fact, to Arved's previous point, it's
> been my experience that the code generated by Microsoft's tools is very
> maintainable.
>
> The .NET WinForms GUI designer doesn't do anything except the initial
> initialization. This includes layout, initial property settings (such as
> color, text, customizing behaviors such as read-only text, etc.), and
> hooking up event handlers ("listeners" in Java-jargon).
>
> Customization of behavior involves overriding event responses, either with
> an actual virtual member override or in an event handler implementation,
> depending on specific needs and the situation. It's quite easy to do those
> things without abandoning the designer-generated code, or even the designer
> itself.
>
> Similar things are true for the WPF designers, though it's taken some time
> for Microsoft to evolve to a nice, seamless, integrated toolset there. (In
> earlier versions of WPF, there was a rudimentary designer in Visual Studio,
> while Microsoft expected the heavy lifting to be done in Expression
> Blend...my understanding is that in VS2012, they are shifting the Blend
> designer functionality back into the IDE).


> I've used and become disgusted with at least one iteration each of Java GUI
> designers in Eclipse and Netbeans, so I understand where Arne is coming
> from when he suggests you can always write better GUI code by hand in Java.
>
> But that's hardly something that _has_ to be true. It just happens to be
> true for the lame GUI designers that Java programmers have been subjected
> to.


I don't like the code generated by VS.

But there is one big advantage there. The partial class concept allows
to nicely separate the generated stuff from the manual written stuff.

Arne


 
Reply With Quote
 
Arne Vajhj
Guest
Posts: n/a
 
      01-31-2013
On 1/31/2013 5:21 AM, Arved Sandstrom wrote:
> On 01/30/2013 09:04 PM, Arne Vajhj wrote:
>> On 1/30/2013 6:34 PM, Arved Sandstrom wrote:
>>> On 01/30/2013 12:32 PM, Lew wrote:
>>>> Arved Sandstrom wrote:
>>>>> Arne Vajh�j wrote:
>>>>>> I strongly suspect that it is not:
>>>>>> lack of GUI builder tools => desire to hand write Swing code
>>>>>> but instead:
>>>>>> desire to hand write Swing code => lack of GUI builder tools
>>>>>
>>>>> If I parse your English correctly, Arne, you're suggesting that folks
>>>>> *prefer* to code Swing directly rather than make use of GUI builder
>>>>> interfaces?
>>>>
>>>> No, he's suggesting that in this particular case the person might be
>>>> deliberately
>>>> doing it by hand. I guess programmers do that when they want to learn
>>>> what they're
>>>> actually doing.
>>>>
>>>>> Man, I'm not sure I buy that. I've suffered through writing Swing code
>>>>> from scratch a few times, I don't see how it's any more useful to do
>>>>> that than hand-coding JSF Facelets .xhtml and backing bean
>>>>> boilerplate.
>>>>> Which is to say, not useful at all. You gain nothing over using GUI
>>>>> builder tools, and you lose time better spent on real logic.
>>>>
>>>> Yes, even you have written Swing by hand. What's so odd that others
>>>> might also?
>>>>
>>>> Didn't the experience teach you about Swing? That wasn't useful?
>>>>
>>> During the learning phase, sure. Makes sense.
>>>
>>> But in routine work, once I've gotten the technology, no, I don't want
>>> to write all the tedious boilerplate. Swing, JSF, JPA etc - I generate
>>> as much as I can if I can, or I wish I could if it's not possible. All I
>>> really want to spend my time on is modifying the generated code.

>>
>> That requires the generated code to be as good as handwritten code
>> to work.
>>
>> That is rarely the case.


> I disagree that the generated code needs to be as good as handwritten
> code. Handwritten code at what stage - initial layout? Final layout?
> Styled and beautiful? All the actions added? Actions all do something real?
>
> You see my argument? At what point do you consider the handwritten code
> to be done?
>
> What I see as a complete waste of time is handwriting the code for
> layout, for geometry. The generated code only has to give you an
> initial, compilable decent representation of layout, that is all. It
> doesn't have to be as good as several of the later hand-tuned stages.


Ah.

Then I think we are pretty close to agreement.

When writing GUI code, then I typical either copy paste from
somewhere else or use a GUI builder to get "something" and
then manual edit it from there.

(not so much GUI builder in Java since switching from JBuilder
to Eclipse)

Arne




 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      02-01-2013
On 01/31/2013 08:54 PM, Peter Duniho wrote:
> On Thu, 31 Jan 2013 11:04:38 -0500, Arne Vajhøj wrote:
>
>> I don't like the code generated by VS.

>
> I don't have to like it, as long as I don't have to see it or mess with it.
>
> And with the VS Designer, I don't have to. Even when customizing the UI to
> suit my needs, nothing about the Designer-generated code has to be touched.
>
>> But there is one big advantage there. The partial class concept allows
>> to nicely separate the generated stuff from the manual written stuff.

>
> But even prior to partial classes, the IDE used code regions to collapse
> the Designer-generated code. Either way, it doesn't really matter what's in
> the generated code, as long as it does what it's supposed to and the
> programmer doesn't have to mess with it directly (whether to customize the
> GUI behavior, or for some other reason).
>
> And in VS, that's how it is.
>
> It's true that without the partial class feature, a Java-oriented GUI
> designer couldn't be quite as seamless as what one finds in the .NET
> toolset. But I think someone with sufficient motivation could in fact write
> a GUI editor that works practically as well, even without that.
>
> They just don't seem to have yet. And IMHO this is one reason why at least
> some people eschew using Java for desktop apps. It's certainly a
> significant factor in why I stopped bothering and went back to using .NET
> for my day-to-day ad hoc projects.
>
> I can't prove that I'm typical. But it's likely I'm not entirely unique
> either.
>
> Pete


+1. That's how I see it, all of it, except better phrased. I also don't
much care about the VS-generated code, although I find it tolerable at
worst, pretty decent usually. Fact is, as Pete points out, it don't
matter - I can concentrate on interesting stuff and if I change layout
later VS won't trample it.

I also cannot see why someone couldn't write decent code generators for
AWT or now Swing, or JSF. As I pointed out previously, people have
accomplished just this, in Java and for Java/XML source, for process
designers and SOA type tools, which is considerably more complicated. So
I don't know why this is so bloody difficult.

Like I mentioned to Arne, I already have my workaround, because I can't
stand to waste my time writing JSF boilerplate. Thankfully I don't have
to write Swing - I've managed to stick to .NET for desktop GUIs.

AHS

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      02-01-2013
On Thu, 31 Jan 2013 07:26:22 -0800, Peter Duniho
<(E-Mail Removed)> wrote, quoted or indirectly quoted
someone who said :

>This may be true of poorly designed GUI editors


I tired out Symantec's many moons ago and have been shy ever since. I
think a similar thing happened with SCIDS where programs are
maintained as parse trees. Early efforts frightened people off.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      02-02-2013
On 1/31/2013 7:54 PM, Peter Duniho wrote:
> On Thu, 31 Jan 2013 11:04:38 -0500, Arne Vajhøj wrote:
>
>> I don't like the code generated by VS.

>
> I don't have to like it, as long as I don't have to see it or mess with it.
>
> And with the VS Designer, I don't have to. Even when customizing the UI to
> suit my needs, nothing about the Designer-generated code has to be touched.
>
>> But there is one big advantage there. The partial class concept allows
>> to nicely separate the generated stuff from the manual written stuff.

>
> But even prior to partial classes, the IDE used code regions to collapse
> the Designer-generated code.


Yes.

But that does avoid mixing generated and non generated up in source
control.

Or having to view the generated code when using a plain editor/

> Either way, it doesn't really matter what's in
> the generated code, as long as it does what it's supposed to and the
> programmer doesn't have to mess with it directly (whether to customize the
> GUI behavior, or for some other reason).


But of one do need to mess with it, then ...

> And in VS, that's how it is.


You have never heard of anyone using VS that wanted to do something
for GUI that required manual editing??

> It's true that without the partial class feature, a Java-oriented GUI
> designer couldn't be quite as seamless as what one finds in the .NET
> toolset. But I think someone with sufficient motivation could in fact write
> a GUI editor that works practically as well, even without that.
>
> They just don't seem to have yet. And IMHO this is one reason why at least
> some people eschew using Java for desktop apps. It's certainly a
> significant factor in why I stopped bothering and went back to using .NET
> for my day-to-day ad hoc projects.
>
> I can't prove that I'm typical. But it's likely I'm not entirely unique
> either.


I am sure there are other that do not like the Java GUI builders.

But I am convinced that the main reason for the low usage
of Java for desktop apps is the look and feel not being
sufficient native.

Arne


 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      02-02-2013
On 02/01/2013 09:08 PM, Arne Vajhøj wrote:
> On 1/31/2013 7:54 PM, Peter Duniho wrote:

[ SNIP ]
>>
>> They just don't seem to have yet. And IMHO this is one reason why at
>> least
>> some people eschew using Java for desktop apps. It's certainly a
>> significant factor in why I stopped bothering and went back to using .NET
>> for my day-to-day ad hoc projects.
>>
>> I can't prove that I'm typical. But it's likely I'm not entirely unique
>> either.

>
> I am sure there are other that do not like the Java GUI builders.
>
> But I am convinced that the main reason for the low usage
> of Java for desktop apps is the look and feel not being
> sufficient native.
>
> Arne


I think you're right about that latter. Desktop apps that I've written
for various platforms in the past few years, professionally that is,
have not been Java because they look like Java, not native. And I'll use
Mono before I use Java, on other OS's.

The pain of using Swing is there, it helps convince me not to use Java
for desktop apps, but L&F is a bigger factor, sure.

So for me the current painpoint with Java and GUIs is JSF, because I do
that quite a lot. Like I said, I finally bit the bullet and automated
the process for myself, so I can easily generated matching XHTML
Facelets pages and managed beans, for example.

AHS
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      02-02-2013
On Fri, 1 Feb 2013 18:12:21 -0800, Peter Duniho
<(E-Mail Removed)> wrote, quoted or indirectly quoted
someone who said :

>For my own part, if I had a Java toolset that worked as well as the Visual
>Studio/.NET combination


If you go that route, what do you think the lifetime of your code is
before either tools are dropped or evolve so your code no longer
works?

In HTML you do a lot of your layout with style sheets rather than
tweaking each component individually. I think we need something
similar for desktop apps. Maybe HTML 5 will evolve to fill that
niche.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      02-02-2013
On 2/1/2013 9:12 PM, Peter Duniho wrote:
> On Fri, 01 Feb 2013 20:08:10 -0500, Arne Vajhøj wrote:
>> [...]
>> But I am convinced that the main reason for the low usage
>> of Java for desktop apps is the look and feel not being
>> sufficient native.

>
> Well, I can't say I have data to dispute that. Far be it from me to try to
> dissuade you of your opinion.
>
> But it sure sounds like a pretty weak basis to me. If look-and-feel were so
> important, more of the .NET community would have jumped on the WPF
> bandwagon years ago, rather than continuing to write new WinForms apps
> today in spite of its entirely dated look.


WinForms may look dated, but it is still very Windows like.

> For my own part, if I had a Java toolset that worked as well as the Visual
> Studio/.NET combination, I'd invest a lot more time coding in Java.
> Granted, in that case it's not just the Designer. There are C# language
> features missing from Java that I appreciate and love too much. But the
> language feature issue is balanced somewhat by Java's superior
> cross-platform story, so certainly the GUI-building tools (or lack thereof)
> are a big part of what finally tips the scales in favor of .NET for me.


What did you try? JBuilder? NetBeans Matisse? Eclipse VE? Eclipse
WindowsBuilder?

Arne


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows XP Pro clean install issues, SP2 issues too... Howie Computer Support 9 07-12-2005 04:47 PM
Windows XP Pro clean install issues, SP2 issues too... Howie Computer Support 0 07-06-2005 07:12 PM
Re: Windows XP Pro clean install issues, SP2 issues too... pcbutts1 Computer Support 0 07-06-2005 04:58 PM
Re: Windows XP Pro clean install issues, SP2 issues too... pcbutts1 Computer Support 0 07-06-2005 04:52 PM
SNMP Issues in Cisco Routers; Vulnerability Issues in TCP =?iso-8859-1?Q?Frisbee=AE?= MCSE 0 04-21-2004 03:00 PM



Advertisments