<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><span style="font-family: arial,helvetica,sans-serif;">Usage of AuditLogDirector in VdsBrokerObjectsBuilder is an illustration for a sub-optimal design:</span><br><span style="font-family: arial,helvetica,sans-serif;">1. The methods it is used in them are checkTimeDrift and reportInvalidInterfacesForNetwork. Both are:</span><br><span style="font-family: arial,helvetica,sans-serif;">public static and both should not be</span><br></div><div><br></div><div><span style="font-family: arial,helvetica,sans-serif;"><span name="x"></span>Best regards, </span><br><span style="font-family: arial,helvetica,sans-serif;">____________________ </span><br><span style="font-family: arial,helvetica,sans-serif;">Yevgeny Zaspitsky </span><br><span style="font-family: arial,helvetica,sans-serif;">Senior Software Engineer </span><br><span style="font-family: arial,helvetica,sans-serif;">Red Hat Israel </span><br><span style="font-family: arial,helvetica,sans-serif;">34 Jerusalem Road, </span><br><span style="font-family: arial,helvetica,sans-serif;">Ra'anana, Israel 43501 </span><br><div><br></div><span style="font-family: arial,helvetica,sans-serif;">Tel: +972 9 7692098 </span><br><span style="font-family: arial,helvetica,sans-serif;">Mobile: +972 52 6323656 </span><br><span style="font-family: arial,helvetica,sans-serif;">Email: yzaspits@redhat.com </span><br><span style="font-family: arial,helvetica,sans-serif;">IRC: yzaspits </span><br><span name="x"></span><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Yair Zaslavsky" &lt;yzaslavs@redhat.com&gt;<br><b>To: </b>"Yevgeny Zaspitsky" &lt;yzaspits@redhat.com&gt;<br><b>Cc: </b>devel@ovirt.org<br><b>Sent: </b>Monday, October 6, 2014 5:23:25 PM<br><b>Subject: </b>Re: [ovirt-devel] [ENGINE] splitting AuditLogDirector to its own module<br><div><br></div><br><div><br></div><hr id="zwchr"><br>&gt; From: "Yevgeny Zaspitsky" &lt;yzaspits@redhat.com&gt;<br>&gt; To: "Yair Zaslavsky" &lt;yzaslavs@redhat.com&gt;, devel@ovirt.org<br>&gt; Sent: Sunday, October 5, 2014 11:31:18 AM<br>&gt; Subject: Re: [ovirt-devel] [ENGINE] splitting AuditLogDirector to its own module<br>&gt; <br>&gt; Hi Yair and All,<br>&gt; <br>&gt; As soon as you turned our attention to dependencies problems in oVirt, I<br>&gt; guess would worse to mention that vdsbroker is directly dependent on dal<br>&gt; (very weird to me).<br>&gt; That is because some business logic found its way into vdsbroker code<br>&gt; and uses dal directly. Using dal should be allowed to bll module only.<br>&gt; Next to allowing ourselves using dal in vdsbroker, we've found very<br>&gt; creative way to use bll commands in vdsbroker completing by that a<br>&gt; circular dependency ring.<br>&gt; <br>&gt; The current situation when vdsbroker is directly dependent on dal and in<br>&gt; fact dependent on bll is sever violation of a good design practice IMHO.<br>&gt; <br>&gt; I'm in favor solving that dependency mesh asap prior it become more<br>&gt; difficult. We should strive to extract the business logic from vdsbroker<br>&gt; (and any other module) and move that to bll module where its natural<br>&gt; place is, then fix the dependencies chain (that have to be a tree and<br>&gt; not any geometric figure).<br>&gt; <br>&gt; When that will happen, we'd be able to figure more easily what the<br>&gt; natural place for AuditLogDirector should be, I guess that'll be utils<br>&gt; package.<br>&gt; <br>&gt; Regards,<br>&gt; Yevgeny<br><div><br></div>git grep will show you that it is in VdsBrokerObjectsBuilder which creates the entities from the XMlRpcStruct maps.<br>The calls to AuditLogDirector simply "report" of various issues during the "transformation" to the audit log, to be presented at UI. The objects builder class already involves business entities.<br>I agre usage of AuditLogDirector there seems ackward.<br><div><br></div><br>&gt; <br>&gt; On 03/10/14 20:03, Yair Zaslavsky wrote:<br>&gt; &gt; Hi all,<br>&gt; &gt; I just reviewed a patch regarding AuditLogDirector and I thought to myself<br>&gt; &gt; - why is it located in DAL?<br>&gt; &gt; Our maven dependencies are built in a way that both bll and vdsbroker<br>&gt; &gt; depend on DAL, and if you perform git grep AuditLogDirector you will see<br>&gt; &gt; it is used<br>&gt; &gt; by bll and vdsbroker.<br>&gt; &gt; But that this is not necessary a reason to include AuditlogDirector in DAL.<br>&gt; &gt; I think DAL should be our Data Access Layer, and for audit log (which is a<br>&gt; &gt; class that uses our DAOs) we should have a separate module.<br>&gt; &gt;<br>&gt; &gt; Thoughts on this are welcome,<br>&gt; &gt;<br>&gt; &gt; Yair<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Devel mailing list<br>&gt; &gt; Devel@ovirt.org<br>&gt; &gt; http://lists.ovirt.org/mailman/listinfo/devel<br>&gt; <br>&gt; <br></blockquote><div><br></div></div></body></html>