[webbeans-dev] XML configuration format

Gavin King gavin at hibernate.org
Sun Dec 21 01:12:58 EST 2008


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 at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org



More information about the weld-dev mailing list