<br><br><div class="gmail_quote">On Thu, Jan 21, 2010 at 6:37 PM, Jeff Albert <span dir="ltr">&lt;<a href="mailto:jralbert@uvic.ca">jralbert@uvic.ca</a>&gt;</span> wrote:<br><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div>or should I create a separate ‘application object’
model which brokers requests from the Controllers and uses the DBIC model to
implement them if they fit the application’s logic? I’ve looked far
and wide to try to better understand how this pattern should work, since I can
see the benefit of the better code reuse and easier maintenance it would
entail; I just need some advice to get me started. Suggestions?

<p class="MsoNormal">  </p></div></div></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US">
<div>

<p class="MsoNormal">Cheers,</p>

<p class="MsoNormal"><span lang="ES-TRAD">Jeff Albert</span></p>

<p class="MsoNormal"><span lang="ES-TRAD"><a href="mailto:jralbert@uvic.ca" target="_blank">jralbert@uvic.ca</a></span></p>

<p class="MsoNormal"><span lang="ES-TRAD"> </span></p>

</div>

</div>


<br></blockquote><div><br>I personally try not to put logic in the DBIC schema classes, because I use Moose features, such as roles, extensively. Hence I end up having many Moose classes (ie Employee.pm) that look just like their underneath DBIC schema class (ie Schema/Result/Employee.pm). The Moose class will implement all complex calculations and validations, and proxy for the bare basic DBIC one. The decoupling is certainly beneficial, but the attribute redundancy bugs me nonetheless. <br>
<br>So ideally I would like to have DB entities represented by a single Moose class, rather than in 2 or more places. For that there&#39;s KiokuDB and MooseX::NonMoose-- the latter should allow a moose class to inherit from a DBIC class. Haven&#39;t tried neither, though. <br>
<br>- rodrigo<br><br><br></div></div>