On Thu, 31 Jan 2013 04:15:57 -0800, Roedy Green wrote:
On Wed, 30 Jan 2013 08:32:09 -0800 (PST), Lew <lewbloch@gmail.com>
wrote, quoted or indirectly quoted someone who said :
No, he's suggesting that in this particular case the person might be delibe=
rately
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.