On 29/01/2011 10:26, calathus wrote:
When we write GUI application in Java, the most important part is GUI
application logic (description of user interaction), not layout.
So we don't want to bother with layout in Java code level, also some GUI
object should be determined by the data type used in the application.
For instance, if type is boolean, we may want to map to check box etc.
And if we want to change these data type, we should not have to modify
the layout(most of case) file.

I agree with most, but not all. I think all GUI should be described in separate files, indeed, with no logic in it (or, at best/worst, only code pertaining to GUI logic). But the leafs must be part of this description: if the type is boolean, the GUI designer can choose to implement it with radio buttons, combo box or even a list, if they need/want it. It is not a concern of the code.

I agree fully with the concept of separating code and GUI, and there are several approaches for that. Martin Fowler made a series of articles covering pros and cons of such approaches: some designs are better suited to low level machinery (control design), others are better for higher level GUI design, with one or the other allowing better testing (replacing with mock objects), and so on.

I wonder if Visage could be used for designing GUIs for Pivot. I haven't looked at its design recently, if it needs a library bigger than Pivot, it might not be worth the effort... ;-)

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

Reply via email to