<font size=2 face="sans-serif">From what I understand from the books and
docs etc, I am putting the results of a DB call into the stash, my template
code just loops through what is stored in the stash. The pager does go
back to the db, but I don't know of any other way to do it. I'm just following
the docs and that's what they show. If there is a better way I'd be happy
to work on that.</font>
<br>
<br><tt><font size=2>Benjamin Hitz &lt;hitz@stanford.edu&gt; wrote on 06/20/2012
11:06:57 AM:<br>
<br>
&gt; From:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Benjamin Hitz &lt;hitz@stanford.edu&gt;</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; To:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; &quot;DBIx::Class user and developer list&quot; &lt;dbix-class@lists.scsys.co.uk&gt;</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Date:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; 06/20/2012 11:34 AM</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Subject:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Re: [Dbix-class] Search_rs not returning newly created rows</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Not to get in the way here... but I think (not a Dbix::Class/<br>
&gt; Catalyst expert) that Len is saying that:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; putting {accounts =&gt; $rs and pager =&gt; $rs-&gt;pager()}in the
stash is <br>
&gt; effectively forcing the template system to make DB calls. &nbsp;It
has to<br>
&gt; be even though Kenneth didn't actually post his template code.</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; At first I thought it was just the pager, but I re-read and saw the
<br>
&gt; $rs itself was passed.</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; But I am not posting this just to pile on (and in fact, I could well<br>
&gt; be wrong -- or correct materially but wrong in details)... but I <br>
&gt; want to ask Len:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; What is bad about this design? &nbsp; Especially in a case where the
<br>
&gt; pager (possibly not this one) has to fetch pages? &nbsp; </font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Is the (your) preferred design pattern to put any UI fetches behind
<br>
&gt; a webservice/ajax call? &nbsp;</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Thanks,</font></tt>
<br><tt><font size=2>&gt; Ben</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; On Jun 20, 2012, at 8:04 AM, Len Jaffe wrote:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; On Wed, Jun 20, 2012 at 8:53 AM, Kenneth S Mclane &lt;ksmclane@us.ibm.com&gt;
wrote:</font></tt>
<br><tt><font size=2>&gt; Len Jaffe &lt;lenjaffe@jaffesystems.com&gt; wrote
on 06/19/2012 04:29:53 PM:<br>
&gt; &nbsp;<br>
&gt; Wow, way to jump to a conclusion. I am not making a DB call from my
<br>
&gt; template, I just added an IF so if the field is null it displays a
<br>
&gt; &quot;0&quot; instead of nothing, just a readability issue. :-)</font></tt>
<br><tt><font size=2>&gt; &nbsp;</font></tt>
<br><tt><font size=2>&gt; Sorry if you think I jumped anywhere. &nbsp;</font></tt>
<br><tt><font size=2>&gt; I assure you my conclusion was well-reasoned
and reached via careful<br>
&gt; deliberation.</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; L</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; --</font></tt>
<br><tt><font size=2>&gt; Ben Hitz</font></tt>
<br><tt><font size=2>&gt; Senior Scientific Programmer ** Saccharomyces
Genome Database ** GO Consortium</font></tt>
<br><tt><font size=2>&gt; Stanford University ** hitz@stanford.edu</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; _______________________________________________<br>
&gt; List: </font></tt><a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class"><tt><font size=2>http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</font></tt></a><tt><font size=2><br>
&gt; IRC: irc.perl.org#dbix-class<br>
&gt; SVN: </font></tt><a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/"><tt><font size=2>http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</font></tt></a><tt><font size=2><br>
&gt; Searchable Archive: </font></tt><a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk"><tt><font size=2>http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</font></tt></a>