[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: SWT History and Design Decisions (WAS: [platform-swt-dev] AWT Toolkit using SWT (was: From Swing to SWT))
|
Why do you claim that static-generated code is so evil? I
vastly prefer it.
A few
reasons it's better than resource-file usage:
- Performance-wise, it'll always beat parsing a
file then creating the UI.
- Note that this can depend upon the way the code is generated -- a
good code generator should be able to optimize and determine where lazy
instantiation would be useful.
- Debugging-wise, you can walk through the UI being built (and
it makes sense), as opposed to walking through generic builder code that walks
a GUI description. (This is similar to why LL parsers are so much easier to
debug than LALR parsers, if that means anything to anyone -- I'm a compiler
guy ;)
- Security-wise, it's a heck of a lot harder for someone to mess up the
UI (they cannot simply edit a textual representation of the UI and mess it
up)
- If
someone wants to tweak the generated code, they can. (Note that
this is a bad idea, IMHO...)
OTOH,
having a textual representation to manipulate can be nice if you want
the end user to be able to tweak the UI. However, they cannot tweak in the same
manner they could tweak the generated code. (Of course this in itself is a good
thing ;)
Another argument for textual representations could be that you might be
able to use the same description for several different languages and
environments, though the representations typically chosen usually are quite
specific to one language or another.
--
Scott
Bob Foster wrote:
So where's your GUI builder? (Or Scott's, for
that matter? ;-)
http://opendoors.com/conga
Download
it for a free 30 trial. Also, be sure to read the link on the page and in the
distro, "A Guide to Using Conga with a Team of Graphic Artists and Java
Programmers". I believe Conga is completely production grade. Please be sure
to drop me a note with any issues offline. Really looking forward to working
with you.
I'm not seriously challenging that you could
make one. I just want to look at the GUI builder that results.
The issue isn't whether you can make a GUI
builder for SWT. You can make a GUI builder for any library...provided that
you don't have to "round trip" (convert source/object code into the
representation used internally by the GUI
builder).
Conga does not generate/manage code. This
is a failing of most GUI builders: they generate reams of code which
statically describe at design time the UI. Conga's Builder manages property
resource files. Code generation of a UI is basically an evil practice which
should be avoided given the dynamic nature of a UI.
I know from previous discussion that Scott
thinks this is not a requirement. I also know that many commercial GUI
builders do allow round-tripping. Enough so that many would consider this a
competitive requirement.
Further, in my own apps, I
routinely rewrite the property resource files as easily as one would save a
data file to preserve user interaction state with the UI. Kinda hard to
rewrite and compile a a java source tree in a business app.
I am not
trying to brag or anything. In fact, Arthur Van Hoff and his team deserves all
the credit because this was his baby some time back and he is about an order
of magnitude superior to me as a programmer. It is just that Conga reflects
some really outstanding design features and, at this critical juncture in
Java's story, we need some help on the desktop to compete with Visual
Studio.
Kindest,
Lane
Bob
-----
Original Message -----
Sent:
Friday, January 17, 2003 1:08 PM
Subject:
RE: SWT History and Design Decisions (WAS: [platform-swt-dev] AWT Toolkit
using SWT (was: From Swing to SWT))
It’s entirely
possible… it’s just that some designers make API, or at least paradigm
assumptions about the GUI library they design with, and sometimes those
assumptions are incompatible with an alternate GUI library.
I’m not sure this is the case in the mentioned systems, but it’s
the only real impediment. Building a natively SWT-aware
builder is not particularly hard compared with another GUI
library.
Regards,
Christian.
-----Original
Message-----
From: platform-swt-dev-admin@xxxxxxxxxxx
[mailto:platform-swt-dev-admin@xxxxxxxxxxx]
On Behalf Of Jan
Venema
Sent: Friday,
January 17, 2003 10:49 PM
To: platform-swt-dev@xxxxxxxxxxx
Subject: Re: SWT History and Design
Decisions (WAS: [platform-swt-dev] AWT Toolkit using SWT (was: >From
Swing to SWT))
Can sombody please explain to me why
it is not possible to build a GUI designer in SWT.
I've been following
the discussions here, but I haven't realy heard an answer. On the
properties pattern thing. Does setData(String key, Object value)
solve your problem? And since SWT is native widgets How does Visual
Studio do it?
<!--[if
!supportLineBreakNewLine]-->
<!--[endif]-->
--
Lane Sharman
http://opendoors.com Conga, GoodTimes and Application Hosting Services
http://opendoors.com/lane.pdf BIO