<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 <hitz@stanford.edu> wrote on 06/20/2012
11:06:57 AM:<br>
<br>
> From:</font></tt>
<br><tt><font size=2>> <br>
> Benjamin Hitz <hitz@stanford.edu></font></tt>
<br><tt><font size=2>> <br>
> To:</font></tt>
<br><tt><font size=2>> <br>
> "DBIx::Class user and developer list" <dbix-class@lists.scsys.co.uk></font></tt>
<br><tt><font size=2>> <br>
> Date:</font></tt>
<br><tt><font size=2>> <br>
> 06/20/2012 11:34 AM</font></tt>
<br><tt><font size=2>> <br>
> Subject:</font></tt>
<br><tt><font size=2>> <br>
> Re: [Dbix-class] Search_rs not returning newly created rows</font></tt>
<br><tt><font size=2>> <br>
> Not to get in the way here... but I think (not a Dbix::Class/<br>
> Catalyst expert) that Len is saying that:</font></tt>
<br><tt><font size=2>> <br>
> putting {accounts => $rs and pager => $rs->pager()}in the
stash is <br>
> effectively forcing the template system to make DB calls. It
has to<br>
> be even though Kenneth didn't actually post his template code.</font></tt>
<br><tt><font size=2>> <br>
> At first I thought it was just the pager, but I re-read and saw the
<br>
> $rs itself was passed.</font></tt>
<br><tt><font size=2>> <br>
> But I am not posting this just to pile on (and in fact, I could well<br>
> be wrong -- or correct materially but wrong in details)... but I <br>
> want to ask Len:</font></tt>
<br><tt><font size=2>> <br>
> What is bad about this design? Especially in a case where the
<br>
> pager (possibly not this one) has to fetch pages? </font></tt>
<br><tt><font size=2>> <br>
> Is the (your) preferred design pattern to put any UI fetches behind
<br>
> a webservice/ajax call? </font></tt>
<br><tt><font size=2>> <br>
> Thanks,</font></tt>
<br><tt><font size=2>> Ben</font></tt>
<br><tt><font size=2>> <br>
> On Jun 20, 2012, at 8:04 AM, Len Jaffe wrote:</font></tt>
<br><tt><font size=2>> <br>
> On Wed, Jun 20, 2012 at 8:53 AM, Kenneth S Mclane <ksmclane@us.ibm.com>
wrote:</font></tt>
<br><tt><font size=2>> Len Jaffe <lenjaffe@jaffesystems.com> wrote
on 06/19/2012 04:29:53 PM:<br>
> <br>
> Wow, way to jump to a conclusion. I am not making a DB call from my
<br>
> template, I just added an IF so if the field is null it displays a
<br>
> "0" instead of nothing, just a readability issue. :-)</font></tt>
<br><tt><font size=2>> </font></tt>
<br><tt><font size=2>> Sorry if you think I jumped anywhere. </font></tt>
<br><tt><font size=2>> I assure you my conclusion was well-reasoned
and reached via careful<br>
> deliberation.</font></tt>
<br><tt><font size=2>> <br>
> L</font></tt>
<br><tt><font size=2>> <br>
> --</font></tt>
<br><tt><font size=2>> Ben Hitz</font></tt>
<br><tt><font size=2>> Senior Scientific Programmer ** Saccharomyces
Genome Database ** GO Consortium</font></tt>
<br><tt><font size=2>> Stanford University ** hitz@stanford.edu</font></tt>
<br><tt><font size=2>> <br>
> _______________________________________________<br>
> 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>
> IRC: irc.perl.org#dbix-class<br>
> 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>
> 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>