<?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: Utilizing the Zend AMF Server Inside a Zend Controller</title>
	<atom:link href="http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/</link>
	<description>Tutorials and Code Snippets</description>
	<lastBuildDate>Mon, 25 Apr 2011 14:58:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: toy</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-1002</link>
		<dc:creator>toy</dc:creator>
		<pubDate>Mon, 25 Apr 2011 14:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-1002</guid>
		<description>could you please post 
articleVO.php

without it - i cant seem to get a complete picture

thanks!</description>
		<content:encoded><![CDATA[<p>could you please post<br />
articleVO.php</p>
<p>without it &#8211; i cant seem to get a complete picture</p>
<p>thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yohan</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-823</link>
		<dc:creator>yohan</dc:creator>
		<pubDate>Sat, 12 Mar 2011 18:39:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-823</guid>
		<description>thanks for the explanation

better use $this-&gt;getResponse()-&gt;appendBody($server-&gt;handle()) than
echo($server-&gt;handle()); at the end of the action.

you can also add extra header with this method</description>
		<content:encoded><![CDATA[<p>thanks for the explanation</p>
<p>better use $this-&gt;getResponse()-&gt;appendBody($server-&gt;handle()) than<br />
echo($server-&gt;handle()); at the end of the action.</p>
<p>you can also add extra header with this method</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Janther</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-539</link>
		<dc:creator>Janther</dc:creator>
		<pubDate>Sat, 06 Nov 2010 22:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-539</guid>
		<description>Hi,
I actually tried this way when i was new to Zend and I would discourage this aproach. It is easy for newcomers but it executes a lot of code you wouldnt want in your messaging gateway like every boostrap file of every module, plugins with predispatch and postdispach options etc... Even Wade Arnold creator of Zend_AMF suggest this .htaccess file.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^/?amf     amf.php            [NC,L]
RewriteRule ^.*$         index.php          [NC,L]

and have in you amf.php file something like

defined(&#039;APPLICATION_PATH&#039;)
    &#124;&#124; define(&#039;APPLICATION_PATH&#039;, realpath(dirname(__FILE__) . &#039;/../application&#039;));

defined(&#039;APPLICATION_ENV&#039;)
    &#124;&#124; define(&#039;APPLICATION_ENV&#039;, (getenv(&#039;APPLICATION_ENV&#039;) ? getenv(&#039;APPLICATION_ENV&#039;) : &#039;production&#039;));

set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . &#039;/../library&#039;),
    get_include_path(),
)));

require_once &#039;Zend/Loader/Autoloader.php&#039;;
$loader = Zend_Loader_Autoloader::getInstance();

and voila, you have the same autoloading and access to any part of your application and the zend framework without the extra execution.

if you need to load the db configuration from the aplication.ini file use something like:

$configuration = new Zend_Config_Ini(APPLICATION_PATH . &#039;/configs/application.ini&#039;,
									 APPLICATION_ENV);
$dbAdapter = Zend_Db::factory($configuration-&gt;resources-&gt;db);
Zend_Db_Table_Abstract::setDefaultAdapter($dbAdapter);

and you are ready to go.

using this aproach i reduced almost a second of innecesary computing that is not used in AMF but would be needed for the html.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I actually tried this way when i was new to Zend and I would discourage this aproach. It is easy for newcomers but it executes a lot of code you wouldnt want in your messaging gateway like every boostrap file of every module, plugins with predispatch and postdispach options etc&#8230; Even Wade Arnold creator of Zend_AMF suggest this .htaccess file.</p>
<p>RewriteEngine On<br />
RewriteCond %{REQUEST_FILENAME} -s [OR]<br />
RewriteCond %{REQUEST_FILENAME} -l [OR]<br />
RewriteCond %{REQUEST_FILENAME} -d<br />
RewriteRule ^.*$ &#8211; [NC,L]<br />
RewriteRule ^/?amf     amf.php            [NC,L]<br />
RewriteRule ^.*$         index.php          [NC,L]</p>
<p>and have in you amf.php file something like</p>
<p>defined(&#8216;APPLICATION_PATH&#8217;)<br />
    || define(&#8216;APPLICATION_PATH&#8217;, realpath(dirname(__FILE__) . &#8216;/../application&#8217;));</p>
<p>defined(&#8216;APPLICATION_ENV&#8217;)<br />
    || define(&#8216;APPLICATION_ENV&#8217;, (getenv(&#8216;APPLICATION_ENV&#8217;) ? getenv(&#8216;APPLICATION_ENV&#8217;) : &#8216;production&#8217;));</p>
<p>set_include_path(implode(PATH_SEPARATOR, array(<br />
    realpath(APPLICATION_PATH . &#8216;/../library&#8217;),<br />
    get_include_path(),<br />
)));</p>
<p>require_once &#8216;Zend/Loader/Autoloader.php&#8217;;<br />
$loader = Zend_Loader_Autoloader::getInstance();</p>
<p>and voila, you have the same autoloading and access to any part of your application and the zend framework without the extra execution.</p>
<p>if you need to load the db configuration from the aplication.ini file use something like:</p>
<p>$configuration = new Zend_Config_Ini(APPLICATION_PATH . &#8216;/configs/application.ini&#8217;,<br />
									 APPLICATION_ENV);<br />
$dbAdapter = Zend_Db::factory($configuration-&gt;resources-&gt;db);<br />
Zend_Db_Table_Abstract::setDefaultAdapter($dbAdapter);</p>
<p>and you are ready to go.</p>
<p>using this aproach i reduced almost a second of innecesary computing that is not used in AMF but would be needed for the html.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oswaldo Milnor</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-442</link>
		<dc:creator>Oswaldo Milnor</dc:creator>
		<pubDate>Fri, 03 Sep 2010 20:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-442</guid>
		<description>Many posts worthwhile reading on here and a lot of great info. If you do by some chance happen to have time, visit mine and peruse my posts and afford me a comment.</description>
		<content:encoded><![CDATA[<p>Many posts worthwhile reading on here and a lot of great info. If you do by some chance happen to have time, visit mine and peruse my posts and afford me a comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marlo Hoefert</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-397</link>
		<dc:creator>Marlo Hoefert</dc:creator>
		<pubDate>Tue, 15 Jun 2010 23:09:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-397</guid>
		<description>nice little blog you have, theme custom? Looks really good</description>
		<content:encoded><![CDATA[<p>nice little blog you have, theme custom? Looks really good</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Kagiri</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-330</link>
		<dc:creator>David Kagiri</dc:creator>
		<pubDate>Thu, 04 Feb 2010 07:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-330</guid>
		<description>Hi.Came across your blog and its really what I have looking for.
Am having issues getting the my Flex app running using this example.

I would greatly appreciate a download load link to the full source and structure.

Cheers.</description>
		<content:encoded><![CDATA[<p>Hi.Came across your blog and its really what I have looking for.<br />
Am having issues getting the my Flex app running using this example.</p>
<p>I would greatly appreciate a download load link to the full source and structure.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Is it even possible to use Zend_AMF with ZF MVC? - Zend Framework Forum</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-327</link>
		<dc:creator>Is it even possible to use Zend_AMF with ZF MVC? - Zend Framework Forum</dc:creator>
		<pubDate>Mon, 25 Jan 2010 13:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-327</guid>
		<description>[...] that explains the process, and file structures for such a setup. The only thing I can find is this: Utilizing the Zend AMF Server Inside a Zend Controller &#124; blog.log2e.com, which is far from a complete explaination.  So my question is, can anyone point me in the [...]</description>
		<content:encoded><![CDATA[<p>[...] that explains the process, and file structures for such a setup. The only thing I can find is this: Utilizing the Zend AMF Server Inside a Zend Controller | blog.log2e.com, which is far from a complete explaination.  So my question is, can anyone point me in the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: przemon</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-316</link>
		<dc:creator>przemon</dc:creator>
		<pubDate>Mon, 16 Nov 2009 12:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-316</guid>
		<description>I had a small problem to run this example but when i disable layout in my gateway controller it works nice. 

public function postDispatch () {
     $this-&gt;_helper-&gt;layout-&gt;disableLayout();
}

when the layout was enabled I received message NetConnection.Call.BadVersion.</description>
		<content:encoded><![CDATA[<p>I had a small problem to run this example but when i disable layout in my gateway controller it works nice. </p>
<p>public function postDispatch () {<br />
     $this-&gt;_helper-&gt;layout-&gt;disableLayout();<br />
}</p>
<p>when the layout was enabled I received message NetConnection.Call.BadVersion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Schmitz</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-301</link>
		<dc:creator>Daniel Schmitz</dc:creator>
		<pubDate>Thu, 23 Jul 2009 11:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-301</guid>
		<description>goliath, nice question! But without responses from Stefan...

Why controller and services ?</description>
		<content:encoded><![CDATA[<p>goliath, nice question! But without responses from Stefan&#8230;</p>
<p>Why controller and services ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vikram</title>
		<link>http://blog.log2e.com/2008/12/14/utilizing-the-zend-amf-server-inside-a-zend-controller/comment-page-1/#comment-299</link>
		<dc:creator>Vikram</dc:creator>
		<pubDate>Wed, 01 Jul 2009 01:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.log2e.com/?p=199#comment-299</guid>
		<description>I was wondering how to use zend_amf with zend_controller and then I found this example of yours. Its very illuminating. Here you have suggested that we can use flex and html views together by using the given method. 

I was wondering what would the strategy be if I wanted to use just the flex views, no html views. In that case, I don&#039;t want to initialize a zend_amf_server inside every controller. How would we proceed then?</description>
		<content:encoded><![CDATA[<p>I was wondering how to use zend_amf with zend_controller and then I found this example of yours. Its very illuminating. Here you have suggested that we can use flex and html views together by using the given method. </p>
<p>I was wondering what would the strategy be if I wanted to use just the flex views, no html views. In that case, I don&#8217;t want to initialize a zend_amf_server inside every controller. How would we proceed then?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

