No, thank you! this ought to give this list something to fight about for the next 4-5 days. ;-)
-----Original Message----- From: Soomar, Muki (R.) [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 1:57 PM Thanks Mark. That was very helpful. Please read on.. -----Original Message----- From: Soomar, Muki (R.) [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 12:34 PM I am still new to struts and going through the documentation. Here are some general questions for the gurus who understand the DTDs for struts-config.xml file and its usage. <action> element 1. Why is the attribute "type" for the <action> element named so. Wouldnt the attribute name "action-class" be more intuitive here ? ----- No, because in Jave, a "type" is the kind of object and all non-primitive types are classes. ---- <Muki>Dont agree. You might have gotten used to using the way it is defined. But the mapping still refers to a class and not to an object in memory. So I THINK "action-class" is more appropriate and intuitive. 2(a). Attribute "name" for the same <action> element refers to the form. Again "form-class" would have been more intuitive. ----- A "name" in HTML refers to the form entity reference; there is nothing counter-intuitive about this. ----- <Muki> Don't agree. The mapping here is again referring to a class as opposed to a mere reference for the form. So again I THINK "form-class" is more appropriate. 2(b) Attribute "attribute" also refers to the form class for the example application. I am confused between the usage of the two. (Still need to do a bit more digging, but intuitive attribute names would have helped in the first reading very much !) ------ A Java attribute is a reference to a name-value pair, and that is how it is used in Struts, same as it is in servlets. ----- <Muki> Dont quite understand what you are implying here. 3. Attribute "input" is intuitive, but "input-uri" or "input-url" would have been more intuitive ------ Why? ------ <Muki> Just so that XML be used for making the document more readable and easy to understand for anyone looking at it. 4. Sub-element <forward> has attribute "name" that refers to the type of result based on which forwards could be redirected. Wouldnt it be simpler to just call this attribute "result-type" instead of "name". ----- No, because the attribute is entirely arbitrary - it is merely an identifier for the forwarding mechanism to find the appropriate path. It is not a Java type. ----- <Muki> Well, appropriately named identifiers can help. Any particular reasons for this naming convention. ----- Yes, to confuse newbies and guarantee job security by making it particularly difficult to learn. ----- <Muki> Seems like it and have to agree on this one. :) Regards, Muki Soomar -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>