<html><body>
<p><tt>gavin.king@gmail.com wrote on 01/08/2009 08:22:37 AM:<br>
> >> However, I'm aware that there are some developers who still prefer to<br>
> >> use XML for everything. I'm not sure exactly how many of them there<br>
> >> are, nor to what extent we should to cater to their needs, nor which<br>
> >> of the XML formats they prefer.<br>
> ><br>
> > Given they already have build tools in place for generating DDs, a<br>
> > syntactical change of this magnitude would require significant rewrites<br>
> > for them to take advantage of this spec. Adding elements is not as<br>
> > big a deal.<br>
> <br>
> I don't really know what you mean here. I'm not aware of anyone who is<br>
> using tooling to generate metadata relating to dependency injection.<br>
> I'm sure someone, somewhere has done this, but I don't believe it's at<br>
> all common.<br>
</tt><br>
<tt>While I'm sure it's not "common", there are a large number of ISVs that</tt><br>
<tt>do this because they want to build their software to run on more than </tt><br>
<tt>one vendor, so they automate the build differences.</tt><br>
<br>
<tt>There's also a substantial number of enterprise customers that do model</tt><br>
<tt>driven development and generate a substantial portion of their code base.<br>
<br>
> > I think the point is that you need to know XML Schema with this spec.<br>
> > whereas you follow patterns for the platform DDs. Assuming you use<br>
> > an IDE and get content assist, most IDE DD editors will preset the<br>
> > DD namespaces so you can get content assist whereas generated XML schemas<br>
> > require knowledge of how to add additional namespaces and configure<br>
> > IDEs to use them. That's not exactly trivial if all you want to do<br>
> > is develop and use business logic.<br>
> <br>
> My IDE (Eclipse) automagically understands XML schema. There's no<br>
> configuration needed. Yes, I need to add the list of namespaces at the<br>
> top of my file but that's really not very difficult. I'm inclined to<br>
> think that pretty much everyone already knows how to do this. For one<br>
> thing, Spring uses the namespace-based approach, and a big chunk of EE<br>
> developers use Spring.<br>
</tt><br>
<tt>I understand, but given that distinction, the EE DDs follow the same</tt><br>
<tt>pattern and rules and get just as much help from the IDE. You still</tt><br>
<tt>get content assist with documentation, etc. However, once you start</tt><br>
<tt>creating new schemas and they aren't served by an internet location,</tt><br>
<tt>you need to start managing your XML Catalog so the schemas for those</tt><br>
<tt>new namespaces can be found.</tt><br>
<tt><br>
> And the point is that the new-style XML gives you context assist and<br>
> validation for much more stuff than the old-style XML. With the old<br>
> style XML you get content assist for <class> and <method>, elements<br>
> that simply don't exist in the new-style XML! The old-style doesn't<br>
> help you at all when you start typing the actual class and method<br>
> names - which are more or less the *only* things you need to type in<br>
> the new-style XML (where they *can* be autocompleted).<br>
</tt><br>
<tt>Ok, so what you are attempting to do is turn semantic content into</tt><br>
<tt>syntax. I understand how this can help in some cases, but not all</tt><br>
<tt>(e.g. defining method sets), but I think that's beside the point.</tt><br>
<tt>The point is that there's a platform pattern. To integrate with the</tt><br>
<tt>platform, I think you need to conform to the platform pattern. If</tt><br>
<tt>you don't like the platform pattern, then the entire pattern ought</tt><br>
<tt>to be consistently changed, not just one portion of it.<br>
<br>
> > The only caveat to this is that this spec. is supposed to integrate<br>
> > JSF and EJB, so JSF developers are more likely to be familiar with<br>
> > dealing with namespaces. However, I got the impression that the<br>
> > developers this spec. would be most targetted at would be the business<br>
> > logic developers.<br>
> <br>
> Thanks Jim, this is a point that I had missed: that the approach in<br>
> the current spec *is* already used in the platform, in both JSF and<br>
> JSP ! :-)<br>
</tt><br>
<tt>Well, to be fair, I don't think the issue is namespaces. It's the</tt><br>
<tt>element / attribute schema style.<br>
<br>
> >> Say I'm using a library written by someone else, that can be<br>
> >> configured using a web beans XML schema. How is this schema any<br>
> >> different from any other XML schema that is used by developers today<br>
> >> to configure stuff? Remember, the XML author is not required to know<br>
> >> anything at all about the underlying Java classes and methods to<br>
> >> author this configuration document. They get a schema, and they write<br>
> >> XML using the elements defined by that schema. They don't know that<br>
> >> the element names are actually Java class and method names.<br>
> ><br>
> > A typical component developer doesn't knowingly deal with XML schema<br>
> > unless they are a web services component developer.<br>
> <br>
> I don't believe that's right. All the EE XML formats are defined using<br>
> schemas. Every EE developer today deals with schemas every day.<br>
</tt><br>
<tt>An average EJB developer that actually updates DDs will use a syntax that</tt><br>
<tt>looks like:</tt><br>
<br>
<font color="#008080" face="Courier New"><</font><font color="#3F8080" face="Courier New">ejb-jar</font><font face="Courier New"> </font><font color="#800080" face="Courier New">xmlns</font><font face="Courier New">=</font><i><font color="#4200FF" face="Courier New">"<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a>"</font></i><font face="Courier New"> </font><br>
<font face="Courier New">        </font><font color="#800080" face="Courier New">xmlns:xsi</font><font face="Courier New">=</font><i><font color="#4200FF" face="Courier New">"<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"</font></i><br>
<font face="Courier New">        </font><font color="#800080" face="Courier New">xsi:schemaLocation</font><font face="Courier New">=</font><i><font color="#4200FF" face="Courier New">"<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a> <a href="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd</a>"</font></i><br>
<font face="Courier New">        </font><font color="#800080" face="Courier New">version</font><font face="Courier New">=</font><i><font color="#4200FF" face="Courier New">"3.0"</font></i><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">        </font><font color="#008080" face="Courier New"><</font><font color="#3F8080" face="Courier New">display-name</font><font color="#008080" face="Courier New">></font><u><font face="Courier New">Testdd</font></u><font color="#008080" face="Courier New"></</font><font color="#3F8080" face="Courier New">display-name</font><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">        </font><font color="#008080" face="Courier New"><</font><font color="#3F8080" face="Courier New">enterprise-beans</font><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">                </font><font color="#008080" face="Courier New"><</font><font color="#3F8080" face="Courier New">session</font><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">                 </font><font color="#008080" face="Courier New"><</font><font color="#3F8080" face="Courier New">ejb-name</font><font color="#008080" face="Courier New">></font><font face="Courier New">cart</font><font color="#008080" face="Courier New"></</font><font color="#3F8080" face="Courier New">ejb-name</font><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">                 </font><font color="#008080" face="Courier New"><</font><font color="#3F8080" face="Courier New">business-local</font><font color="#008080" face="Courier New">></font><font face="Courier New">test.ShoppingCart</font><font color="#008080" face="Courier New"></</font><font color="#3F8080" face="Courier New">business-local</font><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">                 </font><font color="#008080" face="Courier New"><</font><font color="#3F8080" face="Courier New">ejb-class</font><font color="#008080" face="Courier New">></font><font face="Courier New">test.ShoppingCartBean</font><font color="#008080" face="Courier New"></</font><font color="#3F8080" face="Courier New">ejb-class</font><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">                </font><font color="#008080" face="Courier New"></</font><font color="#3F8080" face="Courier New">session</font><font color="#008080" face="Courier New">></font><br>
<font face="Courier New">        </font><font color="#008080" face="Courier New"></</font><font color="#3F8080" face="Courier New">enterprise-beans</font><font color="#008080" face="Courier New">></font><br>
<font color="#008080" face="Courier New"></</font><font color="#3F8080" face="Courier New">ejb-jar</font><font color="#008080" face="Courier New">></font><br>
<br>
<tt>While it's true that this is an XML document instance, most developers</tt><br>
<tt>don't know and don't care. They just follow a pattern for filling out</tt><br>
<tt>the data. That was the point.</tt><br>
<tt><br>
> It's certainly true that the vast majority of developers don't<br>
> *define* schemas, but the whole point of this is that they don't need<br>
> to in web beans either: the schema can be generated by javac.<br>
</tt><br>
<tt>Except for the fact that it IS new schema and they must be aware of</tt><br>
<tt>it and the impact on the content.</tt><br>
<tt><br>
Anyway, my point remains that platform consistency needs to be maintained</tt><br>
<tt>or we will lose the concept of a platform and degenerate into a bunch</tt><br>
<tt>of piece parts. If we can get the platform to move to a more modern</tt><br>
<tt>XML style, I'm ok with that too. I just want integrated consistency.</tt><br>
<tt><br>
Thanks,<br>
Jim Knutson<br>
WebSphere J2EE Architect</tt><br>
<br>
</body></html>