Thursday, November 7, 2013

New Emoti

From MSDN help forums; meet Programming Guy:

Is the following implementation of a control array in my WPF (page) reasonable or is it kind of junior type coding? It is an array of radio buttons in 2 stack panels which I set to ...
 

It is junior programming :0). What you want to use is...


*************************************************

 

In point of fact, the issue is a very interesting one. I think of it as the Meow/Quack problem.
It will be recalled that Microsoft introduced Microsoft Presentation Foundation within Visual
Studio to permit the design of interfaces that could, potentially, use any or all existing
technologies in one design: forms, 2D graphics, 3Dgraphics, media in either stand-alone or
browser- hosted applications. The pious hope here, for the development process, was
that graphic designers and programmers could work in conflict-free teams: the designer would
put the visuals together, with an eye to sound information architecture. The programmer would
then wire things together, in blissful tranquility. Problem is...

 

It is now possible to define the same interface in two entirely different ways: with XAML,
the browser language or with a code-behind language such as C#, meant to deal with interaction
between the user and the application. Indeed, the designer and programmer working separately
will construct two identical but distinct versions of the one interface which will sit one on top of
the other. It thus becomes imperative to settle on one set of interface controls.

 

Now one of the constraints on the programmer is that he/she is aiming for robust code ie
concise, minimally repetitive and thus easy to follow and maintain. An elegant multi-option
product of the design imagination shows up to the programmer as a problem: how to manage
the user response in an elegant way.

 

The forum case discussed above posed such a problem. Here is the programmer's helpful
response to his confrère:

Set things up to find out what button was clicked by identifying the sender in a unique
event handler (instead of 8).

 

 







 



No comments: