<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Roll Your Own PHP Framework: Part III</title>
	<atom:link href="http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/feed/" rel="self" type="application/rss+xml" />
	<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/</link>
	<description></description>
	<lastBuildDate>Wed, 25 Aug 2010 16:03:29 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Charles</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1479</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Thu, 17 Dec 2009 23:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1479</guid>
		<description>I thought I would metion that the while statement that you have you have in database.php on line 45 will always add an extra boolean element to the end of the array.  It&#039;s not a big problem I thought i would point it out because it took me 20 minutes to figure out why it wasn&#039;t adding a user to the db after i checked to see if it was already there and my table was alway empty.
Sorry if this doesn&#039;t make sense I think my train of thought might have derailed somewhere. :(</description>
		<content:encoded><![CDATA[<p>I thought I would metion that the while statement that you have you have in database.php on line 45 will always add an extra boolean element to the end of the array.  It&#8217;s not a big problem I thought i would point it out because it took me 20 minutes to figure out why it wasn&#8217;t adding a user to the db after i checked to see if it was already there and my table was alway empty.<br />
Sorry if this doesn&#8217;t make sense I think my train of thought might have derailed somewhere. :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Horse</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1235</link>
		<dc:creator>Horse</dc:creator>
		<pubDate>Tue, 17 Nov 2009 17:17:27 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1235</guid>
		<description>Hey all

Having some issues with this, it seems to not like the fact that instead of creating a virtualhost I am trying to do it via a .htaccess instead

A lot of people seem to be getting on with this so what am I doing wrong?</description>
		<content:encoded><![CDATA[<p>Hey all</p>
<p>Having some issues with this, it seems to not like the fact that instead of creating a virtualhost I am trying to do it via a .htaccess instead</p>
<p>A lot of people seem to be getting on with this so what am I doing wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1154</link>
		<dc:creator>Caleb</dc:creator>
		<pubDate>Fri, 06 Nov 2009 20:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1154</guid>
		<description>Yeah, but I didn&#039;t really think it would cause a flame war here though.  Everyone here seems to be decent, and I was _not_ going to ask that on Stack Overflow and get my rep downvoted.  So I just thought I&#039;d ask you guys.  Thanks for your answers, and I would be interested in hearing your setup for developing web apps.  Maybe they&#039;ll let you write an article on that, if it&#039;s something that would be useful to other people.</description>
		<content:encoded><![CDATA[<p>Yeah, but I didn&#8217;t really think it would cause a flame war here though.  Everyone here seems to be decent, and I was _not_ going to ask that on Stack Overflow and get my rep downvoted.  So I just thought I&#8217;d ask you guys.  Thanks for your answers, and I would be interested in hearing your setup for developing web apps.  Maybe they&#8217;ll let you write an article on that, if it&#8217;s something that would be useful to other people.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wess</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1153</link>
		<dc:creator>Wess</dc:creator>
		<pubDate>Fri, 06 Nov 2009 19:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1153</guid>
		<description>Yeah, a real loaded question there.  You are, most likely, going to laugh when I tell you I don&#039;t prefer php at all, the reason ActionLeaf is there is because i was forced to use php and needed php to be more tolerable. 

For web dev, my favorite framework for &#039;websites&#039; is Django, otherwise I develop a bit different for &#039;web apps&#039; where I would use a bit different setup that would take a long minute to explain, perhaps my next article ;)</description>
		<content:encoded><![CDATA[<p>Yeah, a real loaded question there.  You are, most likely, going to laugh when I tell you I don&#8217;t prefer php at all, the reason ActionLeaf is there is because i was forced to use php and needed php to be more tolerable. </p>
<p>For web dev, my favorite framework for &#8216;websites&#8217; is Django, otherwise I develop a bit different for &#8216;web apps&#8217; where I would use a bit different setup that would take a long minute to explain, perhaps my next article ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snipe</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1152</link>
		<dc:creator>snipe</dc:creator>
		<pubDate>Fri, 06 Nov 2009 17:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1152</guid>
		<description>Haha - wow, that&#039;s a dangerous question to ask - some people get pretty bent out of shape when their favorites are challenged. I know some of the devs on CakePHP and Zend, so I&#039;m probably more experienced with them than others, and I&#039;d have to say I prefer Zend, but my intro to Cake was no ideal. I had to step in and take over a poor implementation of Cake so it sort of left a bad taste in my mouth, thanks to the previous dev, not Cake itself. So my preference is probably Zend, with Symfony a close second. But that&#039;s just me, just my personal opinion, and I&#039;m sure lots of others will have their own preferences are reasons for it.</description>
		<content:encoded><![CDATA[<p>Haha &#8211; wow, that&#8217;s a dangerous question to ask &#8211; some people get pretty bent out of shape when their favorites are challenged. I know some of the devs on CakePHP and Zend, so I&#8217;m probably more experienced with them than others, and I&#8217;d have to say I prefer Zend, but my intro to Cake was no ideal. I had to step in and take over a poor implementation of Cake so it sort of left a bad taste in my mouth, thanks to the previous dev, not Cake itself. So my preference is probably Zend, with Symfony a close second. But that&#8217;s just me, just my personal opinion, and I&#8217;m sure lots of others will have their own preferences are reasons for it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1151</link>
		<dc:creator>Caleb</dc:creator>
		<pubDate>Fri, 06 Nov 2009 17:54:07 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1151</guid>
		<description>Likewise Snipe, well except for the many years of development part ^_^.  Being as young as I am, I really need things like this to help with my experience even though it&#039;s &quot;off the job&quot; so to speak.  So to Wess, thanks for writing this series, and I hope you write more.  And a last note:  As a young and inexperienced developer I&#039;ve not used as many frameworks as you two probably have.  What would you consider your favorite framework?</description>
		<content:encoded><![CDATA[<p>Likewise Snipe, well except for the many years of development part ^_^.  Being as young as I am, I really need things like this to help with my experience even though it&#8217;s &#8220;off the job&#8221; so to speak.  So to Wess, thanks for writing this series, and I hope you write more.  And a last note:  As a young and inexperienced developer I&#8217;ve not used as many frameworks as you two probably have.  What would you consider your favorite framework?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snipe</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1150</link>
		<dc:creator>snipe</dc:creator>
		<pubDate>Fri, 06 Nov 2009 17:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1150</guid>
		<description>Heh - well, I&#039;ve taken a fancy to it as a learning tool - I don&#039;t know that I&#039;d use it in production. I&#039;ve been a PHP dev for many years and have used several frameworks, but had never bothered to write my own just for the experience. I have my own structure that I typically use when creating new apps, file locations, templating, etc - but this has been fun to play around with.</description>
		<content:encoded><![CDATA[<p>Heh &#8211; well, I&#8217;ve taken a fancy to it as a learning tool &#8211; I don&#8217;t know that I&#8217;d use it in production. I&#8217;ve been a PHP dev for many years and have used several frameworks, but had never bothered to write my own just for the experience. I have my own structure that I typically use when creating new apps, file locations, templating, etc &#8211; but this has been fun to play around with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1149</link>
		<dc:creator>Caleb</dc:creator>
		<pubDate>Fri, 06 Nov 2009 17:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1149</guid>
		<description>Yeah I took a look at actionleaf.  It&#039;s very nice, and I enjoyed reading the code. It&#039;s very clean and well thought out.  I would like contributing to such a project but being as young as I am (and I mean just a little older than ethan) my coding hasn&#039;t reached the level of proficiency I&#039;d like.  Also I do realize that Peanut is just an example.  I&#039;m basically using this as a learning tool, going through it and seeing what features I could add and how this could be done differently and how that could be implemented.  Trust me I&#039;m not about to tell people to use it for a project.  Though it does seem that snipe has taken a fancy too it.</description>
		<content:encoded><![CDATA[<p>Yeah I took a look at actionleaf.  It&#8217;s very nice, and I enjoyed reading the code. It&#8217;s very clean and well thought out.  I would like contributing to such a project but being as young as I am (and I mean just a little older than ethan) my coding hasn&#8217;t reached the level of proficiency I&#8217;d like.  Also I do realize that Peanut is just an example.  I&#8217;m basically using this as a learning tool, going through it and seeing what features I could add and how this could be done differently and how that could be implemented.  Trust me I&#8217;m not about to tell people to use it for a project.  Though it does seem that snipe has taken a fancy too it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wess</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1148</link>
		<dc:creator>Wess</dc:creator>
		<pubDate>Fri, 06 Nov 2009 17:13:32 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1148</guid>
		<description>Sorry, the filters killed that, if you want more info on actionleaf or anything, DM me on twitter @wattzilla or email me: wess(a)wattz(d)net</description>
		<content:encoded><![CDATA[<p>Sorry, the filters killed that, if you want more info on actionleaf or anything, DM me on twitter @wattzilla or email me: wess(a)wattz(d)net</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wess</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1147</link>
		<dc:creator>Wess</dc:creator>
		<pubDate>Fri, 06 Nov 2009 17:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1147</guid>
		<description>Also, make sure you realize that Peanut is just an example of how the pieces fit together.  I refer back to ActionLeaf again here, what actionleaf does (like django) is allow you to &#039;extend&#039; a template.

So if you have:


then in your sub template you can do:
extends(&#039;layout.html&#039;)?&gt;
Hello World

Which would wrap your h1 in the extended template.</description>
		<content:encoded><![CDATA[<p>Also, make sure you realize that Peanut is just an example of how the pieces fit together.  I refer back to ActionLeaf again here, what actionleaf does (like django) is allow you to &#8216;extend&#8217; a template.</p>
<p>So if you have:</p>
<p>then in your sub template you can do:<br />
extends(&#8217;layout.html&#8217;)?&gt;<br />
Hello World</p>
<p>Which would wrap your h1 in the extended template.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wess</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1146</link>
		<dc:creator>Wess</dc:creator>
		<pubDate>Fri, 06 Nov 2009 17:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1146</guid>
		<description>Are you talking about making methods available to all your page views?  If so if you change the structure slightly to use classes for pages (like appengine, and actionlead) then you can extend a central class AppController that would have your &#039;global&#039; methods, ActionLeaf( actionleaf.googlecode.com ) does:

class MyPage
{
     public function get(request)
     {
          // page code
          return &quot;Hello World&quot;;
     {
}

Using that same structure you could make a class like:

class AppController 
{
     protected function doSomething()
     {
          return &quot;Something fun!&quot;;
     }
}

class MyPage extends AppController
{
     public function get(request)
     {
          $this-&gt;doSomething();
          return &quot;Hello World&quot;;
     {
}

This is not a new way or anything, quite a few frameworks do it.</description>
		<content:encoded><![CDATA[<p>Are you talking about making methods available to all your page views?  If so if you change the structure slightly to use classes for pages (like appengine, and actionlead) then you can extend a central class AppController that would have your &#8216;global&#8217; methods, ActionLeaf( actionleaf.googlecode.com ) does:</p>
<p>class MyPage<br />
{<br />
     public function get(request)<br />
     {<br />
          // page code<br />
          return &#8220;Hello World&#8221;;<br />
     {<br />
}</p>
<p>Using that same structure you could make a class like:</p>
<p>class AppController<br />
{<br />
     protected function doSomething()<br />
     {<br />
          return &#8220;Something fun!&#8221;;<br />
     }<br />
}</p>
<p>class MyPage extends AppController<br />
{<br />
     public function get(request)<br />
     {<br />
          $this-&gt;doSomething();<br />
          return &#8220;Hello World&#8221;;<br />
     {<br />
}</p>
<p>This is not a new way or anything, quite a few frameworks do it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1145</link>
		<dc:creator>Caleb</dc:creator>
		<pubDate>Fri, 06 Nov 2009 16:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1145</guid>
		<description>Well I&#039;m not sure what Wess would do, but I like how Ruby on Rails does it (yea I use both ^_^).  In Rails you have views for different actions and a layout for the entire site.  This framework&#039;s directory structure does not at once have a logical place to put that, so here&#039;s a fix but it&#039;s a little kludgy.  I&#039;d create a file called app_layout.php in the templates folder then in the template class you&#039;ll need to change the code to include the layout and pass the url parameters to the layout so it can dynamically include the view for that action.  So using this approach you would put everything that would be on every page in the app_layout.php file.  That would obviously be the header and footer, but there should be just a snippet of code that uses the variables passed to the layout by the template class that calls the view file for that action.  This may not be the approach you were thinking of but after using Rails, to me it just seemed logical.

I&#039;ll tell you exploring Rails has been an enlightening experience, and will help in the long run with PHP. HTH

P.S. If I was the IT guy I would have said &quot;No I didn&#039;t change anything&quot; *thinking to himself* -&gt; &quot;I knew I shouldn&#039;t have touched that option!&quot; and then went and fixed it.  I&#039;d venture to say he did it, but then again I can&#039;t see your code.</description>
		<content:encoded><![CDATA[<p>Well I&#8217;m not sure what Wess would do, but I like how Ruby on Rails does it (yea I use both ^_^).  In Rails you have views for different actions and a layout for the entire site.  This framework&#8217;s directory structure does not at once have a logical place to put that, so here&#8217;s a fix but it&#8217;s a little kludgy.  I&#8217;d create a file called app_layout.php in the templates folder then in the template class you&#8217;ll need to change the code to include the layout and pass the url parameters to the layout so it can dynamically include the view for that action.  So using this approach you would put everything that would be on every page in the app_layout.php file.  That would obviously be the header and footer, but there should be just a snippet of code that uses the variables passed to the layout by the template class that calls the view file for that action.  This may not be the approach you were thinking of but after using Rails, to me it just seemed logical.</p>
<p>I&#8217;ll tell you exploring Rails has been an enlightening experience, and will help in the long run with PHP. HTH</p>
<p>P.S. If I was the IT guy I would have said &#8220;No I didn&#8217;t change anything&#8221; *thinking to himself* -&gt; &#8220;I knew I shouldn&#8217;t have touched that option!&#8221; and then went and fixed it.  I&#8217;d venture to say he did it, but then again I can&#8217;t see your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snipe</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1138</link>
		<dc:creator>snipe</dc:creator>
		<pubDate>Wed, 04 Nov 2009 19:33:43 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1138</guid>
		<description>Hi Caleb,

I have NO idea why my comments came through as Lars - guess I wasn&#039;t paying attention to the stored fields.

It did turn out to be a mod_rewrite issue, although I&#039;m still not entirely sure what it was. I hopped onto tech support chat (I&#039;m cloud hosted, and wanted to confirm there were no weird hacks in place that might be causing problems). The tech support guy swears he didn&#039;t change anything, but it suddenly stopped doing the 7-inserts and worked properly. So, needless to say, I&#039;m skeptical that he didn&#039;t change anything, but the situation is resolved.

I&#039;m curious as to how you would suggest best handling (within this specific framework structure) functions and classes that affect a global template. 

For example, in my template pages, I&#039;m including a main header and footer template since that is the same throughout the site, but I&#039;d like to make submenus, active navigation elements, etc easier to generate, so I would create a set of functions to handle those. Where in this file structure would you recommend keeping those, since the classes for everything else have specific places? In CakePHP or Symfony, that&#039;s a little clearer, but I&#039;m not sure what you envisioned in this one.</description>
		<content:encoded><![CDATA[<p>Hi Caleb,</p>
<p>I have NO idea why my comments came through as Lars &#8211; guess I wasn&#8217;t paying attention to the stored fields.</p>
<p>It did turn out to be a mod_rewrite issue, although I&#8217;m still not entirely sure what it was. I hopped onto tech support chat (I&#8217;m cloud hosted, and wanted to confirm there were no weird hacks in place that might be causing problems). The tech support guy swears he didn&#8217;t change anything, but it suddenly stopped doing the 7-inserts and worked properly. So, needless to say, I&#8217;m skeptical that he didn&#8217;t change anything, but the situation is resolved.</p>
<p>I&#8217;m curious as to how you would suggest best handling (within this specific framework structure) functions and classes that affect a global template. </p>
<p>For example, in my template pages, I&#8217;m including a main header and footer template since that is the same throughout the site, but I&#8217;d like to make submenus, active navigation elements, etc easier to generate, so I would create a set of functions to handle those. Where in this file structure would you recommend keeping those, since the classes for everything else have specific places? In CakePHP or Symfony, that&#8217;s a little clearer, but I&#8217;m not sure what you envisioned in this one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wess</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1137</link>
		<dc:creator>Wess</dc:creator>
		<pubDate>Wed, 04 Nov 2009 19:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1137</guid>
		<description>Caleb, I don&#039;t mind, but this is no where near anything that I would expect people take any further as it&#039;s just to give a very high overview.  I have already started a project called: Actionleaf (actionleaf.googlecode.com) which you could move to Github and work on, Im open for that.  If you want Peanut, feel free.  Actionleaf is closer to being a completely solution , I am just currently swamped and haven&#039;t had time to work on it.  Shoot me a DM on twitter if you have any other questions (@wattzilla).

Thanks for the interest everyone!
Wess</description>
		<content:encoded><![CDATA[<p>Caleb, I don&#8217;t mind, but this is no where near anything that I would expect people take any further as it&#8217;s just to give a very high overview.  I have already started a project called: Actionleaf (actionleaf.googlecode.com) which you could move to Github and work on, Im open for that.  If you want Peanut, feel free.  Actionleaf is closer to being a completely solution , I am just currently swamped and haven&#8217;t had time to work on it.  Shoot me a DM on twitter if you have any other questions (@wattzilla).</p>
<p>Thanks for the interest everyone!<br />
Wess</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb</title>
		<link>http://fuelyourcoding.com/roll-your-own-php-framework-part-iii/comment-page-1/#comment-1136</link>
		<dc:creator>Caleb</dc:creator>
		<pubDate>Wed, 04 Nov 2009 18:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://fuelyourcoding.com/?p=652#comment-1136</guid>
		<description>Hey everybody.  I&#039;m not sure if there&#039;s any interest in this, but I put the code up on http://github.com/mrdude/peanut-framework if anyone would like to take this any further.  I have somethings I&#039;d like to do to it (if I ever get the time), and obviously Lars is making changes to it.  So if it&#039;s alright with you Wess, since it is your original work, would it be alright if I licensed it as GPL?</description>
		<content:encoded><![CDATA[<p>Hey everybody.  I&#8217;m not sure if there&#8217;s any interest in this, but I put the code up on <a href="http://github.com/mrdude/peanut-framework" rel="nofollow">http://github.com/mrdude/peanut-framework</a> if anyone would like to take this any further.  I have somethings I&#8217;d like to do to it (if I ever get the time), and obviously Lars is making changes to it.  So if it&#8217;s alright with you Wess, since it is your original work, would it be alright if I licensed it as GPL?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
