|
From: Michael A. <mic...@ze...> - 2004-03-29 02:18:19
|
Hi, all, It seems to me that LightConfig and SqlConfig could be rationalised into a single Config class. This would mean adding two methods to the IConfigService interface: setConfig(String key, String value) and setConfig(String name, String value, Locale locale). What this means is that the IConfigService interface implies updatability. In the case of LightConfigService, this could simply throw a NotImplemented exception. I think the implementations of both LightConfig and SqlConfig are very generic, and I think the linkage between each of them and their services (LightConfigService and SqlConfigService) would be clarified by this change. Also, it codifies the principle that the service is changeable, while the config structure isn't, i.e.: no matter which config service you use, the actual config structures stay the same. The rationalised Config class could be extended if necessary to take new functionality into account, but at least would provide a reasonable default implementation, which could probably be used for any new service types that might be written. Thoughts, ideas, pros, cons? MikeA |