<?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: Returning JSON in a Zend Controller&#8217;s Action</title>
	<atom:link href="/2010/08/13/returning-json-in-a-zend-controllers-action/feed/" rel="self" type="application/rss+xml" />
	<link>/2010/08/13/returning-json-in-a-zend-controllers-action/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Christof Coetzee</title>
		<link>/2010/08/13/returning-json-in-a-zend-controllers-action/comment-page-1/#comment-14313</link>
		<dc:creator><![CDATA[Christof Coetzee]]></dc:creator>
		<pubDate>Fri, 20 May 2011 11:52:13 +0000</pubDate>
		<guid isPermaLink="false">/?p=1905#comment-14313</guid>
		<description><![CDATA[Its not always what or how we prefer doing things, most of the time one should stick to the official methods/ways of doing stuff.

I think this is the significant different between Zend Framework and other frameworks, ZF enforces good coding practices.

If you want to &quot;roll your own&quot; in a variety of ways then rather use other frameworks like Codeigniter, Yii etc.

Although ZF can be extended to suit your needs 100%, a solid convention for doing this also exist - with ZF is hardly ever a case of &quot;where the hell do I find this method&quot; or &quot;Why are these classes but these ones are global functions&quot;...like in Codeigniter etc.]]></description>
		<content:encoded><![CDATA[<p>Its not always what or how we prefer doing things, most of the time one should stick to the official methods/ways of doing stuff.</p>
<p>I think this is the significant different between Zend Framework and other frameworks, ZF enforces good coding practices.</p>
<p>If you want to &#8220;roll your own&#8221; in a variety of ways then rather use other frameworks like Codeigniter, Yii etc.</p>
<p>Although ZF can be extended to suit your needs 100%, a solid convention for doing this also exist &#8211; with ZF is hardly ever a case of &#8220;where the hell do I find this method&#8221; or &#8220;Why are these classes but these ones are global functions&#8221;&#8230;like in Codeigniter etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHPGangsta</title>
		<link>/2010/08/13/returning-json-in-a-zend-controllers-action/comment-page-1/#comment-13332</link>
		<dc:creator><![CDATA[PHPGangsta]]></dc:creator>
		<pubDate>Wed, 18 Aug 2010 06:49:34 +0000</pubDate>
		<guid isPermaLink="false">/?p=1905#comment-13332</guid>
		<description><![CDATA[Please don&#039;t use the third method (exit), because then existing postDispatch methods or -plugins are not executed!

The second solution or ContextSwitch/AjaxSwitch is the best choice.]]></description>
		<content:encoded><![CDATA[<p>Please don&#8217;t use the third method (exit), because then existing postDispatch methods or -plugins are not executed!</p>
<p>The second solution or ContextSwitch/AjaxSwitch is the best choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis Becker</title>
		<link>/2010/08/13/returning-json-in-a-zend-controllers-action/comment-page-1/#comment-13329</link>
		<dc:creator><![CDATA[Dennis Becker]]></dc:creator>
		<pubDate>Mon, 16 Aug 2010 06:31:37 +0000</pubDate>
		<guid isPermaLink="false">/?p=1905#comment-13329</guid>
		<description><![CDATA[Just use $this-&#062;getHelper(&#039;json&#039;)-&#062;senJson($data) and all the headers will be correct - I dislike the &#039;direct&#039; calls in those action helpers.]]></description>
		<content:encoded><![CDATA[<p>Just use $this-&gt;getHelper(&#8216;json&#8217;)-&gt;senJson($data) and all the headers will be correct &#8211; I dislike the &#8216;direct&#8217; calls in those action helpers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcel Anacker</title>
		<link>/2010/08/13/returning-json-in-a-zend-controllers-action/comment-page-1/#comment-13326</link>
		<dc:creator><![CDATA[Marcel Anacker]]></dc:creator>
		<pubDate>Sat, 14 Aug 2010 14:49:03 +0000</pubDate>
		<guid isPermaLink="false">/?p=1905#comment-13326</guid>
		<description><![CDATA[I prefer the json action helper:
$this-&#062;_helper-&#062;json($data);
...and you&#039;re done.]]></description>
		<content:encoded><![CDATA[<p>I prefer the json action helper:<br />
$this-&gt;_helper-&gt;json($data);<br />
&#8230;and you&#8217;re done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Buenosvinos</title>
		<link>/2010/08/13/returning-json-in-a-zend-controllers-action/comment-page-1/#comment-13323</link>
		<dc:creator><![CDATA[Carlos Buenosvinos]]></dc:creator>
		<pubDate>Fri, 13 Aug 2010 13:44:02 +0000</pubDate>
		<guid isPermaLink="false">/?p=1905#comment-13323</guid>
		<description><![CDATA[Please, consider the most elegant one (better than these ones): ContextSwitch or AjaxContext

The ContextSwitch action helper is intended for facilitating returning different response formats on request. The AjaxContext helper is a specialized version of ContextSwitch that facilitates returning responses to XmlHttpRequests. 
 
http://framework.zend.com/manual/en/zend.controller.actionhelpers.html]]></description>
		<content:encoded><![CDATA[<p>Please, consider the most elegant one (better than these ones): ContextSwitch or AjaxContext</p>
<p>The ContextSwitch action helper is intended for facilitating returning different response formats on request. The AjaxContext helper is a specialized version of ContextSwitch that facilitates returning responses to XmlHttpRequests. </p>
<p><a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html" rel="nofollow">http://framework.zend.com/manual/en/zend.controller.actionhelpers.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
