Re: design guidance please :user controls and centralizing roles-r



Hi KF,

I think those custom class(represent each control's visibility info against
roles) should be made as lightweight as possible. Also, since these object
List should be generated from a configuration file(XML file that store the
role based control/page layout info), you can cache those list in
Application cache and make the cache dependent on the XML configuration
file. Thus, whenever the xml file is modified, the cached list will be
invalidated. And the list should be accessed by an wrapper class which use
on-demand patter to initialize the list. e.g.

public list GetList()
{
if(Cache["_list"] == null)
{
GenerateListFromConfigurationFile();
}

return Cache["_list"];
}

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.



.