Encapsulating user interface
From: _A (_a_at_nospam.net)
Date: 10/11/04
- Previous message: Universe: "Re: Having difficulty refactoring a DB application"
- Next in thread: Robert C. Martin: "Re: Encapsulating user interface"
- Reply: Robert C. Martin: "Re: Encapsulating user interface"
- Reply: H. S. Lahman: "Re: Encapsulating user interface"
- Reply: Alan J. White: "Re: Encapsulating user interface"
- Reply: Sylvain: "Re: Encapsulating user interface"
- Reply: Topmind: "Re: Encapsulating user interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 11 Oct 2004 02:26:15 -0400
For me, the toughest part of breaking any program into objects is in
dealing with UI code. Most of the 'functional' aspects are easy to
envision as objects, but screen buttons (visual-related) and their
corresponding response functions (event-related) seem so intertwined that
it is difficult to separate them. Add to that the fact that the main
'form' of many programs is usually composed of a conglomeration of screen
objects...and it's easy to end up with one humongous main form.
I've taken to using something like a Facade pattern for spec'ing a set
control panel. Then passing the Facade to objects that need to send data
to the screen. This is a step more organized, but I'm sure there are more
sophisticated approaches.
This also does not solve organization of things like tabbed dialogs, where
I'd like to find a way to split each tab into a separate module. But that
is usually easier said than done.
Any thoughts on this?
- Previous message: Universe: "Re: Having difficulty refactoring a DB application"
- Next in thread: Robert C. Martin: "Re: Encapsulating user interface"
- Reply: Robert C. Martin: "Re: Encapsulating user interface"
- Reply: H. S. Lahman: "Re: Encapsulating user interface"
- Reply: Alan J. White: "Re: Encapsulating user interface"
- Reply: Sylvain: "Re: Encapsulating user interface"
- Reply: Topmind: "Re: Encapsulating user interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]