<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Balz<br>
<br>
Agreed!<br>
<br>
I would put the create/save logic either into an independent
library referenced by the various resources or put it into a
*shared* resource, which can also be referenced from the other
resources. The *shared* resource is not really used as a resource
to process requests.<br>
<br>
Hope that helps<br>
<br>
Michael<br>
<br>
Am 20.01.17 um 09:51 schrieb basZero:<br>
</div>
<blockquote
cite="mid:CAOXzDSGh-NUFVu50xAcBuojhfnY3RHrxXCeMQR=Y_HnAnBgVPQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>as of my knowledge, yanel currently is heavily relying on
the ResourceInput object when it comes to create and save a
data document (XML) to Yarep. see create(ResourceInput input)
methods.</div>
<div><br>
</div>
<div>I see one big disadvantage in this:</div>
<div>If you have a java class that also want to create data
objects (XMLs) of a certain type, it can not just fill in a
data bean and then store it to yarep (via JAXB). Because the
logic for storing the XML is inside the Resource responsible
for that type of data.</div>
<div><br>
</div>
<div>Am I missing something or how do you deal with this?</div>
<div><br>
</div>
<div>Concrete question:</div>
<div>From a java class not being a yanel resource, I want to
reuse the create/save logic of a certain data type that
currently gets handled by a resource in the create() method. </div>
<div><br>
</div>
<div>I have the feeling that resources should just contain the
business logic. </div>
<div>data handling should be disconnected via the facade
pattern.</div>
<div><br>
</div>
<div>Any comments on this?<br>
Cheers, Balz</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>