<?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, 11 Mar 2010 10:58:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sam</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-2/#comment-4783</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Sun, 21 Feb 2010 23:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-4783</guid>
		<description>Hey Anant, 
i am using WAMP server 2, php3.0

i am getting this error on opening the site:

Notice: Undefined index: url in D:\wamp\www\todo-2\public\index.php on line 6

thats this line:       $url = $_GET['url'];

Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\todo-2\library\shared.php on line 148

Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\todo-2\library\shared.php on line 149



the url variable doesn't exist.
i get the same error in the part-1 also.
also i get the list of folders &amp; not redirected to the index.php in part-1.

PLZ tell me how do i proceed.</description>
		<content:encoded><![CDATA[<p>Hey Anant,<br />
i am using WAMP server 2, php3.0</p>
<p>i am getting this error on opening the site:</p>
<p>Notice: Undefined index: url in D:\wamp\www\todo-2\public\index.php on line 6</p>
<p>thats this line:       $url = $_GET['url'];</p>
<p>Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\todo-2\library\shared.php on line 148</p>
<p>Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\todo-2\library\shared.php on line 149</p>
<p>the url variable doesn&#8217;t exist.<br />
i get the same error in the part-1 also.<br />
also i get the list of folders &amp; not redirected to the index.php in part-1.</p>
<p>PLZ tell me how do i proceed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikolay Traykov</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-2/#comment-4650</link>
		<dc:creator>Nikolay Traykov</dc:creator>
		<pubDate>Fri, 12 Feb 2010 00:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-4650</guid>
		<description>Hi Anant,

Thank you for this wonderful tutorial. I complitely agree with you - there are many great frameworks, but if you want to learn how to make good oop design and to see what's inside this frameworks, you have to start working hard. That's why I've started working on one framework and saw your tutorial :). 
I have two questions to you and to everyone, who wants to answer: 
   1) I've created one front controller for my site, which acts as an entry point to it. The problem is that I have to put ajax, but I don't think, it would be good practise to invoke other php scipts as an entry point to my site, because of security reasons. Do you agree with me? Should I use the front controller for ajax too and after that create something like strategy pattern, which decides, whether it should invoke either classes which serves ajax requests or other classes, which serves to the non-ajax requests?
  2) I think to put any configurations in conf directory in xml files (or .properties files). Would it be safe for the website, because xml can be opened through browser? I will write a redirect to index.php in htaccess, but anyway I don't know that this is enough.

Thank you and good luck :)

Nikolay</description>
		<content:encoded><![CDATA[<p>Hi Anant,</p>
<p>Thank you for this wonderful tutorial. I complitely agree with you - there are many great frameworks, but if you want to learn how to make good oop design and to see what&#8217;s inside this frameworks, you have to start working hard. That&#8217;s why I&#8217;ve started working on one framework and saw your tutorial :).<br />
I have two questions to you and to everyone, who wants to answer:<br />
   1) I&#8217;ve created one front controller for my site, which acts as an entry point to it. The problem is that I have to put ajax, but I don&#8217;t think, it would be good practise to invoke other php scipts as an entry point to my site, because of security reasons. Do you agree with me? Should I use the front controller for ajax too and after that create something like strategy pattern, which decides, whether it should invoke either classes which serves ajax requests or other classes, which serves to the non-ajax requests?<br />
  2) I think to put any configurations in conf directory in xml files (or .properties files). Would it be safe for the website, because xml can be opened through browser? I will write a redirect to index.php in htaccess, but anyway I don&#8217;t know that this is enough.</p>
<p>Thank you and good luck <img src='http://anantgarg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Nikolay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lubaka</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-2/#comment-4571</link>
		<dc:creator>Lubaka</dc:creator>
		<pubDate>Fri, 05 Feb 2010 11:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-4571</guid>
		<description>Very good tutorial. I have one question but first let explain what i have:
i have old working website his articles have very good postions on google and their links are file.php?id=123(id of article) now i want to make new website using this framework but i want to leaves those urls like they are and how to i redirect http://mysite.com/article/view/2/articlename to http://mysite.com/file.php?id=2 in this framework ? I want only this urls to be redirected. 
Again this is very good tutorial thank you.</description>
		<content:encoded><![CDATA[<p>Very good tutorial. I have one question but first let explain what i have:<br />
i have old working website his articles have very good postions on google and their links are file.php?id=123(id of article) now i want to make new website using this framework but i want to leaves those urls like they are and how to i redirect <a href="http://mysite.com/article/view/2/articlename" rel="nofollow">http://mysite.com/article/view/2/articlename</a> to <a href="http://mysite.com/file.php?id=2" rel="nofollow">http://mysite.com/file.php?id=2</a> in this framework ? I want only this urls to be redirected.<br />
Again this is very good tutorial thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mehedi</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-2/#comment-4452</link>
		<dc:creator>Mehedi</dc:creator>
		<pubDate>Mon, 25 Jan 2010 06:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-4452</guid>
		<description>WOW!!! Great Great Great Tutorial. Thanks for sharing..</description>
		<content:encoded><![CDATA[<p>WOW!!! Great Great Great Tutorial. Thanks for sharing..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RDF</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-2/#comment-3662</link>
		<dc:creator>RDF</dc:creator>
		<pubDate>Fri, 11 Dec 2009 11:06:48 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-3662</guid>
		<description>It works!

The problem with sessions was mine. I didn't remember to call session_start() in ALL functions that need access to $_SESSION.

Thanks for your patience Anant.</description>
		<content:encoded><![CDATA[<p>It works!</p>
<p>The problem with sessions was mine. I didn&#8217;t remember to call session_start() in ALL functions that need access to $_SESSION.</p>
<p>Thanks for your patience Anant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RDF</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-2/#comment-3620</link>
		<dc:creator>RDF</dc:creator>
		<pubDate>Wed, 09 Dec 2009 14:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-3620</guid>
		<description>Hi Anant,

I have solved the problem of sessions between the controller and its views, but ... I'm having a similar problem with sessions between two different controllers.
In the first controller I start the sesion with session_start() and define a session variable as $_SESSION['isAdmin'].
This session variable is not visible by another controller (I can't access to $_SESSION['isAdmin'] because $_SESSION is not defined). Any suggestion?</description>
		<content:encoded><![CDATA[<p>Hi Anant,</p>
<p>I have solved the problem of sessions between the controller and its views, but &#8230; I&#8217;m having a similar problem with sessions between two different controllers.<br />
In the first controller I start the sesion with session_start() and define a session variable as $_SESSION['isAdmin'].<br />
This session variable is not visible by another controller (I can&#8217;t access to $_SESSION['isAdmin'] because $_SESSION is not defined). Any suggestion?</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-2/#comment-3615</link>
		<dc:creator>Anant Garg</dc:creator>
		<pubDate>Wed, 09 Dec 2009 11:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-3615</guid>
		<description>@RDF you will have to set it in the controller. Say you want to access $_SESSION['id'], then in templates

$this-&gt;set('id',$_SESSION['id']);</description>
		<content:encoded><![CDATA[<p>@RDF you will have to set it in the controller. Say you want to access $_SESSION['id'], then in templates</p>
<p>$this->set(&#8217;id&#8217;,$_SESSION['id']);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RDF</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-2/#comment-3614</link>
		<dc:creator>RDF</dc:creator>
		<pubDate>Wed, 09 Dec 2009 11:45:07 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-3614</guid>
		<description>Hi Anant,

I have coded an small web application with this framework, and after this probe I have an important (for me) question:

How can I manage sessions? I have tried to manage it via $_SESSION, but It isn't visble in views (am I doing something wrong?).
after the $_SESSION probe, I wrote a session class (taking the cache class as example),  but I have had errors too.

Could you write a simple session class? or could you explain how to access &amp;_SESSION from views?

Thanks a lot for your effort!</description>
		<content:encoded><![CDATA[<p>Hi Anant,</p>
<p>I have coded an small web application with this framework, and after this probe I have an important (for me) question:</p>
<p>How can I manage sessions? I have tried to manage it via $_SESSION, but It isn&#8217;t visble in views (am I doing something wrong?).<br />
after the $_SESSION probe, I wrote a session class (taking the cache class as example),  but I have had errors too.</p>
<p>Could you write a simple session class? or could you explain how to access &amp;_SESSION from views?</p>
<p>Thanks a lot for your effort!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-1/#comment-3595</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Tue, 08 Dec 2009 12:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-3595</guid>
		<description>Hi Anant,
Firstly great tutorial.  It has taught me alot about php, especially about OOP practices.
I am having trouble running the second zip file though, I dont know if I did something wrong but the first tutorial I follwed along copying in code as I went, but this one as there is only a zip I dl'd it and I get:
"The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."
Is this a commen problem, I am running ff 3.0.8 on xp pro, i have tried I.E and Chrome and they both fail, I am running the script on WAMP version 2.0.
Thanks for the effort in putting this together, its a great resource.
Regards
Luke</description>
		<content:encoded><![CDATA[<p>Hi Anant,<br />
Firstly great tutorial.  It has taught me alot about php, especially about OOP practices.<br />
I am having trouble running the second zip file though, I dont know if I did something wrong but the first tutorial I follwed along copying in code as I went, but this one as there is only a zip I dl&#8217;d it and I get:<br />
&#8220;The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.&#8221;<br />
Is this a commen problem, I am running ff 3.0.8 on xp pro, i have tried I.E and Chrome and they both fail, I am running the script on WAMP version 2.0.<br />
Thanks for the effort in putting this together, its a great resource.<br />
Regards<br />
Luke</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fukyo</title>
		<link>http://anantgarg.com/2009/03/30/write-your-own-php-mvc-framework-part-2/comment-page-1/#comment-3379</link>
		<dc:creator>Fukyo</dc:creator>
		<pubDate>Mon, 30 Nov 2009 14:22:33 +0000</pubDate>
		<guid isPermaLink="false">http://anantgarg.com/?p=200#comment-3379</guid>
		<description>Thanks for your tutorial. It's very useful to me.
I'm finish tutorial 1 but I have problem with tutorial 2.
When I access to http://localhost/framework2 i see this message.

Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
    Please contact the website owners to inform them of this problem

Would you like to tell me how to fix this problem.
Thanks you very much.</description>
		<content:encoded><![CDATA[<p>Thanks for your tutorial. It&#8217;s very useful to me.<br />
I&#8217;m finish tutorial 1 but I have problem with tutorial 2.<br />
When I access to <a href="http://localhost/framework2" rel="nofollow">http://localhost/framework2</a> i see this message.</p>
<p>Content Encoding Error<br />
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.<br />
    Please contact the website owners to inform them of this problem</p>
<p>Would you like to tell me how to fix this problem.<br />
Thanks you very much.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
