<?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: Write your own PHP MVC Framework (Part 2)</title>
	<atom:link href="http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/</link>
	<description>on web development</description>
	<pubDate>Thu, 17 May 2012 06:21:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: MRF</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-42791</link>
		<dc:creator>MRF</dc:creator>
		<pubDate>Fri, 30 Mar 2012 19:09:06 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-42791</guid>
		<description>Part 1 and Part 2 have been very informative, and going through them with Anant and playing with the code trying to get it to work has taught me some good basic concepts.  I initially looked at CodeIgniter and thought "sheesh, another framework to learn which will take time" so came here and started rolling my own.  

Guess what?  After working through Anant's code, and realizing you can't depend on a mostly dead blog for something you want to get done anytime soon, I went back to CodeIgniter and understand it much better now, it follows these exact concepts and is very well done (and with very responsive user support).  Credit to these two parts!  Thanks Anant.</description>
		<content:encoded><![CDATA[<p>Part 1 and Part 2 have been very informative, and going through them with Anant and playing with the code trying to get it to work has taught me some good basic concepts.  I initially looked at CodeIgniter and thought &#8220;sheesh, another framework to learn which will take time&#8221; so came here and started rolling my own.  </p>
<p>Guess what?  After working through Anant&#8217;s code, and realizing you can&#8217;t depend on a mostly dead blog for something you want to get done anytime soon, I went back to CodeIgniter and understand it much better now, it follows these exact concepts and is very well done (and with very responsive user support).  Credit to these two parts!  Thanks Anant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MRF</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-41801</link>
		<dc:creator>MRF</dc:creator>
		<pubDate>Wed, 21 Mar 2012 19:43:54 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-41801</guid>
		<description>Anant, good stuff.  I'm trying to do user auth using your redirectAction plan, but getting stacked views just like raleigh, traxk, and Tom.  I've tried adding a beforeAction to a controller, calling redirectAction('users','_isloggedin',array());  my users controller has 
function _isloggedin()  {
        // let's assume false here for testing, redirect
	performAction('users','login',array(),1); }

Since you've got a lot of interest in your framework and we're hitting this wall, could you give us more guidance here?  Thanks!  Good Stuff, keep up the good work.
	}</description>
		<content:encoded><![CDATA[<p>Anant, good stuff.  I&#8217;m trying to do user auth using your redirectAction plan, but getting stacked views just like raleigh, traxk, and Tom.  I&#8217;ve tried adding a beforeAction to a controller, calling redirectAction(&#8217;users&#8217;,'_isloggedin&#8217;,array());  my users controller has<br />
function _isloggedin()  {<br />
        // let&#8217;s assume false here for testing, redirect<br />
	performAction(&#8217;users&#8217;,'login&#8217;,array(),1); }</p>
<p>Since you&#8217;ve got a lot of interest in your framework and we&#8217;re hitting this wall, could you give us more guidance here?  Thanks!  Good Stuff, keep up the good work.<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MRF</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-40143</link>
		<dc:creator>MRF</dc:creator>
		<pubDate>Thu, 08 Mar 2012 16:46:01 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-40143</guid>
		<description>I just figured out XAMPP must have compression turned on also, so it's getting compressed twice?  

comment out this line in shared.php:
// gzipOutput() &#124;&#124; ob_start("ob_gzhandler");</description>
		<content:encoded><![CDATA[<p>I just figured out XAMPP must have compression turned on also, so it&#8217;s getting compressed twice?  </p>
<p>comment out this line in shared.php:<br />
// gzipOutput() || ob_start(&#8221;ob_gzhandler&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anant Garg</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-39915</link>
		<dc:creator>Anant Garg</dc:creator>
		<pubDate>Wed, 07 Mar 2012 06:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-39915</guid>
		<description>@MRF You may have to switch of the GZIP feature.</description>
		<content:encoded><![CDATA[<p>@MRF You may have to switch of the GZIP feature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MRF</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-39914</link>
		<dc:creator>MRF</dc:creator>
		<pubDate>Wed, 07 Mar 2012 06:22:50 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-39914</guid>
		<description>I'm using XAMPP, pointed my httpd.conf at the downloaded framework subdirectory, and like many others, am seeing "Content Encoding Error : The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.".  Any help?</description>
		<content:encoded><![CDATA[<p>I&#8217;m using XAMPP, pointed my httpd.conf at the downloaded framework subdirectory, and like many others, am seeing &#8220;Content Encoding Error : The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.&#8221;.  Any help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik ?erpnjak</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-39807</link>
		<dc:creator>Erik ?erpnjak</dc:creator>
		<pubDate>Tue, 06 Mar 2012 09:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-39807</guid>
		<description>Dear Anant!

Thank you very much for your tutorial on the MVC approach of writing applications.

From your example i have build a framework that supports integration of multiple languages with a change of a flag in the DB, total abstraction of functions and behavior. I have made 3 different controllers, each for a different datatype: one for text (like a about us page), one for lists (like partners or banners) and for tree structures. All the functionality is pushed back into the main model class, so no matter what type of controller I create it can use all functions a model has.

I had to change the hook function to my needs and also the save function of the sqlquery class, because of the languages.

I cant thank you enought, because you have helped me cut down development times to the minimun. Now it takes me about an hour to copy/paste the whole framework and to add different contollers and model. All my models have a build-in files support and to enable file uploads I have to change a flag in the DB and thats it.

The system is also aware of AJAX calls so it handles them automaticaly. A javascript function that I have written enables me to send parameters the way the framework understands it.

Keep up the good work

Yours truly
Erik</description>
		<content:encoded><![CDATA[<p>Dear Anant!</p>
<p>Thank you very much for your tutorial on the MVC approach of writing applications.</p>
<p>From your example i have build a framework that supports integration of multiple languages with a change of a flag in the DB, total abstraction of functions and behavior. I have made 3 different controllers, each for a different datatype: one for text (like a about us page), one for lists (like partners or banners) and for tree structures. All the functionality is pushed back into the main model class, so no matter what type of controller I create it can use all functions a model has.</p>
<p>I had to change the hook function to my needs and also the save function of the sqlquery class, because of the languages.</p>
<p>I cant thank you enought, because you have helped me cut down development times to the minimun. Now it takes me about an hour to copy/paste the whole framework and to add different contollers and model. All my models have a build-in files support and to enable file uploads I have to change a flag in the DB and thats it.</p>
<p>The system is also aware of AJAX calls so it handles them automaticaly. A javascript function that I have written enables me to send parameters the way the framework understands it.</p>
<p>Keep up the good work</p>
<p>Yours truly<br />
Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wfc</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-38963</link>
		<dc:creator>wfc</dc:creator>
		<pubDate>Tue, 28 Feb 2012 17:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-38963</guid>
		<description>Hey :)

i'm trying to make a simple notification sistem on this framework
so the code in the header.php looks like this:

if (!empty($template_notification))
{
	foreach ($template_notification as $subject =&gt; $message){echo ''.$message.'';
	}
}

and it works fine when i do this in the controller

$this-&gt;set('template_notification', array('error' =&gt; 'some error like-password is too short'));

but i need this in the model and this doesn't work

so please help :)</description>
		<content:encoded><![CDATA[<p>Hey <img src='http://anantgarg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>i&#8217;m trying to make a simple notification sistem on this framework<br />
so the code in the header.php looks like this:</p>
<p>if (!empty($template_notification))<br />
{<br />
	foreach ($template_notification as $subject =&gt; $message){echo &#8221;.$message.&#8221;;<br />
	}<br />
}</p>
<p>and it works fine when i do this in the controller</p>
<p>$this-&gt;set(&#8217;template_notification&#8217;, array(&#8217;error&#8217; =&gt; &#8217;some error like-password is too short&#8217;));</p>
<p>but i need this in the model and this doesn&#8217;t work</p>
<p>so please help <img src='http://anantgarg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robin</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-38877</link>
		<dc:creator>robin</dc:creator>
		<pubDate>Tue, 28 Feb 2012 07:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-38877</guid>
		<description>really nice framework, thank you very much for making this.
but I stumbled onto some troubles (PHP/5.3.8 using xamp), the first was that I got a "Content Encoding Error" using firefox and "unable to connect" using chrome and ie9. I quickly found out this was about the line "error_reporting = E_ALL &#124; E_STRICT" in the php.ini file, just change it into "error_reporting = E_ALL^ E_DEPRECATED &#124; E_STRICT" and I got my website up and running.
the second problem was that there were messages on the site saying stuff was depricated on line 22 and 23 of the vanillacontroller.class.php, just remove the &amp; in front of the new $model; and new template(); and eveything is fine.
I thought I should mention it because I learned a lot from this. Thank you</description>
		<content:encoded><![CDATA[<p>really nice framework, thank you very much for making this.<br />
but I stumbled onto some troubles (PHP/5.3.8 using xamp), the first was that I got a &#8220;Content Encoding Error&#8221; using firefox and &#8220;unable to connect&#8221; using chrome and ie9. I quickly found out this was about the line &#8220;error_reporting = E_ALL | E_STRICT&#8221; in the php.ini file, just change it into &#8220;error_reporting = E_ALL^ E_DEPRECATED | E_STRICT&#8221; and I got my website up and running.<br />
the second problem was that there were messages on the site saying stuff was depricated on line 22 and 23 of the vanillacontroller.class.php, just remove the &amp; in front of the new $model; and new template(); and eveything is fine.<br />
I thought I should mention it because I learned a lot from this. Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Archana Sriram</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-36680</link>
		<dc:creator>Archana Sriram</dc:creator>
		<pubDate>Fri, 10 Feb 2012 19:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-36680</guid>
		<description>Anant, awesome stuff. 

I have been using your framework for a couple of years now, and I've integrated it well with added features. I love that it is so simple and efficient, it makes for enjoyable elaboration. Despite what many people have been saying about it being too lightweight for serious site building, I have found it to go far. I have been using it (+ a bunch of minor modifications to suit my applications) exclusively on all my sites!

I recently added a simple version control in the mysqlquery class. Basically I added a private variable to model.class called _backupTable, which is just the table name plus '_history', YMMV. Then In mysqlquery.class I make sure to describe both tables. In the delete() function, instead of only deleting the row, I first search for it in the backup table, if I find it, I increment the revision number, and then insert the row. I've done the two table solution (history table apart from regular table), but it could be done however you like.

I've also added a whole javascript framework using your html class to call the scripts. That part has been really fun. I don't understand why there are so many comments from people about how to add ajax, and all that jazz. It is not the topic of this article, and if you wanted to add it, you so easily could, given the tools already provided.

I've learned a lot from using what you've provided, and I extend my thanks to you.</description>
		<content:encoded><![CDATA[<p>Anant, awesome stuff. </p>
<p>I have been using your framework for a couple of years now, and I&#8217;ve integrated it well with added features. I love that it is so simple and efficient, it makes for enjoyable elaboration. Despite what many people have been saying about it being too lightweight for serious site building, I have found it to go far. I have been using it (+ a bunch of minor modifications to suit my applications) exclusively on all my sites!</p>
<p>I recently added a simple version control in the mysqlquery class. Basically I added a private variable to model.class called _backupTable, which is just the table name plus &#8216;_history&#8217;, YMMV. Then In mysqlquery.class I make sure to describe both tables. In the delete() function, instead of only deleting the row, I first search for it in the backup table, if I find it, I increment the revision number, and then insert the row. I&#8217;ve done the two table solution (history table apart from regular table), but it could be done however you like.</p>
<p>I&#8217;ve also added a whole javascript framework using your html class to call the scripts. That part has been really fun. I don&#8217;t understand why there are so many comments from people about how to add ajax, and all that jazz. It is not the topic of this article, and if you wanted to add it, you so easily could, given the tools already provided.</p>
<p>I&#8217;ve learned a lot from using what you&#8217;ve provided, and I extend my thanks to you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nik</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-3/#comment-36305</link>
		<dc:creator>nik</dc:creator>
		<pubDate>Wed, 08 Feb 2012 10:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-36305</guid>
		<description>question: it possible to parse from views something to header or footer?    example </description>
		<content:encoded><![CDATA[<p>question: it possible to parse from views something to header or footer?    example</p>
]]></content:encoded>
	</item>
</channel>
</rss>

