<br><br><div class="gmail_quote">On Fri, Jun 5, 2009 at 2:28 PM, Zbigniew Lukasiak <span dir="ltr">&lt;<a href="mailto:zzbbyy@gmail.com">zzbbyy@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Thu, Jun 4, 2009 at 4:51 AM, Devin Austin&lt;<a href="mailto:devin.austin@gmail.com">devin.austin@gmail.com</a>&gt; wrote:<br>
</div><div><div></div><div class="h5">&gt; Howdy all,<br>
&gt;<br>
&gt; I&#39;ve put together an RFC for the new Catalyst::Helper API.<br>
&gt; The body text is located below, but it is also available here in a pretty<br>
&gt; formatted<br>
&gt; version:<a href="http://www.codedright.net/2009/06/rfc-catalysthelper-api.html" target="_blank">http://www.codedright.net/2009/06/rfc-catalysthelper-api.html</a><br>
&gt;<br>
&gt; For the improvement of the Catalyst::Helper API and Catalyst development in<br>
&gt; general, comments are of the utmost importance.  The more feedback<br>
&gt; I can get, the better and quicker the API will be completed.<br>
&gt;<br>
&gt; Thank you kindly!<br>
&gt;<br>
&gt; -dhoss<br>
&gt;<br>
&gt; Intro:<br>
&gt; This document is to get opinions on a new, up to date set up  and<br>
&gt; refactoring of the Catalyst::Helper API.<br>
&gt;<br>
&gt; What We Have<br>
&gt; Currently, all template/image data is hideously store inline with code in<br>
&gt; the __DATA__ section of Catalyst::Helper.pm.  The API is designed to handle<br>
&gt; data this way, which is wrong wrong wrong for a number of reasons:<br>
&gt;<br>
&gt;  You have to actually delve into Catalyst internals to edit any of these<br>
&gt; files<br>
&gt;  If you create a helper, your data must be inline as well.<br>
&gt;  Its current layout does not reflect the directory hierarchy of a Catalyst<br>
&gt; application, thus making it pretty dang hard to expand upon/upgrade.<br>
&gt;<br>
&gt; There are no methods to allow you to edit previously created files, unless<br>
&gt; you want to create your own helper and feverishly create your own file<br>
&gt; modification method(s).<br>
&gt; I can attest to the stress this causes, as I&#39;ve been doing a good deal of<br>
&gt; yak shaving cleaning this code up and creating the proper tests for it.<br>
&gt; It&#39;s not a very fun ordeal at this point.<br>
&gt;<br>
&gt; What we want<br>
&gt; From the feedback I&#39;ve gathered thus far:<br>
&gt;<br>
&gt; We do want previously created helper files to be modifiable via<br>
&gt; Catalyst::Helpers.  For instance, updating Makefile.PL, updating myapp.conf<br>
&gt; to reflect changes, updating DBIC schema files to reflect database changes<br>
&gt; (with minimal pain). Also, add an infrastructure for modifying existing<br>
&gt; catalyst code, e.g. moving Catalyst::Helper::AuthDBIC from an  experimental<br>
&gt; proof of concept to something that people might actually want to use for<br>
&gt; their own stuff.<br>
&gt;<br>
&gt; We do want to be able to remove a good deal of the boilerplate code that<br>
&gt; still seems to need to be created manually, for each app, even though it&#39;s<br>
&gt; the exact same code for each instance.<br>
&gt;<br>
&gt; We do want to set up the helper files in the hierarchy that a Catalyst<br>
&gt; application is created in, thus cutting quickly to the chase in the way of<br>
&gt; creating an app.  It&#39;s a simple name and Template::Toolkit variable<br>
&gt; translation, then writing the file to the filesystem process then.  This<br>
&gt; gets our binary data out of the API code, the template data out of the API<br>
&gt; code, and generally makes every one more happy.<br>
&gt;<br>
&gt; With this said, here are some more specific ideas that have been passed my<br>
&gt; way that I think would really help further advance our precious Helper API:<br>
&gt;<br>
&gt;  Beat up MooseX::Getopt to deal with pass-through options, so you can deal<br>
&gt; with passing data structures as arguments easier. Not to mention actually<br>
&gt; start USING it in the Helper API.<br>
&gt; Add a feature to write out DBIC schema files for deployment.  Yes,<br>
&gt; make_schema_at does this, but you have to write your own little script to<br>
&gt; enjoy this morsel of functionality.  It would be nice to have it packaged up<br>
&gt; and ready to go for you.<br>
&gt; Have something like TTSite, but less sucky.  Perhaps there could be a<br>
&gt; default layout that can be created, or you can create your own sort of skin<br>
&gt; and have that the default generation.  Or, better yet, packaged skins that<br>
&gt; users can submit to $somewhere and have the author choose a &quot;theme&quot; for<br>
&gt; their app. For instance, using $javascript framework and $css framework to<br>
&gt; do so, like in chapt 11 of the upcoming book (Example usage:<br>
&gt; <a href="http://www.uow.edu.au/%7Ekd21/" target="_blank">http://www.uow.edu.au/~kd21/</a>)<br>
&gt;<br>
&gt; These are the current ideas I have, and that others have submitted.  Sure<br>
&gt; this RFC is a bit bare, but we don&#39;t have a whole ton to work with at the<br>
&gt; moment with Catalyst::Helper, so we need more feedback to beef things up.<br>
<br>
</div></div>Hi,<br>
<br>
All that you mention above are great steps ahead - and it&#39;ll be<br>
wonderful if they are implemented.  If I may add something to that<br>
list - it is a possibility to run the helpers in aggregation - so that<br>
you could define the configuration once for all the parts and then run<br>
catalyst.pl to generate the whole application in one step.   Currently<br>
you run catalyst.pl from the outside - and then you go into the<br>
generated directory and use one of the generated scripts to generate<br>
the further components.  In theory it should be possible that all that<br>
generation is done by catalyst.pl.<br>
<br>
Cheers,<br>
Zbigniew<br>
<a href="http://brudnopis.blogspot.com/" target="_blank">http://brudnopis.blogspot.com/</a><br>
<a href="http://perlalchemy.blogspot.com/" target="_blank">http://perlalchemy.blogspot.com/</a><br>
<br>
_______________________________________________<br>
Catalyst-dev mailing list<br>
<a href="mailto:Catalyst-dev@lists.scsys.co.uk">Catalyst-dev@lists.scsys.co.uk</a><br>
<a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev</a><br>
</blockquote></div><br>Hi Zbigniew,<br><br>Thanks for the input!  (Thanks to <font style="color: rgb(0, 0, 0);" color="#888888">Francesc a</font>s well, I didn&#39;t thank you in my last email).<br><br>Perhaps you could flesh out your idea some? Give me an example of how it would look in usage, I think I&#39;m visualizing it properly, but some concrete examples would be superb.<br>
<br>Thanks again!<br><br>-Devin<br clear="all"><br>-- <br>Devin Austin<br><a href="http://www.codedright.net">http://www.codedright.net</a><br><a href="http://www.dreamhost.com/r.cgi?326568/hosting.html">http://www.dreamhost.com/r.cgi?326568/hosting.html</a> - Host with DreamHost!<br>