<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 9/7/16 4:49 PM, Cantor, Scott wrote:<br>
</div>
<blockquote cite="mid:74614EB5-A399-4D7C-9239-E62EAF290D6D@osu.edu"
type="cite">
<pre wrap="">On 9/7/16, 4:43 PM, "Cantor, Scott" <a class="moz-txt-link-rfc2396E" href="mailto:cantor.2@osu.edu"><cantor.2@osu.edu></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I mean constructor arguments.
</pre>
</blockquote>
<pre wrap="">
Incidentally I didn't think that was a controversial view, I thought the general view in Java was that beans should try and use properties and not non-default constructors. </pre>
</blockquote>
<br>
Well, hmmm. Personally I've never really had that perception, as a
general design Java pattern. It's true that there is the concept of
a "bean", with those conventions. But I don't know if that's
intended to apply to everything, always. Sometimes the bean
convention applies and makes sense, and sometimes it doesn't. Re
the latter: I think it's telling that AFAIK Java Beans convention
doesn't have any default or built-in notion of init-ing a bean, to
make it "ready", validate it's state, etc. So it may be natural for
things which don't have any *required* properties. But I think it's
less natural for those that do.<br>
<br>
<br>
<blockquote cite="mid:74614EB5-A399-4D7C-9239-E62EAF290D6D@osu.edu"
type="cite">
<pre wrap="">Nothing's absolute, but that was my impression as to recommended practice, and why Spring has the init-method ook.</pre>
</blockquote>
<br>
It's true that the Spring project definitely has, or at least had,
that position. IIRC way way back they originally didn't even
support ctors at all on wired beans, or at last poorly. But they
started supporting non-default ctors eventually as first-class
citizens. So I'm not so sure that's their philosophical position
now.<br>
</body>
</html>