Encapsulating user interface

From: _A (_a_at_nospam.net)
Date: 10/11/04

  • Next message: Calum Grant: "Re: Having difficulty refactoring a DB application"
    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?
     


  • Next message: Calum Grant: "Re: Having difficulty refactoring a DB application"
  • Quantcast