Just to give a bit more context to this issue:
One of the big advantages that Java EE has over the collective set of
random technology bits and pieces that some people cobble together and use
to write applications with, is that it is a consistent group of cohesive
technologies that share common terminology, resource definitions, development
and configuration practices, and many other aspects of application
development. This is a huge strength, and contributes to increased portability
of both applications and developer experience.
Keeping the platform consistent does not imply stagnancy because of the way
"older" technologies work. New technologies may still emerge to join the EE
fold,
but if they introduce something new in an area that existing EE specs already
participate in and make use of then the new and more useful approach should be
introduced to the existing specs as well. Annotations is a good example, where
they began being used in the EJB 3.0 round, but were soon pushed up into the
platform and EE spec, and are now in every other EE sub-spec as well.
So, while I see that there are strengths and weaknesses to the XML style that
is currently described in the spec, it is so different from every other existing
XML descriptor in Java EE that the platform suffers and there is no sharing of
experience. On the contrary, it requires learning new and different conventions,
all in the context of trying to make this a bona fide Java EE technology.
On the other hand, if the options are weighed and the majority of the platform
stakeholders are in agreement with this group that Java-driven XML really is a better
approach, then these rules and styles should be propagated to the entire platform,
with an agreed-upon plan to bring that about.
-Mike
-----Original Message-----
From: Gavin King [mailto:gavin@hibernate.org]
Sent: Sunday, December 21, 2008 1:13 AM
To: Java Community Process JSR #299 Expert List; Jim Knutson; Michael
Keith; Matt Drees; Scott Ferguson; WebBeans
Subject: XML configuration format
I would like to open up a discussion about the XML format
defined in chapter 10.
Mike is concerned that the XML format is different to the style used
in other Java EE specifications, where class/method names are
generally specified as strings in the body of XML elements, and that
the XML format may turn out to be confusing to users.
On the other hand, the format currently defined by the specification
is typesafe, allowing tooling to provide validation and
auto-completion of all class/method names, and is also less verbose.
It's also consistent with the approach used by existing solutions in
the spec (Spring, Seam).
I've recently discovered that it's possible to write a Java 6
Processor that would generate the XML schema for a package containing
web beans as part of the compilation process. (This is an awesome new
feature of javac, that used to be provided by the APT plugin.)
One possible path to take would be to use hyphenated names in the XML
(i.e. <foo-bar> instead of <FooBar>) to make the XML more visually
consistent with other EE descriptors.
I would like to get everyone's thoughts on this issue:
Do you like the existing format?
Do you find it confusing? In what way?
Have you used this approach in Spring or Seam? If so, how did
it compare?
How important is typesafety?
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org