none
Which Design Pattern(s) will suit this current scenario RRS feed

  • General discussion

  • The Main Form contains Button Controls, and it is used as a toggle button depending upon a particular state of the application and whose images and other look and feel are designed using Plugin Architecture (here the assemblies i.e. the dlls files are dynamically loaded) for Themes Feature, whose images are stored in the Resource File stored in the Theme.dll (for different themes it is supported).

    I need to implement the state management as a separate class library, where the buttons images and enabled property can be modified. All the Forms and controls are created using Singleton Pattern, So we can get the button controls.

    I need to implement a design pattern for the state management and and to change the themes.

    Friday, May 2, 2008 4:03 PM

All replies

  • Not sure if you told us enough about this to give you good advice.  To avoid coupling between the class library and the UI use events and interfaces.
    Saturday, May 3, 2008 1:48 PM
  • I didn't see where the state management fitted into the requirement for themes, they're two seperate features aren't they?

     

    I'd be using a provider pattern, so a factory and a strategy pattern is my favourite for the pluggable theme features.

     

    State management is a seperate situation, and I'd imagine would come down to your requirements of such a system.  Perhaps you could elaborate, and provide a list of options that you are considering?

     

    Martin Platt.

     

    Wednesday, May 7, 2008 11:05 PM
  • No themes changes the images of the button, and each button have 2  images since all the buttons are toggle button. I need a guidance on how to manage the UI States like a state machine. I'm currently maintaining the image and all the properties in a hash table and loading the hashtable whenever the state changes. Is that a right way to manage states?

    Another thing is can u post the links releated to state management's Articles or blogs.

    Thanks & Regards,
    Srinivasan.M.H.
    Wednesday, May 28, 2008 12:15 PM