suggest a design pattern for view layer configuration

I want to configure view layer of a web application, for example in a one web page all elements are embedded as a component and some of them according to specified configuration should not be shown. In general, I'm looking for a way to control visibility of components based on a configuration system.

Can anyone help me ?


  • edited November -1
    probably u already resolved ur question but i have a suggestion.

    u should use observer pattern to control. works nice.
  • hi,

    I believe you require parse through configuration settings , and decide what to render on the UI.

    In that case Builder pattern is the most appropriate.

    Director: which will call the builder to build the objects (components) based on teh configuration settings.

    Builder :  will parse through confiration setings and return an entity which contain collections of components.

    Client : will call director , get the collection of components and render the UI.


    Please refer to my blog for more details..  you may wish to customize according to your scenario,