<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Exactly, as there is a little bit of application logic, so I need this process.<br>Thanks for the solution Jay. I'll go for it.<br><br>Just one last question. When you talk about using 'lib/MyApp/View/MyView.pm', you mean that is also correct to create a simple perl Module for your view. Then implement process method in the View.pm and forward the context from the Controller ( $c-&gt;forward( $c-&gt;view('MyView') ); )?<br><br>&nbsp;<br>David<br><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">De:</span></b> "Mesdaq, Ali" &lt;amesdaq@websense.com&gt;<br><b><span style="font-weight:
 bold;">Para:</span></b> The elegant MVC web framework &lt;catalyst@lists.scsys.co.uk&gt;<br><b><span style="font-weight: bold;">Enviado:</span></b> vie,5 marzo, 2010 21:42<br><b><span style="font-weight: bold;">Asunto:</span></b> RE: [Catalyst] Best practices: XML output from static XML<br></font><br>" Catalyst to serve a static file (which would only make sense if there *is* application logic) putting this in a View would be the Right Way."<br><br>Yes my point exactly. That’s why I was comparing it to serving static image files and how it's similar to this situation because there seems to be no application logic at all needed for this example so putting it in a view just to follow the design pattern does not make sense to me. That’s why I gave the previous example as an example of overkilling with the design pattern where it really serves no purpose. I completely agree that it makes much more sense to leverage the webserver for dealing with static
 files when necessary/possible. <br><br>Thanks,<br>------------------------------------------<br>Ali Mesdaq (CISSP, GIAC-GREM)<br>Sr. Security Researcher<br>Websense Security Labs<br><a href="http://www.WebsenseSecurityLabs.com" target="_blank">http://www.WebsenseSecurityLabs.com</a><br>------------------------------------------<br><br><br>-----Original Message-----<br>From: J. Shirley [mailto:<a ymailto="mailto:jshirley@gmail.com" href="mailto:jshirley@gmail.com">jshirley@gmail.com</a>] <br>Sent: Friday, March 05, 2010 12:20 PM<br>To: The elegant MVC web framework<br>Subject: Re: [Catalyst] Best practices: XML output from static XML<br><br>On Fri, Mar 5, 2010 at 11:31 AM, Mesdaq, Ali &lt;<a ymailto="mailto:amesdaq@websense.com" href="mailto:amesdaq@websense.com">amesdaq@websense.com</a>&gt; wrote:<br>&gt; To me this sounds like it’s the same issue as serving static images you<br>&gt; wouldn’t create a view for that unless you need to wrap it around
 some<br>&gt; application logic. Or at least that’s what it sounds like to me based on the<br>&gt; information provided. We could take the MVC concept really far and say that<br>&gt; static files need to have a filesystem Model with Controller logic for<br>&gt; finding the files and each have their own View for each filetype.<br>&gt;<br>&gt;<br>&gt;<br><br>I would say that putting it into a view allows a greater degree of<br>future-proof and foresight.&nbsp; Putting it into the controller would work<br>fine, up until you need to serve another static file (or a different<br>file), or add an access control layer, or switch to use sendfile, or<br>switch to start serving from something like MogileFS.<br><br>If you put it all the above in one method, why put it in a controller<br>rather than a view?<br><br>In all of what you said you haven't actually said what is wrong with<br>using a view.<br><br>I would certainly recommend that serving static files would
 be done by<br>the webserver and render this moot.&nbsp; However, if you want to use<br>Catalyst to serve a static file (which would only make sense if there<br>*is* application logic) putting this in a View would be the Right Way.<br><br>-Jay<br><br>_______________________________________________<br>List: <a ymailto="mailto:Catalyst@lists.scsys.co.uk" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a 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>Searchable archive: <a 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>Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br><br><br><span> Protected by Websense Hosted Email Security -- <a target="_blank"
 href="http://www.websense.com">www.websense.com</a> </span><br><br>_______________________________________________<br>List: <a ymailto="mailto:Catalyst@lists.scsys.co.uk" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a 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>Searchable archive: <a 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>Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br></div></div>
</div><br>



      </body></html>