[Yanel-dev] Best Practice Data Object Read/Write

basZero baszero at gmail.com
Fri Jan 20 03:51:59 EST 2017


Hi,

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.

I see one big disadvantage in this:
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.

Am I missing something or how do you deal with this?

Concrete question:
>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.

I have the feeling that resources should just contain the business logic.
data handling should be disconnected via the facade pattern.

Any comments on this?
Cheers, Balz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mx2.wyona.com/pipermail/yanel-development/attachments/20170120/8ea2fb8f/attachment.html>


More information about the Yanel-development mailing list