<?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>Alan Seiden's Information Technology &#187; Zend Framework</title>
	<atom:link href="http://www.alanseiden.com/category/it/php/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alanseiden.com</link>
	<description>PHP, IBM i, and solutions in technology</description>
	<lastBuildDate>Mon, 23 Aug 2010 18:40:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Two techniques for retrieving SQL from Zend Framework&#8217;s database components</title>
		<link>http://www.alanseiden.com/2010/08/23/two-techniques-for-retrieving-sql-from-zend-framework-database-components/</link>
		<comments>http://www.alanseiden.com/2010/08/23/two-techniques-for-retrieving-sql-from-zend-framework-database-components/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 18:40:19 +0000</pubDate>
		<dc:creator>Alan Seiden</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.alanseiden.com/?p=454</guid>
		<description><![CDATA[Zend Framework&#8217;s database components can build and run queries without the developer&#8217;s having to touch the underlying SQL. Sometimes, though, developers need the SQL for diagnosing problems or to look for efficiencies. That SQL can be accessed with a choice of two main techniques: getQuery() getQuery() is a method of Zend_Db_Profiler and seems, along with [...]]]></description>
			<content:encoded><![CDATA[<p>Zend Framework&#8217;s database components can build and run queries without the developer&#8217;s having to touch the underlying SQL. Sometimes, though, developers need the SQL for diagnosing problems or to look for efficiencies. That SQL can be accessed with a choice of two main techniques:</p>
<p><strong>getQuery()</strong></p>
<p>getQuery() is a method of <a href="http://framework.zend.com/manual/en/zend.db.profiler.html">Zend_Db_Profiler</a> and seems, along with getLastQueryProfile(), to be the standard advice for retrieving SQL of a recent query:</p>
<p><code>query = $profiler-&gt;getLastQueryProfile();</code><br />
<code>echo $query-&gt;getQuery();</code></p>
<p>Yes, getQuery() works, but what if I&#8217;m not using the profiler, or I need to retrieve SQL <em>before</em> a query has run?</p>
<p><strong> __toString()</strong></p>
<p>The &#8220;magic method&#8221; __toString() is simple and can be used either before or after the query is run. When applied to a Zend_Db_Select object, it generates an SQL string.</p>
<p>From the <a href="http://framework.zend.com/manual/en/zend.db.select.html">Zend_Db_Select documentation</a>:</p>
<p><code>$select = $db-&gt;select()</code><code>-&gt;from('products');</code><br />
<code>$sql = $select-&gt;__toString();</code><br />
<code>echo "$sql\n";</code><br />
<code> </code></p>
<p><code>// The output is the string:</code><br />
<code> //   SELECT * FROM "products"</code></p>
<p>__toString() is simple to use, yet is often forgotten when discussing how to retrieve SQL from Zend_Db_Select. I recommend it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanseiden.com/2010/08/23/two-techniques-for-retrieving-sql-from-zend-framework-database-components/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Maximize Zend Server PHP performance with Apache compression</title>
		<link>http://www.alanseiden.com/2010/08/13/maximize-zend-server-performance-with-apache-compression/</link>
		<comments>http://www.alanseiden.com/2010/08/13/maximize-zend-server-performance-with-apache-compression/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 20:45:52 +0000</pubDate>
		<dc:creator>Alan Seiden</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[IBM i]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[System i]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend Server]]></category>
		<category><![CDATA[iSeries]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[mod_deflate]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.alanseiden.com/?p=439</guid>
		<description><![CDATA[Faster web sites sell more products, create better user satisfaction, and even rank higher in Google searches. Try compression to boost the download speed of your Zend Server for IBM i pages. You can compress PHP output javascript, style sheets, and other text-based content. My tests show a speed improvement of 10-50%.]]></description>
			<content:encoded><![CDATA[<p>Does your site run as quickly as it could? It&#8217;s worth your time to find out. Faster web sites sell more products, improve user satisfaction, and even <a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">rank higher in Google searches</a>.</p>
<p><em>Note: This tip was written for IBM i but could be adapted for other platforms as well.</em></p>
<p><strong>Benefits of Zend Server</strong></p>
<p>If you have upgraded from Zend Core to <a href="http://www.zend.com/products/server/zend-server-ibm-i">Zend Server for IBM i</a>, you have already received several  performance improvements: bytecode acceleration (Zend Optimizer+), the elimination of Zend Core&#8217;s proxy web server, and configurable Data Caching. If you upgraded from Community Edition (CE) to full Zend Server, you also get monitoring, Page Caching, and Job Queue functionality.</p>
<p><strong>Compression adds even more speed</strong></p>
<p>IBM&#8217;s Apache web server provides an additional way to speed up your Zend Server for IBM i pages. You can compress PHP output, javascript, style sheets, and other text-based content. The compressed output will automatically be decompressed and interpreted properly by all modern web browsers. My tests show a <strong>speed improvement of 10-50%</strong> from this easy technique.</p>
<p><strong>How to enable compression in 3 steps</strong></p>
<p>1. Edit ZENDSVR&#8217;s Apache configuration file, located at /www/zendsvr/conf/httpd.conf. This is a simple text file, so you may choose from several editors: IBM&#8217;s HTTP Server Admin GUI at port 2001 (if *ADMIN is started), the WRKLNK/EDTF command, or your favorite text editor (I use <a href="http://www.editpadpro.com/">EditPad Pro</a>).</p>
<p>2. Add the following two directives to the httpd.conf&#8217;s main section:</p>
<pre># Load IBM i's module that performs compression
LoadModule deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM

# Specify what to compress (example: php, json, css, javascript, static html)
AddOutputFilterByType DEFLATE application/x-httpd-php application/json text/css
application/x-javascript application/javascript text/html</pre>
<p>3. Restart Zend Server using the handy <a href="http://www.alanseiden.com/wp-content/uploads/2010/08/Copy-of-Zend-Server-restart-button.png"><img class="alignnone size-full wp-image-507" title="Zend Server restart button" src="http://www.alanseiden.com/wp-content/uploads/2010/08/Copy-of-Zend-Server-restart-button.png" alt="Restart PHP button" width="122" height="20" /></a> button or <strong>STRTCPSVR SERVER(*HTTP) RESTART(*HTTP) HTTPSVR(ZENDSVR)</strong></p>
<p><strong>Measure the improvement</strong></p>
<p>I ran before-and-after tests using a sample script included with Zend Server for IBM i: http://your-server:10088/Samples/SQL_access/DB2_SQL_example.php.</p>
<p>Before compression: 31kb, loaded in 250ms (milliseconds). See the <a href="http://getfirebug.com">Firebug</a> report below (Firebug is an optional add-on for Firefox and is not required.)</p>
<div id="attachment_512" class="wp-caption alignnone" style="width: 659px"><a href="http://www.alanseiden.com/wp-content/uploads/2010/08/no-compression1.png"><img class="size-large wp-image-512     " title="no compression" src="http://www.alanseiden.com/wp-content/uploads/2010/08/no-compression1-1024x401.png" alt="Zend Server output without compression" width="649" height="254" /></a><p class="wp-caption-text">Without compression, this page was 31kb and loaded in 250ms</p></div>
<p>After compression: 4.4kb; loaded in 109ms. That&#8217;s only 14% of the size and 50% of the time! See the screen shot below.</p>
<div id="attachment_511" class="wp-caption alignnone" style="width: 651px"><a href="http://www.alanseiden.com/wp-content/uploads/2010/08/with-compression1.png"><img class="size-full wp-image-511 " title="with-compression" src="http://www.alanseiden.com/wp-content/uploads/2010/08/with-compression1.png" alt="after compression: only 4.4kb and loaded in 109ms" width="641" height="325" /></a><p class="wp-caption-text">after compression: only 4.4kb and loaded in 109ms</p></div>
<p>I highly recommend that you give output compression a try. Your Zend Server for IBM i pages will fly!</p>
<p>For more information on browser output compression, see: <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" target="_blank">http://httpd.apache.org/docs/2.0/mod/mod_deflate.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanseiden.com/2010/08/13/maximize-zend-server-performance-with-apache-compression/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>See me speak about web services and Zend Framework</title>
		<link>http://www.alanseiden.com/2010/05/25/see-me-speak-about-web-services-and-zend-framework/</link>
		<comments>http://www.alanseiden.com/2010/05/25/see-me-speak-about-web-services-and-zend-framework/#comments</comments>
		<pubDate>Tue, 25 May 2010 17:28:58 +0000</pubDate>
		<dc:creator>Alan Seiden</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[IBM i]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[System i]]></category>
		<category><![CDATA[Web services]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.alanseiden.com/?p=408</guid>
		<description><![CDATA[Join me at at Long Island PHP on June 7, 2010, where I&#8217;ll present a case study showing how I integrated Windows-based data into an IBM i-based application using SOAP with Zend Framework. The principles are the same no matter what type of servers you use. Event details: http://www.listnet.org/eventDetails.cfm?eventID=1263 There will be plenty of time [...]]]></description>
			<content:encoded><![CDATA[<p>Join me at at <a href="http://www.liphp.org/">Long  Island PHP</a> on June 7, 2010, where I&#8217;ll present a case study showing how I integrated Windows-based data into an IBM i-based application using SOAP with Zend Framework.</p>
<p>The principles are the same no matter what type of servers you use.</p>
<p>Event details: <a href="http://www.listnet.org/eventDetails.cfm?eventID=1263">http://www.listnet.org/eventDetails.cfm?eventID=1263</a></p>
<p>There will be plenty of time for questions and discussion.</p>
<p>Hope to see you there!</p>
<p>P.S. To see the slides from my past presentations, go to  <a href="../presentations/">http://www.alanseiden.com/presentations/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanseiden.com/2010/05/25/see-me-speak-about-web-services-and-zend-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Class &#8216;Zend_Db_Table&#8217; not found</title>
		<link>http://www.alanseiden.com/2010/03/04/class-zend_db_table-not-found/</link>
		<comments>http://www.alanseiden.com/2010/03/04/class-zend_db_table-not-found/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 21:08:44 +0000</pubDate>
		<dc:creator>Alan Seiden</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.alanseiden.com/?p=370</guid>
		<description><![CDATA[New developers sometimes struggle with putting all of Zend Framework&#8217;s pieces together. This week someone asked me how to resolve the error: Fatal error: Class &#8216;Zend_Db_Table&#8217; not found. The answer: he needs to &#8220;require&#8221; the file containing the Zend_Db_Table class, like so: require_once 'Zend/Db/Table.php'; or (my preference) use the autoloader: // ZF 1.8 or later: [...]]]></description>
			<content:encoded><![CDATA[<p>New developers sometimes struggle with putting all of Zend Framework&#8217;s pieces together. This week someone asked me how to resolve the error:</p>
<blockquote><p><span style="font-size: small;"><strong>Fatal error</strong>: Class &#8216;Zend_Db_Table&#8217; not found. </span></p></blockquote>
<p><span style="font-size: small;">The answer: he needs to &#8220;require&#8221; the file containing the Zend_Db_Table class, like so:</span></p>
<pre>require_once 'Zend/Db/Table.php';</pre>
<p>or (my preference) use the autoloader:</p>
<pre>// ZF 1.8 or later: add these lines to your bootstrap file:
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance()-&gt;setFallbackAutoloader(true);</pre>
<p>ZF isn&#8217;t complicated if you know the few things you MUST use. The autoloader is one of them.</p>
<p>If you need help getting started with Zend Framework, <a title="contact me about Zend Framework mentoring, training, or troubleshooting" href="http://www.alanseiden.com/contact">contact me about Zend Framework mentoring, training, or troubleshooting</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanseiden.com/2010/03/04/class-zend_db_table-not-found/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP on IBM i (and me) at ZendCon 2009</title>
		<link>http://www.alanseiden.com/2009/09/29/php-on-ibm-i-at-zendcon-2009/</link>
		<comments>http://www.alanseiden.com/2009/09/29/php-on-ibm-i-at-zendcon-2009/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 01:12:21 +0000</pubDate>
		<dc:creator>Alan Seiden</dc:creator>
				<category><![CDATA[IBM i]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[System i]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[AS/400]]></category>
		<category><![CDATA[i5]]></category>
		<category><![CDATA[iSeries]]></category>
		<category><![CDATA[ZendCon09]]></category>

		<guid isPermaLink="false">http://www.alanseiden.com/?p=254</guid>
		<description><![CDATA[This year&#8217;s ZendCon (Oct. 20-22, 2009, in San Jose, Calif.), the premier PHP conference, features several presentations about developing with PHP on the IBM i, including one by me! Come hear me speak about &#8220;Zend Framework for Enterprise PHP on IBM i&#8221; on Tuesday, Oct. 20, 2009, at 4pm. For details, go to http://www.zendcon.com.]]></description>
			<content:encoded><![CDATA[<p>This year&#8217;s <a href="http://www.zendcon.com/">ZendCon</a> (Oct. 20-22, 2009, in San Jose, Calif.), the premier PHP conference, features several presentations about developing with PHP on the IBM i, including one by me!</p>
<p>Come hear me speak about &#8220;Zend Framework for Enterprise PHP on IBM i&#8221; on Tuesday, Oct. 20, 2009, at 4pm.</p>
<p>For details, go to <a href="http://www.zendcon.com">http://www.zendcon.com</a>.</p>
<a href="http://www.zendcon.com"><img src="http://www.alanseiden.com/wp-content/uploads/2009/09/zendcon09_speakerbutton.jpg" alt="Speaker: Zend/PHP Conference 2009" title="Zend/PHP Conference 2009 Speaker" width="160" height="160" class="size-full wp-image-262" /></a>
]]></content:encoded>
			<wfw:commentRss>http://www.alanseiden.com/2009/09/29/php-on-ibm-i-at-zendcon-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Our Zend Framework-based Site Honored by IBM/COMMON</title>
		<link>http://www.alanseiden.com/2009/05/21/our-zend-framework-based-site-honored-by-ibmcommon/</link>
		<comments>http://www.alanseiden.com/2009/05/21/our-zend-framework-based-site-honored-by-ibmcommon/#comments</comments>
		<pubDate>Thu, 21 May 2009 04:15:21 +0000</pubDate>
		<dc:creator>Alan Seiden</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[IBM i]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.alanseiden.com/2009/05/21/our-zend-framework-based-site-honored-by-ibmcommon/</guid>
		<description><![CDATA[We won! IBM has recognized my use of PHP and Zend Framework, and our entire team&#8217;s RPG/DB2 and design work, by naming our web solution the IBM i&#8217;s most innovative of 2009. At IBM&#8217;s 2009 COMMON conference, IBM awarded the Power Systems Innovation Award for Best Web Solution for eBiz@ABG. The site, developed with my [...]]]></description>
			<content:encoded><![CDATA[<p>We won! IBM has recognized my use of PHP and Zend Framework, and our entire team&#8217;s RPG/DB2 and design work, by naming our web solution the IBM i&#8217;s most innovative of 2009.</p>
<p>At IBM&#8217;s 2009 COMMON conference, IBM awarded the <a title="Power Systems Innovation Award" href="https://www.mcpressonline.com/cio-news/standards-organizations/common-and-ibm-recognize-innovative-use-of-power-systems-flexibility.html">Power Systems Innovation Award for Best Web Solution</a> for eBiz@ABG. The site, developed with my colleagues at  Strategic Business Systems, Inc., was created for New Jersey&#8217;s largest wine and spirits wholesaler, Allied Beverage Group.</p>
<p>The system offers product ordering, live inventory levels and pricing, and a full-text search of Allied&#8217;s large product catalog. The application was built with Zend Framework (the leading PHP framework) and runs entirely on Allied&#8217;s IBM i, leveraging Allied&#8217;s db2 database and time-tested RPG logic.</p>
<p>The site is password-protected, so unfortunately I can&#8217;t link to it here.</p>
<p>eBiz@ABG is one of the first sites to be built with Zend Framework on IBM i (System i, i5, iSeries, AS/400). It was a true collaboration with Allied, made easier because we all spoke the language of &#8220;i.&#8221; What&#8217;s more, by using large chunks of Allied&#8217;s existing RPG code that already handled the complex business logic, we saved time and avoided reinventing the wheel.</p>
<p>Zend Framework worked so well that I committed to mastering it and teaching the community about it. (ZF has a learning curve, but after that curve is mastered, ZF speeds development and offers easy maintenance and growth.) I earned my Zend Framework certification in August 2008, becoming one of the first 50 worldwide to do so and the first ZF-certified &#8220;i&#8221; professional. Since then, I&#8217;ve gone on to be a ZF/i mentor for other development teams, and have become a public speaker, sharing my PHP/ZF/i roadmap at conferences.</p>
<p>Thanks to Allied for the opportunity to collaborate on a great project; thanks to Strategic Business Systems for the support; and thanks to IBM for the award.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanseiden.com/2009/05/21/our-zend-framework-based-site-honored-by-ibmcommon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Study for the Zend Framework Certification Test</title>
		<link>http://www.alanseiden.com/2009/01/06/how-to-study-for-the-zend-framework-certification-test/</link>
		<comments>http://www.alanseiden.com/2009/01/06/how-to-study-for-the-zend-framework-certification-test/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 06:06:59 +0000</pubDate>
		<dc:creator>Alan Seiden</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.alanseiden.com/?p=82</guid>
		<description><![CDATA[When people ask me how to study for the Zend Framework certification test, here&#8217;s my answer: First&#8212;and I hope this goes without saying&#8212;you should already be fairly skilled in developing with Zend Framework, or least with some of its components. Then you&#8217;ll have internalized the ZF &#8220;style&#8221; and will be ready to study the components [...]]]></description>
			<content:encoded><![CDATA[<p>When people ask me how to study for the Zend Framework certification test, here&#8217;s my answer:</p>
<ul>
<li>First&#8212;and I hope this goes without saying&#8212;you should already be fairly skilled in developing with Zend Framework, or least with some of its components. Then you&#8217;ll have internalized the ZF &#8220;style&#8221; and will be ready to study the components you haven&#8217;t used yet. (To get started with ZF, try the <a href="http://framework.zend.com/docs/quickstart">&#8220;quick start&#8221; tutorial</a> or consider <a href="http://www.zend.com/en/services/training/course-catalog/zend-framework">formal training</a>.)<br /></ br><br /></ br></li>
<li>Then download the free <a href="http://www.zend.com/community/downloads">ZF Certification study guide</a>. It&#8217;s just a guide, so don&#8217;t expect it to explain Zend Framework in its entirety, or even in the clearest way. The guide will, however, indicate which topics to study and what sorts of questions will be asked. Given that knowledge, you can use other resources to answer your questions as they arise.<br /></ br><br /></ br>
</li>
<li>Each component is explained in the <a href="http://framework.zend.com/manual/">Zend Framework Programmer&#8217;s Reference Guide</a>. It&#8217;s well written and is organized by component, such as Zend_Acl, Zend_Auth, and Zend_Form. Also included are Zend&#8217;s coding standards and a performance guide.<br /></ br><br /></ br>
</li>
<li>Whenever I got confused, I went right to the <a href="http://framework.zend.com/manual/">Zend Framework source code</a>. As a developer, I can digest code faster than I can read a manual. So I recommend reading the code in your favorite IDE whenever you have doubts. You&#8217;ll also learn how the developers structured their code, which will help when you need to understand or extend ZF&#8217;s functionality for your future projects.<br /></ br><br /></ br>
</li>
</ul>
<p>
In addition to these resources, Zend now offers <a href="http://www.zend.com/en/store/php-training/zend-framework-certification-training">training for Zend Framework certification.</a> If you prefer a structured approach, this might be for you.
</p>
<p>
No matter how you study, the certification process will make you a better ZF developer. In my case, I learned about unfamiliar components and deepened my understanding of the familiar ones. I also got really comfortable delving into the ZF code.
</p>
<p>
Good luck to everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanseiden.com/2009/01/06/how-to-study-for-the-zend-framework-certification-test/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
