<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/15/2013 03:57 PM, Ray Tsang
wrote:<br>
</div>
<blockquote
cite="mid:CAD4EjTJ9kqhf2scHZY_DeEQ0G+GS8Wk9qhffUFJ=QVPjw-GzKg@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Aug 15, 2013 at 9:48 AM,
Galder Zamarreño <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:galder@redhat.com"
target="_blank">galder@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
On Aug 14, 2013, at 11:14 PM, Ray Tsang <<a
moz-do-not-send="true" href="mailto:saturnism@gmail.com">saturnism@gmail.com</a>>
wrote:<br>
<br>
> I actually did not enjoy writing parsers and config
builders etc…<br>
<br>
</blockquote>
<div><br>
</div>
<div>
<div>i felt that writing the parsers are error prone -
there are many places to touch when adding a property -
maybe I just didn't follow the best example...</div>
<div><br>
</div>
<div>
i'm just thinking out loud but perhaps there is a way to
consolidate the configuration builder, configuration,
configuration parser, and xsd with a single set of
metadata - after all, I think they are all trying to set
the same set of properties.</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Well, it's true that the Maven build process could generate at least
the XSD automatically, and automatic parsing is not that complicated
- in fact I've done this in RadarGun, changing Mircea's original
setter-way.<br>
But in order to be able to use the programmatic configuration, you
have either write the builder yourself or generate it with some tool
(I don't think it would be right to generate further Java sources
during the Maven build, even if it is possible). And using tool for
generation of some Java code based on another code seems to me as
another nasty complication.<br>
Alltogether, writing *Configuration and *ConfigurationBuilder should
be enough, all the rest can be managed by runtime/build.<br>
<br>
<blockquote
cite="mid:CAD4EjTJ9kqhf2scHZY_DeEQ0G+GS8Wk9qhffUFJ=QVPjw-GzKg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>
</div>
<div><br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">^
Why not? Too verbose? Too many classes?<br>
<br>
I'd rather improve this than carry on supporting
property-based configuration (any other type safety
advocates?)<br>
</blockquote>
<div><br>
</div>
<div style="">+1, the fact that I had to test both was a
nuance...</div>
</div>
</div>
</div>
</blockquote>
+1 as well<br>
<br>
Radim<br>
</body>
</html>