|
From: Rob R. <rob...@ur...> - 2004-02-18 19:53:09
|
Keith, I like this proposal. It would seem like these different config approaches could just be add-ons as different implementations of BeanFactory and/or ApplicationContext. I still use Webwork 1.4, partially because of its simple configuration, and I actually still use the properties file. I don't mind XML, but sometimes a properties file can be just as easy to understand and less typing. Your example below could become: myValidateableBean.class=com.MyValidateableBean myValidateableBean.validateableProperty.continueOnError=false myValidateableBean.validateableProperty.mandatory=true myValidateableBean.validateableProperty.maxLength=25 myValidateableBean.validateableProperty.uniqueName=true which might actually be more typing than XML because of the long-ish bean name and property name, but it'd just be an option. As you mention, the work would be in building the processing code to read in the configuration. I think Rod's original J2EE book introduced the BeanFactory concept and used properties as an example of configuration. I believe properties are still supported, but not to the extent that XmlBeanFactory is supported. But anyways, perhaps a "contrib" module for Spring would be good for alternate forms of configuration. I don't have any objections to the current XmlBeanFactory, but there are probably situations where the configuration could be a little more simple. Rob ---- On Wed, 18 Feb 2004, Keith Donald (kd...@cs...) wrote: > <validator class="com.MyValidateableBean" objectName="myValidateableBean"> > <property name="validateableProperty" continueOnError="false"> > <rule type="mandatory"/> > <rule type="maxLength"/> > <parameter name="value" value="25"/> > </rule> > <rule type="uniqueName"/> > </property> > </validator> > |