<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>What&#039;s UP Next &#187; Zend Framework</title>
	<atom:link href="http://asitkatiyar.wordpress.com/category/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://asitkatiyar.wordpress.com</link>
	<description>Drive your thoughts</description>
	<lastBuildDate>Thu, 26 Nov 2009 04:06:32 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='asitkatiyar.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/1bb06f8838e4d5a8a4d733d5c74a93a3?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>What&#039;s UP Next &#187; Zend Framework</title>
		<link>http://asitkatiyar.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://asitkatiyar.wordpress.com/osd.xml" title="What&#039;s UP Next" />
		<item>
		<title>Zend Framework:: Helper method for creating breadcrumbs</title>
		<link>http://asitkatiyar.wordpress.com/2009/03/24/zend-framework-helper-method-for-creating-breadcrumbs/</link>
		<comments>http://asitkatiyar.wordpress.com/2009/03/24/zend-framework-helper-method-for-creating-breadcrumbs/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 10:33:38 +0000</pubDate>
		<dc:creator>Asit</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://asitkatiyar.wordpress.com/?p=80</guid>
		<description><![CDATA[Here I am going to show how one can create breadcrumbs in the web application based on Zend Framework. This can be achieved by creating a helper method. Before creating helper method, we need to do the following exercise:

Create Zend view object,
Add view script path,
Add the default helper path to the view object,

Now lets start [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asitkatiyar.wordpress.com&blog=250539&post=80&subd=asitkatiyar&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here I am going to show how one can create breadcrumbs in the web application based on Zend Framework. This can be achieved by creating a helper method. Before creating helper method, we need to do the following exercise:</p>
<ul>
<li>Create Zend view object,</li>
<li>Add view script path,</li>
<li>Add the default helper path to the view object,</li>
</ul>
<p>Now lets start step by step:</p>
<p><strong>Creating Zend view object:</strong></p>
<blockquote><p>$view = Zend_View();</p></blockquote>
<p><strong>Adding view script path:</strong></p>
<blockquote><p>$viewPath = &#8220;path/to/viewsDirectory&#8221;;<br />
$view-&gt;addScriptPath($viewPath);</p></blockquote>
<p><strong>Adding the default helper path to the vew object:</strong></p>
<blockquote><p>$helperPath = &#8220;path/to/helperDirectory&#8221;;      Zend_Controller_Action_HelperBroker::getStaticHelper(&#8216;viewRenderer&#8217;)-&gt;setView($view);<br />
$view-&gt;addHelperPath($helperPath, &#8216;Helper_&#8217;);</p></blockquote>
<p>Now creating the class for the breadcrumbs:</p>
<blockquote><p>class Helper_BreadCrumbs {</p>
<p>public function breadCrumb(){<br />
$cFront = Zend_Controller_Front::getInstance();<br />
$module = $cFront-&gt;getRequest()-&gt;getModuleName();<br />
$module = strtolower($module);</p>
<p>$controller = $cFront-&gt;getRequest()-&gt;getControllerName();<br />
$controller = strtolower($controller);</p>
<p>$action = $cFront-&gt;getRequest()-&gt;getActionName();<br />
$action = strtolower($action);</p>
<p>if($module == &#8220;default&#8221; &amp;&amp; $controller == &#8220;index&#8221; &amp;&amp; $action == &#8220;index&#8221;){<br />
return;<br />
}<br />
//Home link<br />
$home = &#8216;&lt;a href=&#8221;/&#8221;&gt;Home&lt;/a&gt;&#8217;;</p>
<p>//start breadcrumbs<br />
$bCrumbs = $home . &#8220;::&#8221;;<br />
if($action == &#8220;index&#8221;){<br />
$bCrumbs .= $controller;<br />
}<br />
else{<br />
$bCrumbs .= &#8220;&lt;a href=&#8217;/$controller&#8217;&gt;$controller&lt;/a&gt;::<br />
&lt;a href=&#8217;/$controller/$action&#8217;&gt;$action&lt;/a&gt;&#8221;;<br />
}</p>
<p>return $bCrumbs;<br />
}<br />
}</p></blockquote>
<p>Hope this article will help the web application users to indicate &#8220;where are you&#8221;.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asitkatiyar.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asitkatiyar.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asitkatiyar.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asitkatiyar.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asitkatiyar.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asitkatiyar.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asitkatiyar.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asitkatiyar.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asitkatiyar.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asitkatiyar.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asitkatiyar.wordpress.com&blog=250539&post=80&subd=asitkatiyar&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://asitkatiyar.wordpress.com/2009/03/24/zend-framework-helper-method-for-creating-breadcrumbs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59f5440eaa4da0039ccd7cf35d943072?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asitkatiyar</media:title>
		</media:content>
	</item>
		<item>
		<title>Zend Framework:: Caching the database query results</title>
		<link>http://asitkatiyar.wordpress.com/2009/03/20/zend-framework-caching-the-database-query-results/</link>
		<comments>http://asitkatiyar.wordpress.com/2009/03/20/zend-framework-caching-the-database-query-results/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 09:52:29 +0000</pubDate>
		<dc:creator>Asit</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://asitkatiyar.wordpress.com/?p=76</guid>
		<description><![CDATA[Caching is basically used to improve the performance of the application. Your application may consists of multiple expensive queries ruining the application performance.  The Zend_Cache component of Zend Framework provides a good feature to improve the page performance by caching the database query results. Here is the sample code :
// Creating the cache options
$frontend = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asitkatiyar.wordpress.com&blog=250539&post=76&subd=asitkatiyar&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Caching is basically used to improve the performance of the application. Your application may consists of multiple expensive queries ruining the application performance.  The Zend_Cache component of Zend Framework provides a good feature to improve the page performance by caching the database query results. Here is the sample code :</p>
<blockquote><p><span style="color:#800080;">// Creating the cache options<br />
$frontend = array(<br />
&#8216;lifetime&#8217; =&gt; 86400, // cache lifetime of 24 hours (time is in seconds)<br />
&#8216;automatic_serialization&#8217; =&gt; true  //default is false<br />
);</span></p>
<p><span style="color:#800080;">$cachedir = /path/to/cacheDirectory;<br />
if(!is_dir($cachedir)){<br />
mkdir($cachedir,0755);<br />
}</span></p>
<p><span style="color:#800080;">$backend = array(&#8216;cache_dir&#8217; =&gt; $cachedir);</span></p>
<p><span style="color:#800080;">// Getting a Zend_Cache_Core object<br />
$zend_cache = Zend_Cache::factory(&#8216;Core&#8217;, &#8216;File&#8217;, $frontend, $backend);</span></p>
<p><span style="color:#800080;">$result = run_query($zend_cache);<br />
print_r($result);</span></p>
<p><span style="color:#800080;">function run_query($cacheObj){<br />
$q = &#8220;Database query&#8221;;<br />
if(!$result = $cacheObj-&gt;cache-&gt;load(&#8220;myresult&#8221;)){<br />
$db = Zend_Db::factory(DB_connection_parameters);<br />
$result = $db-&gt;fetchAll($q);<br />
$cacheObj-&gt;save($result, &#8220;myresult&#8221;);<br />
}<br />
else {<br />
echo &#8220;This result is from cache.&#8221;;<br />
}<br />
return $result;<br />
}</span></p></blockquote>
<p><span style="color:#800000;">Caution: </span>You should give the unique name in the &#8220;load(&#8216;name&#8217;) and save(&#8216;name&#8217;)&#8221; functions.<br />
Otherwise you will get the same result on the pages where the query is intended to produce<br />
different results.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asitkatiyar.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asitkatiyar.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asitkatiyar.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asitkatiyar.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asitkatiyar.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asitkatiyar.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asitkatiyar.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asitkatiyar.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asitkatiyar.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asitkatiyar.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asitkatiyar.wordpress.com&blog=250539&post=76&subd=asitkatiyar&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://asitkatiyar.wordpress.com/2009/03/20/zend-framework-caching-the-database-query-results/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59f5440eaa4da0039ccd7cf35d943072?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asitkatiyar</media:title>
		</media:content>
	</item>
	</channel>
</rss>