[webbeans-dev] XML configuration format

Pete Muir pmuir at redhat.com
Sun Dec 21 05:54:14 EST 2008


On 21 Dec 2008, at 06:12, Gavin King wrote:

> 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?

I like it, especially the typesafety. As we can use schema generation,  
it seems like using strings for classnames would be a big step backward.

>
> Do you find it confusing? In what way?

Visually, I would prefer <acme:foo-bar /> to <acme:FooBar />

>
> 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
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev




More information about the weld-dev mailing list