<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1457105438035_16626" dir="ltr"><span id="yui_3_16_0_1_1457105438035_16811">If you don't have a lot of view only logic (the view is just a dumb 'take this perl data structure, convert it to a display format using default serialization rules and send it to the response) then a thin view adaptor with Catalyst::Model::Adaptor might be the easiest thing. &nbsp;If you are using the most recent Catalyst you could even avoid the need for a boilerplate proxy class using component injection.</span></div><div id="yui_3_16_0_1_1457105438035_16626" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1457105438035_16626" dir="ltr"><span id="yui_3_16_0_1_1457105438035_16963">Then main thing is thinking about how to shuffle data to the view. &nbsp;Most current art uses the stash, but lately I prefer to avoid that and use either a dedicated view model, or the default model, so that I can properly constrain my data and offer the view better view only logic.</span></div><div id="yui_3_16_0_1_1457105438035_16626" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1457105438035_16626" dir="ltr"><span id="yui_3_16_0_1_1457105438035_17030">In general&nbsp;think 'how can I do something generally useful' over 'what is the Catalyst way to do this'. &nbsp;Ideally your Catalyst&nbsp;</span>components (models, views, etc) are the thinnest possible layer to adapt a stand alone model.</div><div id="yui_3_16_0_1_1457105438035_16626" dir="ltr"><br></div><div id="yui_3_16_0_1_1457105438035_16626" dir="ltr">jnap</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Friday, March 4, 2016 4:28 AM, Kieren Diment &lt;diment@gmail.com&gt; wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv0818898416"><div><div dir="ltr"><div><div><div><div>looks to me like you'd want Catalyst::Model::Adaptor + Data::iCal + an optional very thin view that did something like:<br clear="none"><br clear="none"></div>&nbsp;&nbsp;&nbsp; $c-&gt;res-&gt;content_type($ical_content_type);<br clear="none"></div>&nbsp;&nbsp;&nbsp; $c-&gt;res-&gt;body($c-&gt;stash-&gt;{calendar});<br clear="none"><br clear="none"></div>in the process method, and not much else.<br clear="none"><br clear="none"></div>The reason you don't see views for stuff like this much in catalyst land is that this kind of thing is usually pretty simple.<br clear="none"></div><div class="yiv0818898416gmail_extra"><br clear="none"><div class="yiv0818898416gmail_quote">On Fri, Mar 4, 2016 at 8:22 PM, Chris Welch <span dir="ltr">&lt;<a rel="nofollow" shape="rect" ymailto="mailto:welch.chris@gmail.com" target="_blank" href="mailto:welch.chris@gmail.com">welch.chris@gmail.com</a>&gt;</span> wrote:<br clear="none"><blockquote class="yiv0818898416gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0818898416yqt8938910720" id="yiv0818898416yqt16131"><div dir="ltr"><div class="yiv0818898416gmail_default" style="font-family:trebuchet ms, sans-serif;color:#000066;">Thanks for the reply - may I ask what the model would be doing, given that presumably it would have to go through a view in the end anyway?&nbsp; Because the data itself already exists in a model, all I'm wanting to do effectively is extract that and display it in a slightly different format, so I'm surprised that another model is the way to go - but then I've sort of been learning as I go with this stuff, so I may well be missing something fundamental!</div><div class="yiv0818898416gmail_default" style="font-family:trebuchet ms, sans-serif;color:#000066;"><br clear="none"></div><div class="yiv0818898416gmail_default" style="font-family:trebuchet ms, sans-serif;color:#000066;">Thanks</div></div></div>
<br clear="none">_______________________________________________<br clear="none">
List: <a rel="nofollow" shape="rect" ymailto="mailto:Catalyst@lists.scsys.co.uk" target="_blank" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br clear="none">
Listinfo: <a rel="nofollow" shape="rect" target="_blank" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br clear="none">
Searchable archive: <a rel="nofollow" shape="rect" target="_blank" href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br clear="none">
Dev site: <a rel="nofollow" shape="rect" target="_blank" href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br><div class="yqt8938910720" id="yqt31152">_______________________________________________<br clear="none">List: <a shape="rect" ymailto="mailto:Catalyst@lists.scsys.co.uk" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br clear="none">Listinfo: <a shape="rect" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br clear="none">Searchable archive: <a shape="rect" href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br clear="none">Dev site: <a shape="rect" href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>