<?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/"
	>

<channel>
	<title>Webmaster Bulletin &#187; zend framework</title>
	<atom:link href="http://www.webmasterbulletin.net/tag/zend-framework/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webmasterbulletin.net</link>
	<description>Rambling around the web publishing industry</description>
	<lastBuildDate>Wed, 21 Jul 2010 09:48:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SEO Toaster CMS</title>
		<link>http://www.webmasterbulletin.net/2010/05/seo-toaster-cms/1204</link>
		<comments>http://www.webmasterbulletin.net/2010/05/seo-toaster-cms/1204#comments</comments>
		<pubDate>Mon, 24 May 2010 19:50:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=1204</guid>
		<description><![CDATA[SEO Toaster was introduced last week and it comes with a set of features that puts that solution right in place for competing with other famous systems. It&#8217;s also nice to note that the technology behind it is the Zend Framework.

Inline editing : all administration is performed within the actual site, the admin area does [...]]]></description>
			<content:encoded><![CDATA[<p>SEO Toaster was introduced last week and it comes with a set of features that puts that solution right in place for competing with other famous systems. It&#8217;s also nice to note that the technology behind it is the Zend Framework.</p>
<p style="text-align: center;"><a href="http://www.webmasterbulletin.net/wp-content/uploads/2010/05/add-edit-page.png" rel="lightbox[1204]"><img class="size-medium wp-image-1205 aligncenter" title="add-edit-page" src="http://www.webmasterbulletin.net/wp-content/uploads/2010/05/add-edit-page-500x368.png" alt="add-edit-page" width="500" height="368" /></a></p>
<p><strong>Inline editing </strong>: all administration is performed within the actual site, the admin area does not exist. This is a particularly challenging choice of development but tends to please users when correctly designed. Visually the green &amp; blue theme for the sidebar admin is not the best but is functionnal.</p>
<p>I particularly like the page creation form (image above) which allows the content manager to specify all page information, including SEO related, page title and header image, in one shot.</p>
<p><strong>File Management </strong>uses the famous swfupload which is now a minimum requirement for CMS practise. Images are automatically resized and the upload process allows uploading and editing within the same screen which is a recipe for content efficiency. Jquery lightbox is provided in the distribution and resized images link to the original image automatically.</p>
<p><strong>Form maker</strong> is integrated in the distribution too but only with the email sender feature, no database integration yet</p>
<p><a href="http://www.seotoaster.com/">http://www.seotoaster.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2010/05/seo-toaster-cms/1204/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Zend_Form to create SQL table</title>
		<link>http://www.webmasterbulletin.net/2009/10/use-zend_form-to-create-sql-table/1020</link>
		<comments>http://www.webmasterbulletin.net/2009/10/use-zend_form-to-create-sql-table/1020#comments</comments>
		<pubDate>Mon, 19 Oct 2009 08:30:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=1020</guid>
		<description><![CDATA[A quick code snippet that uses a Zend form (in the case below, with subforms) to generate a SQL table create statement. Useful for scaffolding : create your form with Zend Form Elements then the SQL table automatically.



&#60;textarea rows=&#34;50&#34; cols=&#34;80&#34;&#62;


create table yrbeaute &#40;`id` int&#40;10&#41; NOT NULL AUTO_INCREMENT,&#60;?


foreach&#40;$this-&#62;form as $k=&#62;$subform&#41;


&#160; &#160; &#123;


&#160; &#160; &#160; &#160; foreach&#40;$subform [...]]]></description>
			<content:encoded><![CDATA[<p>A quick code snippet that uses a Zend form (in the case below, with subforms) to generate a SQL table create statement. Useful for scaffolding : create your form with Zend Form Elements then the SQL table automatically.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&lt;textarea rows=<span class="st0">&quot;50&quot;</span> cols=<span class="st0">&quot;80&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">create table yrbeaute <span class="br0">&#40;</span>`id` int<span class="br0">&#40;</span><span class="nu0">10</span><span class="br0">&#41;</span> NOT <span class="kw2">NULL</span> AUTO_INCREMENT,<span class="kw2">&lt;?</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">form</span> <span class="kw1">as</span> <span class="re0">$k</span>=&gt;<span class="re0">$subform</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$subform</span> <span class="kw1">as</span> <span class="re0">$k</span>=&gt;<span class="re0">$element</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#123;</span> <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/get_class"><span class="kw3">get_class</span></a><span class="br0">&#40;</span><span class="re0">$element</span><span class="br0">&#41;</span>!=<span class="st0">&quot;Zend_Form_DisplayGroup&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$element</span>-&gt;<span class="me1">getType</span><span class="br0">&#40;</span><span class="br0">&#41;</span>==<span class="st0">&quot;Zend_Form_Element_Select&quot;</span><span class="br0">&#41;</span> <span class="re0">$type</span>=<span class="st0">&quot;varchar(50)&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$element</span>-&gt;<span class="me1">getType</span><span class="br0">&#40;</span><span class="br0">&#41;</span>==<span class="st0">&quot;Zend_Form_Element_Radio&quot;</span><span class="br0">&#41;</span> <span class="re0">$type</span>=<span class="st0">&quot;varchar(50)&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$element</span>-&gt;<span class="me1">getType</span><span class="br0">&#40;</span><span class="br0">&#41;</span>==<span class="st0">&quot;Zend_Form_Element_Text&quot;</span><span class="br0">&#41;</span> <span class="re0">$type</span>=<span class="st0">&quot;varchar(255)&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$element</span>-&gt;<span class="me1">getType</span><span class="br0">&#40;</span><span class="br0">&#41;</span>==<span class="st0">&quot;Zend_Form_Element_Textarea&quot;</span><span class="br0">&#41;</span> <span class="re0">$type</span>=<span class="st0">&quot;text&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$element</span>-&gt;<span class="me1">getType</span><span class="br0">&#40;</span><span class="br0">&#41;</span>==<span class="st0">&quot;Zend_Form_Element_MultiCheckbox&quot;</span><span class="br0">&#41;</span> <span class="re0">$type</span>=<span class="st0">&quot;varchar(255)&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw2">&lt;?</span>=<span class="re0">$element</span>-&gt;<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw2">?&gt;</span> <span class="kw2">&lt;?</span>=<span class="re0">$type</span>?&gt;,</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">&lt;?</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$element</span> <span class="kw1">as</span> <span class="re0">$k</span>=&gt;<span class="re0">$elem</span> <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&gt;&lt;?=<span class="re0">$elem</span>-&gt;<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw2">?&gt;</span> varchar<span class="br0">&#40;</span><span class="nu0">50</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">&lt;?</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#125;</span> </div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span> &nbsp;step int<span class="br0">&#40;</span><span class="nu0">5</span><span class="br0">&#41;</span>, `created_at` timestamp NOT <span class="kw2">NULL</span> <span class="kw2">DEFAULT</span> CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,</div>
</li>
<li class="li2">
<div class="de2">&nbsp; PRIMARY <a href="http://www.php.net/key"><span class="kw3">KEY</span></a> <span class="br0">&#40;</span>`id`<span class="br0">&#41;</span><span class="br0">&#41;</span>&lt;/textarea&gt;</div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/10/use-zend_form-to-create-sql-table/1020/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Opensource applications built around Zend Framework</title>
		<link>http://www.webmasterbulletin.net/2009/09/5-opensource-applications-built-around-zend-framework/1005</link>
		<comments>http://www.webmasterbulletin.net/2009/09/5-opensource-applications-built-around-zend-framework/1005#comments</comments>
		<pubDate>Thu, 24 Sep 2009 14:43:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[free applications]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=1005</guid>
		<description><![CDATA[a lot of expereiences are currently being performed on the Zend Framework platform, but a few are really usable in production environement.

Magento is obviously the best example of how Zend Framework can bring power and ease  of development via a PHP enabled template system. The most popular opensource ecommerce application has been downloaded more that [...]]]></description>
			<content:encoded><![CDATA[<p>a lot of expereiences are currently being performed on the Zend Framework platform, but a few are really usable in production environement.</p>
<ul>
<li>Magento is obviously the best example of how Zend Framework can bring power and ease  of development via a PHP enabled template system. The most popular opensource ecommerce application has been downloaded more that a million times and is still considered  a revolutionnary project after 2 years of production.</li>
<li><a href="http://www.webmasterbulletin.net/2008/07/digitalus-cms-for-zend-framework-and-jquery-addicts/121">Digitalus CMS</a> is a Zend framework based Content Management System. We covered it a while ago</li>
<li><a href="http://www.joobsbox.com" target="_blank">Joobsbox </a>is a job board application developped on top of Zend Framewor, not quite stable yet (nice implementation of hirearchical tree does not handle sub pages very well yet, worth the try)</li>
<li><a href="http://dodo.threadaffinity.com/" target="_blank">Dodo </a>is a perfect tutorial for starting with the Zend_Application environment, and it is also a good tasks application</li>
<li>EasyPhpApp is a CRUD generator that can save you time when working with a lot of database tables (see our previous article on <a href="http://www.webmasterbulletin.net/2008/10/generate-code-for-zend-framework/352" target="_blank">Zend framework scaffolding</a>)</li>
</ul>
<p>and also you can try, tine 2.0, a powerful groupware application that uses extjs beautifully (covered a while ago too <a href="http://www.webmasterbulletin.net/2008/09/web-developers-have-a-look-at-tine-20/247">on this blog</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/09/5-opensource-applications-built-around-zend-framework/1005/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cahaya, a cms for zend framework</title>
		<link>http://www.webmasterbulletin.net/2009/09/cahaya-a-cms-for-zend-framework/999</link>
		<comments>http://www.webmasterbulletin.net/2009/09/cahaya-a-cms-for-zend-framework/999#comments</comments>
		<pubDate>Tue, 22 Sep 2009 19:48:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=999</guid>
		<description><![CDATA[
At first sight, nothing really exciting comes from the newly released Cahaya CMS, built entirely around Zend Framework CMS : in fact the toolbar that switches the site to edit mode is an interesting implentation of  insite edition, that allows page building from selected and editable blocks, as illustrated below. The whole web content management [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webmasterbulletin.net/wp-content/uploads/2009/09/Zend-cms-cayaha.jpg" rel="lightbox[999]"><img class="aligncenter size-full wp-image-1000" title="Zend-cms-cayaha" src="http://www.webmasterbulletin.net/wp-content/uploads/2009/09/Zend-cms-cayaha.jpg" alt="Zend-cms-cayaha" width="490" height="313" /></a></p>
<p>At first sight, nothing really exciting comes from the newly released Cahaya CMS, built entirely around Zend Framework CMS : in fact the toolbar that switches the site to edit mode is an interesting implentation of  insite edition, that allows page building from selected and editable blocks, as illustrated below. The whole web content management interface is built with ext js widgets including drag and drop, and this looks promising, though apparently  quite complex at this early stage. I miss the hierarchical tree for page navigation in the admin, but let&#8217;s hope it&#8217;s coming.  go to <a href="http://cahaya-project.org/">http://cahaya-project.org/</a> for more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/09/cahaya-a-cms-for-zend-framework/999/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generic Data save with Zend Framework</title>
		<link>http://www.webmasterbulletin.net/2009/01/generic-data-save-with-zend-framework/583</link>
		<comments>http://www.webmasterbulletin.net/2009/01/generic-data-save-with-zend-framework/583#comments</comments>
		<pubDate>Sun, 04 Jan 2009 13:32:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=583</guid>
		<description><![CDATA[This technical article hilights one the famous ideal goal we all want to achieve : scaffolding, CRUD, BREAD, call it what you want, all we want is to get rid of repetitive sql query writing.  Zend framework provides powerful data abstraction  and here are a few tips to use Zend_DB_Table to its best. Of course [...]]]></description>
			<content:encoded><![CDATA[<p>This technical article hilights one the famous ideal goal we all want to achieve : scaffolding, CRUD, BREAD, call it what you want, all we want is to get rid of repetitive sql query writing.  Zend framework provides powerful data abstraction  and here are a few tips to use <a href="http://framework.zend.com/manual/en/zend.db.html" target="_blank">Zend_DB_Table</a> to its best. Of course this article assumes you have an idea of MVC development with Zend Framework.</p>
<p><strong>Why are we doing this ? </strong>in the course of writing ajax actions, we needed our controller to react to any POST provided by specific forms : whatever the fields in the form, we want them to be saved to our table. Code below is a specific implementation of a controller that responds to specific ajax queries. Please bear in mind that it is only provided as an example of generic query action. Other portions of code are not optimal, such as viewless actions in the renderAjax method, not the best.</p>
<p>[update 20090428] Alternative : <a href="http://www.zfsnippets.com/snippets/view/id/38"> Smart save on Zend_Db_Table objects from zfsnippets</a></p>
<p><strong>Controller Implementation</strong></p>
<p>Our controller is a simple Zend_Controller_Action. We load the database model at init time, and specify the primary key  (node parameter) in a class variable. Note that our data model is also stored in a class variable.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">class</span> UserController <span class="kw2">extends</span> Zend_Controller_Action</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">function</span> init<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$this</span>-&gt;<span class="me1">session</span> = <span class="kw2">new</span> Zend_Session_Namespace<span class="br0">&#40;</span><span class="st0">&#8216;User&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="co1">// &nbsp;$this-&gt;view-&gt;translate = Zend_Registry::get(&#8217;Zend_Translate&#8217;);</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span> <span class="st0">&#8216;models/Users.php&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$this</span>-&gt;<span class="me1">data</span>=<span class="kw2">new</span> Users<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$this</span>-&gt;<span class="me1">node</span> = <span class="re0">$this</span>-&gt;<span class="me1">getRequest</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getParam</span><span class="br0">&#40;</span>node<span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WXC_Log::<a href="http://www.php.net/log"><span class="kw3">log</span></a><span class="br0">&#40;</span><span class="st0">&quot;init node : &quot;</span> . <span class="re0">$this</span>-&gt;<span class="me1">node</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p><strong>Quick look at the model</strong></p>
<p>at this stage I specify on particular function I like to implement in Zend Framework Models : the primary key ! Other functions of the model could include add, delete and update : we&#8217;ll see below that our generic data admin prefers to do the job in the controller.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">class</span> Users <span class="kw2">extends</span> Zend_Db_Table_Abstract</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; protected <span class="re0">$_name</span> = <span class="st0">&#8216;users&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">public</span> <span class="kw2">function</span> primaryKey<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$info</span> = <span class="re0">$this</span>-&gt;<span class="me1">info</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$info</span><span class="br0">&#91;</span>primary<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p><strong>Back to the crontroller :</strong> the renderAjax method is a quick one that stops the view from being rendered. If you are a specialist of Zend Framework you will notice that this can be better performed with the  <a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html">contextSwitch </a> action helper. Use the code below only for testing, for production you&#8217;d rather spend a few minutes learning about helpers !</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">private</span> <span class="kw2">function</span> renderAjax<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$this</span>-&gt;_helper-&gt;<span class="me1">layout</span>-&gt;<span class="me1">disableLayout</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$this</span>-&gt;_helper-&gt;<span class="me1">viewRenderer</span>-&gt;<span class="me1">setNoRender</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p><strong>Action !</strong></p>
<p>Listing records is the first thing you want to look for when working at data scaffolding. the code below reads metadata from the table, lists all columns from your table, fetches data and returns them as JSON (ready for extjs grid display, by the way).</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"> <span class="kw2">public</span> <span class="kw2">function</span> listAction<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$this</span>-&gt;<span class="me1">renderAjax</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw2">null</span> === <span class="re0">$select</span><span class="br0">&#41;</span> &nbsp; &nbsp;<span class="re0">$select</span> = <span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">select</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="re0">$thRowSet</span> = <span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">fetchAll</span><span class="br0">&#40;</span> <span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">select</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$nodes</span>=<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$arrMeta</span>=<span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">info</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$arrCols</span>=<span class="re0">$arrMeta</span><span class="br0">&#91;</span>cols<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$thRowSet</span> <span class="kw1">as</span> <span class="re0">$row</span> <span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$arr_node</span>=<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">foreach</span> <span class="br0">&#40;</span><span class="re0">$arrCols</span> <span class="kw1">as</span> &nbsp;<span class="re0">$v</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$arr_node</span><span class="br0">&#91;</span><span class="re0">$v</span><span class="br0">&#93;</span>=<span class="re0">$row</span>-&gt;<span class="re0">$v</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$nodes</span><span class="br0">&#91;</span><span class="br0">&#93;</span>=<span class="re0">$arr_node</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> Zend_Json::<span class="me2">encode</span><span class="br0">&#40;</span> <span class="re0">$nodes</span> <span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>The next step would be to add records : we have not worked on this yet so you&#8217;ll want to try this with tables that have  a few records in them. The method below works with two types of data sets.</p>
<ol>
<li>Multiple column form submit :this would be the classical response to a from submission, where each field bears the NAME of the database field, and obvisouly the value is the data. Such forms are transmitted via FORM array with key / value pairs. We read the POST (getRequest-&gt;getParam) that match metadata built from the database table column array. We then provide a clean arrData array of new data for the update() method of our <a href="http://framework.zend.com/manual/en/zend.db.table.html#zend.db.table.update">Zend_Db_Table</a> instanciation. This method takes two arguments: the first is the associative array mapping columns to change to new values to assign to these columns. The second is the where clause that we built from the primary key</li>
<li>Single column  submit : the technique is useful when working with extjs in place editing, where one piece of code can edit multiple fields. The field variable contains the database column name and the value is the data. We add a check that matches the field against database table column names</li>
</ol>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">function</span> saveAction<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$this</span>-&gt;<span class="me1">renderAjax</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$id</span>= <span class="re0">$this</span>-&gt;<span class="me1">node</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;<span class="re0">$key</span> = <span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">primaryKey</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$strWhere</span> = <span class="re0">$key</span>. <span class="st0">&#8216;=&#8217;</span> &nbsp;. <span class="re0">$id</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="re0">$arrMeta</span>=<span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">info</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="co1">// all columns submit</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$arrCols</span>=<span class="re0">$arrMeta</span><span class="br0">&#91;</span>cols<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$arrData</span>=<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/reset"><span class="kw3">reset</span></a><span class="br0">&#40;</span><span class="re0">$arrCols</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">while</span> <span class="br0">&#40;</span><a href="http://www.php.net/list"><span class="kw3">list</span></a><span class="br0">&#40;</span><span class="re0">$k</span>,<span class="re0">$v</span><span class="br0">&#41;</span>=<a href="http://www.php.net/each"><span class="kw3">each</span></a><span class="br0">&#40;</span><span class="re0">$arrCols</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$v</span>!=<span class="st0">&quot;parent_id&quot;</span> &nbsp;&amp;amp;&amp;amp; <span class="re0">$v</span>!= <span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">primaryKey</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;amp;&amp;amp; <a href="http://www.php.net/array_key_exists"><span class="kw3">array_key_exists</span></a><span class="br0">&#40;</span><span class="re0">$v</span>, <span class="re0">$this</span>-&gt;<span class="me1">getRequest</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getParams</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$arrData</span><span class="br0">&#91;</span><span class="re0">$v</span><span class="br0">&#93;</span>=<span class="re0">$this</span>-&gt;<span class="me1">getRequest</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getParam</span><span class="br0">&#40;</span><span class="re0">$v</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//single column submit via field/ value</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">getRequest</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getParam</span><span class="br0">&#40;</span><span class="st0">&#8216;field&#8217;</span><span class="br0">&#41;</span>!=<span class="st0">&quot;&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span><span class="re0">$field</span> = <span class="re0">$this</span>-&gt;<span class="me1">getRequest</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getParam</span><span class="br0">&#40;</span><span class="st0">&#8216;field&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$value</span>= <span class="re0">$this</span>-&gt;<span class="me1">getRequest</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getParam</span><span class="br0">&#40;</span><span class="st0">&#8216;value&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$arrData</span><span class="br0">&#91;</span><span class="re0">$field</span><span class="br0">&#93;</span> =<span class="re0">$value</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/is_array"><span class="kw3">is_array</span></a><span class="br0">&#40;</span><span class="re0">$arrData</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<span class="br0">&#123;</span> &nbsp; &nbsp; &nbsp;<span class="re0">$this</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">update</span><span class="br0">&#40;</span><span class="re0">$arrData</span>,<span class="re0">$strWhere</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="nu0">1</span>;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch<span class="br0">&#40;</span>Zend_Exception <span class="re0">$e</span><span class="br0">&#41;</span><span class="br0">&#123;</span> &nbsp;<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="nu0">0</span>;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">else</span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="nu0">0</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>A good start for extjs development : Hope this is useful for you !!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2009/01/generic-data-save-with-zend-framework/583/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monday&#8217;s web applications</title>
		<link>http://www.webmasterbulletin.net/2008/11/mondays-web-applications/469</link>
		<comments>http://www.webmasterbulletin.net/2008/11/mondays-web-applications/469#comments</comments>
		<pubDate>Mon, 10 Nov 2008 15:10:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[E commerce]]></category>
		<category><![CDATA[Web Components]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=469</guid>
		<description><![CDATA[Javascript libraries
While EXTJS 3.0 is on the way with a roadmap setting deadlines for early 2009, Jquery continues its path on the way to serious lightweight alternative to the massive EXT : JX extension for Jquery includes the viewport paradigm on which relies every EXT JS application.
Web based interfaces
In spite of huge progress and impressive [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Javascript libraries</strong></p>
<p>While EXTJS 3.0 is on the way with a <a href="http://extjs.com/products/extjs/roadmap.php">roadmap setting deadlines for early 2009</a>, Jquery continues its path on the way to serious lightweight alternative to the massive EXT <a href="http://jx.myofiz.com">: JX extension </a>for Jquery includes the viewport paradigm on which relies every EXT JS application.</p>
<p><strong>Web based interfaces</strong></p>
<p>In spite of huge progress and impressive use of ease, Jquery is not there yet : for the development of applications many developers have chosen the exhaustivity of EXT JS. Have a look at google code hosted project in development : <a href="http://code.google.com/p/ecartcommerce/">ecartcommerce</a>, CMS <a href="http://code.google.com/p/jimw/">jimw</a>, both ext js and zend framework based. In the world of content management systems, <a href="http://www.squiz.net.au/mysource-mini">mysource </a>is making the news with a new video that demonstrates<a href="http://www.webmasterbulletin.net/2008/11/in-site-editing/456"> inline editing</a>, and other exciting Rich Application features.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2008/11/mondays-web-applications/469/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework extensions</title>
		<link>http://www.webmasterbulletin.net/2008/11/zend-framework-extensions/460</link>
		<comments>http://www.webmasterbulletin.net/2008/11/zend-framework-extensions/460#comments</comments>
		<pubDate>Fri, 07 Nov 2008 19:52:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=460</guid>
		<description><![CDATA[Zend framework might not be as popular as other famous programming frameworks such as CAKE PHP or symfony. But still it&#8217;s getting quite usable with version 1.7 approaching and a growing number of serious of libraries are hitting the ground. We&#8217;ve already covered code generation,  scaffolding and RAD with Zend framework in   previous articles, [...]]]></description>
			<content:encoded><![CDATA[<p>Zend framework might not be as popular as other famous programming frameworks such as CAKE PHP or symfony. But still it&#8217;s getting quite usable with version 1.7 approaching and a growing number of serious of libraries are hitting the ground. We&#8217;ve already covered <a href="http://www.webmasterbulletin.net/2008/10/generate-code-for-zend-framework/352">code generation</a>,  <a href="http://www.webmasterbulletin.net/2008/10/zend-framework-hierachical-zend_db_table-extension/385">scaffolding and RAD with Zend framework</a> in   previous articles, this article covers lower  level libraries from <a href="http://www.zym-project.com/">Zym Projet</a></p>
<p>Zym Project includes a powerful <a href="http://www.zym-project.com/docs/reference/zym.navigation.html">navigation abstraction</a> that can help building <a href="http://www.webmasterbulletin.net/2008/10/zend-framework-hierachical-zend_db_table-extension/385">pages hierachy in a CMS application</a> for example. Other goodies include the <a href="http://www.zym-project.com/docs/reference/zym.app.html">bootstrap class</a>, that takes all configuration from ini files (bootstrap class also exists in another ZF extension, <a href="http://www.developpez.net/forums/d480639/php/outils/zend/zend-framework/zendex-zend-framework-extensions/">ZENDEX</a>). Some <a href="http://www.zym-project.com/docs/moved-to-zf">classes </a>of Zym Project have been integrated into 1.6 official release of Zend Framework. <a href="http://www.zym-project.com/docs/reference?view=siteembed">API classes Reference guide</a> is available online.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2008/11/zend-framework-extensions/460/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zend Framework hierarchical Zend_Db_Table extension</title>
		<link>http://www.webmasterbulletin.net/2008/10/zend-framework-hierachical-zend_db_table-extension/385</link>
		<comments>http://www.webmasterbulletin.net/2008/10/zend-framework-hierachical-zend_db_table-extension/385#comments</comments>
		<pubDate>Wed, 22 Oct 2008 07:59:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Components]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=385</guid>
		<description><![CDATA[After a few hours looking for a good implementation of recursive data with Zend Framework, I came across Hector Virgen&#8217;s table abstraction for nested recursive tables, which uses the efficiency of the Modified Preorder Tree Traversal method that retrieves descendents and ancestors faster that with the old parent_id reference. In fact parent_id is not needed [...]]]></description>
			<content:encoded><![CDATA[<p>After a few hours looking for a good implementation of recursive data with Zend Framework, I came across <a href="http://www.virgentech.com/blogs/view/id/4">Hector Virgen&#8217;s table abstraction</a> for nested recursive tables, which uses the efficiency of the <a href="http://www.sitepoint.com/print/hierarchical-data-database/">Modified Preorder Tree Traversal </a>method that retrieves descendents and ancestors faster that with the old parent_id reference. In fact parent_id is not needed any more but in the example below we will keep the parent_id implementation. My aim here is to implement a draggable tree with data from this Zend_DB_Table abstraction. Setting up ext js with Zend Framework is not that hard, especially when many tutorials have been posted around for extjs tree with other frameworks such as<a href="http://blogs.bigfish.tv/adam/2008/02/12/drag-and-drop-using-ext-js-with-the-cakephp-tree-behavior/"> Cake PHP</a> .<br />
<span id="more-385"></span><br />
The Hierarchical zend_db_table extension  is the first part of the problem : we have simplified Virgen&#8217;s db_table extension to let it work with just parent_id. Here you will find basic functions that allow you to count children of a particular record and list them as rowset rows.</p>
<p>Usage : </p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">include</span><span class="br0">&#40;</span><span class="st0">&quot;Hierarchical_Db_Table.php&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">class</span> Theme2 <span class="kw2">extends</span> Hierarchical_Db_Table &nbsp;<span class="br0">&#123;</span> &nbsp; &nbsp;protected &nbsp;<span class="re0">$_parentKey</span> = <span class="st0">&quot;parent_id&quot;</span>;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$theme</span>=<span class="kw2">new</span> Theme2;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$node</span>==<span class="st0">&quot;0&quot;</span> || <span class="re0">$node</span>==<span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="re0">$thRowSet</span> = <span class="re0">$theme</span>-&gt;<span class="me1">fetchTop</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">else</span> <span class="re0">$thRowSet</span>=<span class="re0">$theme</span>-&gt;<span class="me1">fetchChildren</span><span class="br0">&#40;</span><span class="re0">$node</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>File : Hierarchical_Db_Table.php</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* Enhancements to Zend_Db_Table</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* @author webmasterbulletin.net</span></div>
</li>
<li class="li2">
<div class="de2"><span class="coMULTI">&nbsp;* </span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">require_once</span> <span class="st0">&#8216;Zend/Db/Table/Abstract.php&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">class</span> Hierarchical_Db_Table <span class="kw2">extends</span> Zend_Db_Table_Abstract</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">function</span> primaryKey<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$info</span> = <span class="re0">$this</span>-&gt;<span class="me1">info</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$info</span><span class="br0">&#91;</span>primary<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">function</span> fetchTop<span class="br0">&#40;</span> &nbsp;Zend_Db_Select <span class="re0">$select</span> = <span class="kw2">null</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw2">null</span> === <span class="re0">$select</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$select</span> = <span class="re0">$this</span>-&gt;<span class="me1">select</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$select</span>-&gt;<span class="me1">where</span><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;_parentKey . <span class="st0">&#8216; is NULL&#8217;</span> <span class="br0">&#41;</span>; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$this</span>-&gt;<span class="me1">fetchAll</span><span class="br0">&#40;</span><span class="re0">$select</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">public</span> <span class="kw2">function</span> CountChildren<span class="br0">&#40;</span><span class="re0">$row</span>, Zend_Db_Select <span class="re0">$select</span> = <span class="kw2">null</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$row</span> instanceof Zend_Db_Table_Row_Abstract<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$_row</span> = <span class="re0">$row</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/is_string"><span class="kw3">is_string</span></a><span class="br0">&#40;</span><span class="re0">$row</span><span class="br0">&#41;</span> OR <a href="http://www.php.net/is_numeric"><span class="kw3">is_numeric</span></a><span class="br0">&#40;</span><span class="re0">$row</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$_row</span> = <span class="re0">$this</span>-&gt;<span class="me1">find</span><span class="br0">&#40;</span><span class="re0">$row</span><span class="br0">&#41;</span>-&gt;<span class="me1">current</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw2">null</span> === <span class="re0">$_row</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span> <span class="st0">&#8216;Zend/Db/Exception.php&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw <span class="kw2">new</span> Zend_Db_Exception<span class="br0">&#40;</span><span class="st0">&quot;Cannot find row &#8216;&quot;</span> . <span class="re0">$this</span>-&gt;_traversal<span class="br0">&#91;</span><span class="st0">&#8216;column&#8217;</span><span class="br0">&#93;</span> . <span class="st0">&quot;&#8217; = {$row}&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span> <span class="st0">&#8216;Zend/Db/Exception.php&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw <span class="kw2">new</span> Zend_Db_Exception<span class="br0">&#40;</span><span class="st0">&quot;Expecting instance of Zend_Db_Table_Row_Abstract, a string, or numeric&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw2">null</span> === <span class="re0">$select</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$select</span> = <span class="re0">$this</span>-&gt;<span class="me1">select</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$parent_id</span> = <span class="re0">$_row</span>-&gt;<span class="br0">&#123;</span><span class="re0">$this</span>-&gt;<span class="me1">primaryKey</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#125;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$select</span>-&gt;<span class="me1">where</span><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;_parentKey . <span class="st0">&#8216; = ?&#8217;</span>, <span class="br0">&#40;</span>int<span class="br0">&#41;</span> <span class="re0">$parent_id</span><span class="br0">&#41;</span> &nbsp;;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$select</span>-&gt;<span class="me1">from</span><span class="br0">&#40;</span><span class="re0">$this</span>, <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&quot;count(&quot;</span> . <span class="re0">$this</span>-&gt;<span class="me1">primaryKey</span><span class="br0">&#40;</span><span class="br0">&#41;</span> . <span class="st0">&quot;) as c&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$row</span> =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$this</span>-&gt;<span class="me1">fetchAll</span><span class="br0">&#40;</span><span class="re0">$select</span><span class="br0">&#41;</span>-&gt;<span class="me1">current</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//print_r($select-&gt;toArray());</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Zend_Debug::dump( $this-&gt;_parentKey . &nbsp;$parent_id);</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$row</span>-&gt;<span class="me1">c</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">function</span> fetchChildren<span class="br0">&#40;</span><span class="re0">$row</span>, Zend_Db_Select <span class="re0">$select</span> = <span class="kw2">null</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$row</span> instanceof Zend_Db_Table_Row_Abstract<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$_row</span> = <span class="re0">$row</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/is_string"><span class="kw3">is_string</span></a><span class="br0">&#40;</span><span class="re0">$row</span><span class="br0">&#41;</span> OR <a href="http://www.php.net/is_numeric"><span class="kw3">is_numeric</span></a><span class="br0">&#40;</span><span class="re0">$row</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$_row</span> = <span class="re0">$this</span>-&gt;<span class="me1">find</span><span class="br0">&#40;</span><span class="re0">$row</span><span class="br0">&#41;</span>-&gt;<span class="me1">current</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw2">null</span> === <span class="re0">$_row</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span> <span class="st0">&#8216;Zend/Db/Exception.php&#8217;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw <span class="kw2">new</span> Zend_Db_Exception<span class="br0">&#40;</span><span class="st0">&quot;Cannot find row &#8216;&quot;</span> . <span class="re0">$this</span>-&gt;<span class="me1">primaryKey</span><span class="br0">&#40;</span><span class="br0">&#41;</span>. <span class="st0">&quot;&#8217; = {$row}&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span> <span class="st0">&#8216;Zend/Db/Exception.php&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw <span class="kw2">new</span> Zend_Db_Exception<span class="br0">&#40;</span><span class="st0">&quot;Expecting instance of Zend_Db_Table_Row_Abstract, a string, or numeric&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw2">null</span> === <span class="re0">$select</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$select</span> = <span class="re0">$this</span>-&gt;<span class="me1">select</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$parent_id</span> = <span class="re0">$_row</span>-&gt;<span class="br0">&#123;</span><span class="re0">$this</span>-&gt;<span class="me1">primaryKey</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#125;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//print_r($_row);</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$select</span>-&gt;<span class="me1">where</span><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;_parentKey . <span class="st0">&#8216; = ?&#8217;</span>, <span class="br0">&#40;</span>int<span class="br0">&#41;</span> <span class="re0">$parent_id</span><span class="br0">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$this</span>-&gt;<span class="me1">fetchAll</span><span class="br0">&#40;</span><span class="re0">$select</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2008/10/zend-framework-hierachical-zend_db_table-extension/385/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Omeka : exhibit engine</title>
		<link>http://www.webmasterbulletin.net/2008/10/omeka-exhibit-engine/373</link>
		<comments>http://www.webmasterbulletin.net/2008/10/omeka-exhibit-engine/373#comments</comments>
		<pubDate>Tue, 21 Oct 2008 09:08:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Content Management]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=373</guid>
		<description><![CDATA[what is nice about Omeka CMS is not the backend : you will find in the admin sandbox that most sections of the restricted area, while perfectly efficient, lack today&#8217;s common AJAX reactivity.  But on the front end, the result is stunning :  websites built with Omeka have all gone throught a graphic design expertise [...]]]></description>
			<content:encoded><![CDATA[<p>what is nice about Omeka CMS is not the backend : you will find in the admin sandbox that most sections of the restricted area, while perfectly efficient, lack today&#8217;s common AJAX reactivity.  But on the front end, the result is stunning :  <a href="http://omeka.org/showcase/">websites built with Omeka</a> have all gone throught a graphic design expertise that  push the enthousiast to look more into the technology behind (Zend Framework). As such the tool fits perfectly into its mission statement : &#8220;<em>web platform for publishing collections and exhibitions online. Designed for cultural institutions, enthusiasts, and educators, Omeka is easy to install and modify and facilitates community-building around collections and exhibits.</em>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2008/10/omeka-exhibit-engine/373/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate code for Zend Framework</title>
		<link>http://www.webmasterbulletin.net/2008/10/generate-code-for-zend-framework/352</link>
		<comments>http://www.webmasterbulletin.net/2008/10/generate-code-for-zend-framework/352#comments</comments>
		<pubDate>Fri, 17 Oct 2008 16:42:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Components]]></category>
		<category><![CDATA[scaffolding]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.webmasterbulletin.net/?p=352</guid>
		<description><![CDATA[Can Zend Framework do scaffolding like Symfony or Cake ? No, would you say after downloading the framework and trying out. But a quick search out there shows that you&#8217;re not the only one thinking about it. In fact there are many code generators out there for PHP   : look out for Codecharge, codeigniter, [...]]]></description>
			<content:encoded><![CDATA[<p>Can Zend Framework do scaffolding like Symfony or Cake ? No, would you say after downloading the framework and trying out. But a quick search out there shows that you&#8217;re not the only one thinking about it. In fact there are many code generators out there for PHP   : look out for Codecharge, codeigniter, or any cakephp like framework. What was missing was code specific for Zend Framework, which offers the great advantage of being developped actively and offers new versions often. A quick browse on french developers forum popped up a few applications to be tested, and looking a bit further I found some interesting implementations of scaffolding for Zend Framework :</p>
<ul>
<li><a href="http://code.google.com/p/easyphpapp/">easyphpapp</a> is a good start for manually building CRUD for Zend Framework, <a href="http://janitrix.developpez.com/zenerator/"></a></li>
<li><a href="http://janitrix.developpez.com/zenerator/">Zenerator is a</a> PHP based application that builds classes for database objects out of templates and live database connection</li>
<li><a href="http://www.gregphoto.net/index.php/2006/03/25/zdbform-simple-database-admin-forms-with-the-zend-framework/">ZDBForm </a>is quite old but is good enough to generate very quick  CRUD out of Zend_DB_Table</li>
<li> <a href="http://code.google.com/p/geckotoolbox/">GEckoToolbox </a>has nice grid and form components. By the way <a href="http://devzone.zend.com/article/3962-Zend-Framework-1.7-Preview-Release-now-available">Zend Framework V1.7</a> is coming out soon with Jquery support.</li>
<li><a href="http://code.google.com/p/zend-framework-datagrid/">Zend Framework data grid</a> generates a table from Zend_DB_TAble</li>
<li>Another <a href="http://petala-azul.com/blog/">Grid implementation for Zend Framework</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webmasterbulletin.net/2008/10/generate-code-for-zend-framework/352/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
