Re: General Question ... Class & Members
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:l44ku5pkipf6uadm83inqm08j0b9vchust@4ax.com...
And generally this is useless also. Getting back a string that might say
"Black" or
"schwartz" or "negro" or "noir" does not convey that I want RGB(0,0,0).
That's true (but see below).
It generally exposes to the caller the implementation of the controls,
which is irrelevant
to the caller. The data members I add are designed to be
interface-independent, and do
not depend on how the implementation works. Since I want this to work on
day one and be
maintainable for the life of the program, I do not want to use techniques
that a change in
the UI will make obsolete. I don't WANT a "fully automatic" alternative
if it is tied to
the implementation I selected today and may want to change tomorrow. It
also makes some
unfortunate couplings that I may not want; for example, I may want to
supply an initial
bit vector and get a bit vector back (e.g., a DWORD) and I should not have
to care if this
requires, say, 32 check boxes or a 32-deep CCheckListBox or a 32-line
CListCtrl with check
boxes. Currently, DDX does not support this level of independence, and
rather than invent
entirely new mechanisms I simply write code that maps my representation to
controls and
controls to my representation, rather than forcing me to use a
DDX-specified
representation.
You keep coming back to "Well, DDX doesn't work in my non-trivial dialogs,
so I don't ever use it. Omitting the fact that it works most of the time
for most people. What you are proposing is the same as never using a remote
control because it doesn't have all the buttons as on the front panel. IOW,
if there are corner cases where it doesn't work, you don't use it at all.
Man, you should take a gander at WCF RIA Services and see what it's like to
have to trust a system you don't understand. It's unreal. But that is the
way things are because it lets us solve problems quickly (at least once the
concepts are understood which is not trivial) without having to worry about
what's under the hood. Your "roll my own" attitude simply doesn't scale,
and no amount of useless metrics about lines of code per hour changes that
fact.
Robust means "robust under maintenance", that is, the caller does not see
or know about my
implementation details outside the dialog or CFormView; it is completely
neutral. DDX
does not come with this "out of the box".
See my previous comment about making DDX variables protected or private.
-- David