<html><body>
<p><tt>gavin.king@gmail.com wrote on 12/24/2008 07:01:21 PM:<br>
<br>
&gt; On Wed, Dec 24, 2008 at 12:23 PM, Michael Keith<br>
&gt; &lt;MICHAEL.KEITH@oracle.com&gt; wrote:<br>
&gt; <br>
&gt; &gt;&gt; What I think we should focus on here is whether the difference in<br>
&gt; &gt;&gt; styles is going to be confusing to users, and whether the web beans<br>
&gt; &gt;&gt; style of descriptor is more difficult to understand and use.<br>
&gt; &gt;<br>
&gt; &gt; My personal opinion is that it is more difficult to understand forbeginners,<br>
&gt; &gt; and that there is a steeper learning curve. Once you understand the rules<br>
&gt; &gt; then it has more value than the existing Java EE style because not only is<br>
&gt; &gt; it more terse and descriptive but it is easier to map to Java code.<br>
&gt; <br>
&gt; Yes, I would more or less go along with that, except for one <br>
&gt; important quibble:<br>
&gt; <br>
&gt; * yes, it is probably a bit more difficult for beginners to understand<br>
&gt; how to configure their own web beans, since it requires a couple of<br>
&gt; new concepts<br>
&gt;</tt><br>
<tt>&gt; * but it is *not* more difficult for beginners to understand how to<br>
&gt; configure a third-party library containing web beans - in fact it is<br>
&gt; much easier since they don't need to go off and look at the Java code<br>
</tt><br>
<tt>I think we could look at what the servlet EG is doing for web.xml fragments</tt><br>
<tt>and do something similar. &nbsp;I don't think they require unique namespaces</tt><br>
<tt>to handle that. &nbsp;If this is something we really need, then we should push</tt><br>
<tt>the EJB EG for something similar and utilize it.</tt><br>
<br>
<tt>I would hate to have to use one methodology for web apps and another</tt><br>
<tt>for EJBs and something completely different again for this spec.</tt><br>
<tt><br>
&gt; So from the point of view of beginner, it depends upon what they have<br>
&gt; as the primary usecase for the XML configuration: is it configuration<br>
&gt; of their own web beans, or configuration of somebody else's?<br>
&gt; <br>
&gt; I would say that beginners (and most other web bean developers) are<br>
&gt; going to be using annotations to config their own classes, and XML to<br>
&gt; configure pre-packaged libraries created by someone else.<br>
</tt><br>
<tt>Possibly, though many enterprise customers I know are looking at</tt><br>
<tt>continuing to use XML DDs for their own component libs because it </tt><br>
<tt>ensures they understand and have control over their metadata (e.g.</tt><br>
<tt>some maintenance defect won't change security roles by accident).</tt><br>
<tt><br>
&gt; However, I'm aware that there are some developers who still prefer to<br>
&gt; use XML for everything. I'm not sure exactly how many of them there<br>
&gt; are, nor to what extent we should to cater to their needs, nor which<br>
&gt; of the XML formats they prefer.<br>
</tt><br>
<tt>Given they already have build tools in place for generating DDs, a</tt><br>
<tt>syntactical change of this magnitude would require significant rewrites</tt><br>
<tt>for them to take advantage of this spec. &nbsp;Adding elements is not as</tt><br>
<tt>big a deal.</tt><br>
<tt><br>
&gt; &gt; I would say that writing web beans XML, which is more<br>
&gt; &gt; like code, requires a rather different mindset than what is applied when<br>
&gt; &gt; writing traditional Java EE descriptors.<br>
&gt; <br>
&gt; Again, I disagree. For a developer configuring a pre-packaged library,<br>
&gt; the &quot;traditional&quot; XML style requires a lot more knowledge of the code<br>
&gt; (Java class, method names, etc) than the &quot;web beans&quot; style does. With<br>
&gt; the web beans style, the configuration author doesn't see anything<br>
&gt; about Java - everything they need to know is completely encapsulated<br>
&gt; in the schema for the library.</tt><br>
<br>
<tt>I think the point is that you need to know XML Schema with this spec.</tt><br>
<tt>whereas you follow patterns for the platform DDs. &nbsp;Assuming you use</tt><br>
<tt>an IDE and get content assist, most IDE DD editors will preset the </tt><br>
<tt>DD namespaces so you can get content assist whereas generated XML schemas</tt><br>
<tt>require knowledge of how to add additional namespaces and configure</tt><br>
<tt>IDEs to use them. &nbsp;That's not exactly trivial if all you want to do</tt><br>
<tt>is develop and use business logic.</tt><br>
<br>
<tt>The only caveat to this is that this spec. is supposed to integrate</tt><br>
<tt>JSF and EJB, so JSF developers are more likely to be familiar with</tt><br>
<tt>dealing with namespaces. &nbsp;However, I got the impression that the</tt><br>
<tt>developers this spec. would be most targetted at would be the business</tt><br>
<tt>logic developers.</tt><br>
<tt><br>
&gt; Say I'm using a library written by someone else, that can be<br>
&gt; configured using a web beans XML schema. How is this schema any<br>
&gt; different from any other XML schema that is used by developers today<br>
&gt; to configure stuff? Remember, the XML author is not required to know<br>
&gt; anything at all about the underlying Java classes and methods to<br>
&gt; author this configuration document. They get a schema, and they write<br>
&gt; XML using the elements defined by that schema. They don't know that<br>
&gt; the element names are actually Java class and method names.<br>
</tt><br>
<tt>A typical component developer doesn't knowingly deal with XML schema</tt><br>
<tt>unless they are a web services component developer.</tt><br>
<tt><br>
&gt; If you're a *user* of the XML schema, a document author, you don't<br>
&gt; need to know anything at all about how the Java classes relate to the<br>
&gt; XML schema. If you're the provider of the XML schema, you also don't<br>
&gt; need to know much about the rules, since the schema will be generated<br>
&gt; for you.<br>
</tt><br>
<tt>But either you need to have knowledge of how XML Schema translates into</tt><br>
<tt>a syntactically and semantically correct XML document instance or you </tt><br>
<tt>have to have knowledge of how to setup tools to use XML schema to do</tt><br>
<tt>that for you. &nbsp;Either way, you have to know more than the average </tt><br>
<tt>developer does today.</tt><br>
<tt><br>
Thanks,<br>
Jim Knutson<br>
WebSphere J2EE Architect</tt><br>
<br>
</body></html>