<?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>Jon&#039;s Blog &#187; Development</title>
	<atom:link href="http://bombdiggity.net/blog/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://bombdiggity.net/blog</link>
	<description>Ramblings of a php coder</description>
	<lastBuildDate>Fri, 14 May 2010 17:36:14 +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>PhpStorm Pricing Announced</title>
		<link>http://bombdiggity.net/blog/2010/05/14/phpstorm-pricing-announced/</link>
		<comments>http://bombdiggity.net/blog/2010/05/14/phpstorm-pricing-announced/#comments</comments>
		<pubDate>Fri, 14 May 2010 17:33:57 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[jetbrains]]></category>
		<category><![CDATA[phpstorm]]></category>

		<guid isPermaLink="false">http://bombdiggity.net/blog/?p=216</guid>
		<description><![CDATA[Well besides today being a Friday (TGIF!!), JetBrains have announced the pricing for the upcoming WebStorm and PhpStorm. I&#8217;ve personally been waiting for this as I&#8217;m willing to actually pay for this IDE because it&#8217;s just that damn good and it&#8217;s only in Early Access right now. I find the pricing to be some of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jetbrains.com/phpstorm"><img class="alignright size-thumbnail wp-image-183" title="PHPStorm" src="http://bombdiggity.net/blog/wp-content/uploads/2010/03/webide-150x150.png" alt="PHPStorm from JetBrains" width="150" height="150" /></a>Well besides today being a Friday (TGIF!!), JetBrains have announced the pricing for the upcoming WebStorm and PhpStorm. I&#8217;ve personally been waiting for this as I&#8217;m willing to actually pay for this IDE because it&#8217;s just that damn good and it&#8217;s only in Early Access right now.</p>
<p><span id="more-216"></span>I find the pricing to be some of the best out there for PhpStorm comparedÂ toÂ competitors, but you can&#8217;t really go wrong with $99 dollars for a personalÂ licenseÂ ($49 if you buy it beforeÂ SeptemberÂ 1st) and $199 for aÂ commercialÂ license ($149 if you buy it before September 1st). Â What&#8217;s theÂ differenceÂ you may ask, well personal is tied to a single user where as aÂ commercialÂ licenseÂ is tied to a company and can be moved from developer to developer. Now what I find awesome with JetBrains is that if you are working on an open source project you can get a free 1 year license once you verify with them the project that you are working on. They have been doing this for years with the Intellj IDE for Java and it&#8217;s a practice I wish more companies would use.</p>
<p>For more information check out the <a title="PhpStorm Licensing Page" href="http://www.jetbrains.com/phpstorm/buy/index.jsp">PhpStorm Licensing Page</a> and you can get the latest version from the <a title="PhpStorm Early Access Program" href="http://confluence.jetbrains.net/display/WI/Web+IDE+EAP">PhpStorm EAP Access Page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2010/05/14/phpstorm-pricing-announced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fakemail FTW!</title>
		<link>http://bombdiggity.net/blog/2010/05/07/fakemail-ftw/</link>
		<comments>http://bombdiggity.net/blog/2010/05/07/fakemail-ftw/#comments</comments>
		<pubDate>Fri, 07 May 2010 17:00:52 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[fakemail]]></category>

		<guid isPermaLink="false">http://bombdiggity.net/blog/?p=200</guid>
		<description><![CDATA[What is fakemail? From the fakemail homepage: fakemail is a fake mail server that captures emails as files for acceptance testing. This avoids the excessive configuration of setting up a real mail server and trying to extract mail queue content. If you have had to test applications that send e-mails, for example as part of [...]]]></description>
			<content:encoded><![CDATA[<h2>What is fakemail?</h2>
<p>From the fakemail <a href="http://www.lastcraft.com/fakemail.php">homepage</a>:</p>
<blockquote><p>fakemail is a fake mail server that captures emails as files for acceptance testing. This avoids the excessive configuration of setting up a real mail server and trying to extract mail queue content.</p>
<p>If you have had to test applications that send e-mails, for example as part of a web sign up process, you will know what an involved and tricky exercise that can be. Usually you have to sign up with a special e-mail address, have the mail go to the mail server and then read it back into the test with a POP/IMAP client. There are several downsides to this approach; you need to install extra software to interact with the POP server, you suffer from spurious failures due to reliance on external infrastructure, and it is very very slow.</p>
<p>Fakemail works by intercepting the mail before it leaves the machine by replacing your Mail Transfer Agent (MTA). It&#8217;s a simple script run from the command line that you can launch from within your test framework.</p></blockquote>
<h2>Why Should I Use fakemail?</h2>
<p>The real question is why aren&#8217;t you using fakemail. Â I didn&#8217;t know of fakemail before I started at <a title="SugarCRM" href="http://www.sugarcrm.com/crm/">SugarCRM</a>, but now I&#8217;m glad that I do.Â At Sugar we use fakemail on all of our test and development instances. By using fakemail it provides a way to test all of our scripts that send emails but not actually send the emails out. What it does in turn is send the email (headers and all) to a folder specified in the config of the fakemail setup. Â We happend to send ours to /tmp/&lt;instance name&gt;/ since we have multiple instances running on the same machine.</p>
<h2>How do I Setup fakemail</h2>
<p>fakemail comes in two flavors: <a href="http://www.lastcraft.com/fakemail.php#python">Python</a> and <a href="http://www.lastcraft.com/fakemail.php#perl">Perl</a>.  They both work the same but what this allows you to do is pick your poison on which language you are more comfortable with.</p>
<p>Once you install fakemail to start it up just issue the following command (PERL version)</p>
<pre class="brush: perl">
fakemail --host=localhost --port=10025 --path=/tmp
</pre>
<p>Now it&#8217;s running.  To test it out just run telnet into localhost port 10025</p>
<pre class="brush: bash">
telnet localhost 10025
Connected to localhost.localdomain (127.0.0.1).
Escape character is &#039;^]&#039;.
220 uno.home SMTP Net::Server::Mail (Perl) Service ready
</pre>
<p>To test it use the following commands</p>
<pre class="brush: bash">
HELO mailer
250 Requested mail action okay, completed
MAIL From: me@here
250 sender me@here OK
RCPT To: you@there
250 recipient you@there OK
DATA
354 Start mail input; end with .

A-header: Sample header

Hello
.
250 message queued
QUIT
221 uno.home Service closing transmission channel
</pre>
<p>After this sequence we can stop the fakemail terminal with a Control-C to interrupt the process. Because we set the fakemail path to the local directory, we should see a file labelled &#8220;you@there.1&#8243;. Here is the contents of that file&#8230;</p>
<pre>A-header: Sample header

Hello</pre>
<p>You should now be ready to use fakemail to make your testing easier.</p>
<p>Don&#8217;t forget to check the <a href="http://www.lastcraft.com/fakemail.php">fakemail page</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2010/05/07/fakemail-ftw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s in an IDE?</title>
		<link>http://bombdiggity.net/blog/2010/03/12/whats-in-an-ide/</link>
		<comments>http://bombdiggity.net/blog/2010/03/12/whats-in-an-ide/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 20:49:09 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[phpstorm]]></category>
		<category><![CDATA[zend studio]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=181</guid>
		<description><![CDATA[I&#8217;ve found myself asking that question over the past month or so.Â  For as long as I could remember I used Zend Studio, but recently I switch to PHPStorm from JetBrains and I&#8217;m not looking back. For as long as I could remember I used Zend Studio (ZS).Â  I started back with version 3.0 on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found myself asking that question over the past month or so.Â  For as long as I could remember I used Zend Studio, but recently I switch to PHPStorm from JetBrains and I&#8217;m not looking back.</p>
<p><span id="more-181"></span>For as long as I could remember I used <a href="http://www.zend.com/studio">Zend Studio</a> (ZS).Â  I started back with version 3.0 on OS X (it was the only PHP IDE around for Mac at the time).Â  I used it up to 5.5 and loved every minute of it, it was the best IDE they way I developed. Then in late 2007/early 2008 I started using SVN for version control and the SVN binding in ZS 5.5 were horrible.Â  But lucky ZS 6.0 was in beta testing and so I hopped on the beta team and started testing it.Â  Now since ZS 6 was build on top of eclipse it was a completely different way of working and for the better.</p>
<p><img class="alignright size-full wp-image-185" title="Zend Studio" src="http://www.bombdiggity.net/blog/wp-content/uploads/2010/03/zend-studio.png" alt="" width="128" height="128" />Now with ZS 6.1 they had built in support for Zend Framework (ZF) which was awesome for me since I&#8217;m a contributor to the project and just sped up my development time a lot as it make writing view/controllers and the like much faster for me.Â  The one thing that happened for the bad was it got slower and took longer for start up and used more memory.Â  This was starting to be a huge deal for me as I keep running out of memory on my desktop and would have to restart ZS.</p>
<p>Once 7.0 came out the memory usage got somewhat under control and the ZF integration got better and more useful.Â  As with 6.x series I was one the early access team.Â  Around the time that 7.0 came out I switched from Windows to Linux full time.Â  Performance with ZS improved a little but once 7.1 came out it came to a screeching halt and I was back to waiting on the IDE to do basic things like auto complete popup and such.</p>
<p>This is where I started thinking about looking for a new IDE.Â  I tried <a href="http://netbeans.org/">Netbeans</a>, VIM and other but nothing worked like I remember ZS working back before 7.1.Â  I then went to get JetBrains IntellJ to do some lite java work for a personal project and that&#8217;s where I found the beta release of <a href="http://www.jetbrains.com/webide/">JetBrains PHPStorm</a> (then WebIDE).Â  I figured since I like IntellJ so much for Java Development I would give this a try.</p>
<p><img class="alignright size-thumbnail wp-image-183" title="PHPStorm" src="http://www.bombdiggity.net/blog/wp-content/uploads/2010/03/webide-150x150.png" alt="PHPStorm from JetBrains" width="150" height="150" />The early version of PHPStorm were very basic as best but it did everything very fast and very well.Â  With each beta they keep on adding more features for the PHP editor. PHPStorm also did one thing that Zend Studio never did which is XDebug Support (ZS supposedly supports but I could never get working).Â  Now PHPStorm does not have ZF support but I quickly got over that and just started using the ZF command line tool.</p>
<p>I found PHPStorm manages memory usage much better than any eclipse based application ever does.Â  On average with a huge project loaded PHPStorm uses about 100 to 120 megs of ram where as ZS would be upwards of 350+.Â  That&#8217;s a huge benefit in my eyes.</p>
<p>Now this may all just seem like I&#8217;m rambling about my past and present IDE usage but what I&#8217;m trying to get here is find an IDE that works well for you and allows you to do your work. That is the number one benefit I see to using an IDE.Â  If you are considering a new IDE or just want to check out a new one I suggest you check out PHPStorm as I believe that it will make waves once it&#8217;s released.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2010/03/12/whats-in-an-ide/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Doctrine Query Cache &#8211; Sqlite</title>
		<link>http://bombdiggity.net/blog/2009/12/23/doctrine-query-cache-sqlite/</link>
		<comments>http://bombdiggity.net/blog/2009/12/23/doctrine-query-cache-sqlite/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 20:23:30 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[doctrine]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=172</guid>
		<description><![CDATA[So today in playing with doctrine in one of my projects IÂ decidedÂ to enable query caching to help speed up things a bit. My current host does not run APC or MemCache so I had to use sqlite memory table which they do allow. Â I followed the directions as stated in the manual for 1.2, but [...]]]></description>
			<content:encoded><![CDATA[<p>So today in playing with doctrine in one of my projects IÂ decidedÂ to enable query caching to help speed up things a bit. My current host does not run APC or MemCache so I had to use sqlite memory table which they do allow. Â I followed the directions as stated in the <a title="Doctrine Caching How To" href="http://www.doctrine-project.org/documentation/manual/1_2/en/caching" target="_blank">manual</a> for 1.2, but it didn&#8217;t work. Â It gave me a Table name option not set.</p>
<p><span id="more-172"></span>To fix this problem, I played around a bit and came up with the following fix.</p>
<pre class="brush: php">

$manager = Doctrine_Manager::getInstance();
$cacheConn = Doctrine_Manager::connection(new PDO(&#039;sqlite::memory:&#039;));
$cacheDriver = new Doctrine_Cache_Db(array(&#039;connection&#039; =&gt; $cacheConn, &#039;tableName&#039; =&gt;&#039;cache&#039;));
$cacheDriver-&gt;createTable();
$manager-&gt;setAttribute(Doctrine_Core::ATTR_QUERY_CACHE, $cacheDriver);
</pre>
<p>Please leave a comment if i missed anything or there is a better way of doing something.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/12/23/doctrine-query-cache-sqlite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing ZF Application Resources In Controller</title>
		<link>http://bombdiggity.net/blog/2009/12/09/accessing-zf-application-resources-in-controller/</link>
		<comments>http://bombdiggity.net/blog/2009/12/09/accessing-zf-application-resources-in-controller/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 04:15:35 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[zend_application]]></category>
		<category><![CDATA[zf]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=162</guid>
		<description><![CDATA[My friend Rob Allen recently posted a quick how-to on how to access your configuration data in application.ini file while in a controller or action helper. The one part Rob didn&#8217;t touch on was how to get resources back. Resources are set when you return something out of your _init&#60;MethodName&#62;. For example when you use [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Rob Allen recently posted a quick how-to on how to <a href="http://akrabat.com/zend-framework/accessing-your-configuration-data-in-application-ini/">access your configuration data in application.ini</a> file while in a controller or action helper. The one part Rob didn&#8217;t touch on was how to get resources back.</p>
<p><span id="more-162"></span></p>
<p>Resources are set when you return something out of your _init&lt;MethodName&gt;. For example when you use the following source code and return the $_logger, Zend_Application stores the returned value in a registry inside the application.</p>
<pre class="brush: php">
// place in your bootstrap file.
public function _initLogger()
{
    $writer = new Zend_Log_Writer_Firebug();
    $_logger = new Zend_Log($writer);
    return $_logger;
}
</pre>
<p>Now the way you get access to the logger is by doing the following inside your controller or controller helper:</p>
<pre class="brush: php">
class IndexController extends Zend_Controller_Action
{
    public function indexAction()
    {
        // action body
        $logger = $this-&gt;getInvokeArg(&#039;bootstrap&#039;)
                        -&gt;getResource(&#039;logger&#039;);
    }
}
</pre>
<p>The key is the getResource() method.  You pass in the part following the _init from your method name.  This will return the instance of what ever object was returned in the _init method. </p>
<p>Where I got stuck, was since I&#8217;m using the Module Bootstrap for my modules and I only want the logger on specific modules and not the whole application when I used the above code it returned null.  The reason for null was because it was not in the global bootstrap file. To get access to the resources from the module bootstrap you need to use the following code:</p>
<pre class="brush: php">
class Admin_IndexController extends Zend_Controller_Action
{
    public function indexAction()
    {
        // action body
        $logger = $this-&gt;getInvokeArg(&#039;bootstrap&#039;)
                        -&gt;getResource(&#039;modules&#039;)
                        -&gt;offsetGet($this-&gt;getRequest()-&gt;getModuleName())
                        -&gt;getResource(&#039;logger&#039;);
    }
}
</pre>
<p>I hope this helps someone else out there as it was an eye opener to me when I was told about it via the ZF mailing list.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/12/09/accessing-zf-application-resources-in-controller/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ZF Curly Quote Character Filter</title>
		<link>http://bombdiggity.net/blog/2009/12/09/zf-curly-quote-character-filter/</link>
		<comments>http://bombdiggity.net/blog/2009/12/09/zf-curly-quote-character-filter/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:15:08 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[curly quotes]]></category>
		<category><![CDATA[ms office]]></category>
		<category><![CDATA[zend_filter]]></category>
		<category><![CDATA[zf]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=144</guid>
		<description><![CDATA[If your like me and have people who like to write stuff in MS Office first and then post it to the web you get the silly quotes and such that word uses. The quotes and such are not valid UFT-8 and that&#8217;s how I like to store my data in my database so it [...]]]></description>
			<content:encoded><![CDATA[<p>If your like me and have people who like to write stuff in MS Office first and then post it to the web you get the silly quotes and such that word uses. The quotes and such are not valid UFT-8 and that&#8217;s how I like to store my data in my database so it usually dumps out with an error.</p>
<p>I&#8217;ve come up with the following Zend_Filer_Interface so that way you can plug it into anything that has the ability to use Zend_Filter.</p>
<p>Read More for the source code.<br />
<span id="more-144"></span></p>
<p><del datetime="2009-12-10T21:39:16+00:00"><strong>Updated on 12/10/09 to include more characters and remove the html version</strong></del></p>
<p><strong>Updated again on 12/10/09 to make it work with UTF-8 Submitted Forms.  I&#8217;ve spent half the day validaing this and testing it with a HEX editor</strong></p>
<pre class="brush: php">
&lt;?php

class Util_Filter_WordChars implements Zend_Filter_Interface
{
    /**
     * Filter out the invalid characters that word puts in.
     * @param string $value
     * @return string
     */
    public function filter($value)
    {

        $search = array(chr(0xe2) . chr(0x80) . chr(0x98),  // &#039;
            chr(0xe2) . chr(0x80) . chr(0x99),  // &#039;
            chr(0xe2) . chr(0x80) . chr(0x9c),  // &quot;
            chr(0xe2) . chr(0x80) . chr(0x9d),  // &quot;
            chr(0xe2) . chr(0x80) . chr(0x93),  // em dash
            chr(0xe2) . chr(0x80) . chr(0x94),  // en dash
            chr(0xe2) . chr(0x80) . chr(0xa6)); // ...

        $replace = array(
            &#039;\&#039;&#039;,
            &#039;\&#039;&#039;,
            &#039;&quot;&#039;,
            &#039;&quot;&#039;,
            &#039;-&#039;,
            &#039;-&#039;,
            &#039;...&#039;);

        return str_replace($search, $replace, $value);
    }
}
</pre>
<p>This could be changed to put them in the html ascii code to display them but I like the standard single quote and double quote online.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/12/09/zf-curly-quote-character-filter/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Zend Framework 1.8 Released</title>
		<link>http://bombdiggity.net/blog/2009/04/30/zend-framework-18-released/</link>
		<comments>http://bombdiggity.net/blog/2009/04/30/zend-framework-18-released/#comments</comments>
		<pubDate>Fri, 01 May 2009 00:44:27 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=137</guid>
		<description><![CDATA[As I&#8217;m sure everyone is almost aware by now Zend Framework 1.8 has been released. This is an extra special release for me as I spend two good weeks back in March writing the Ec2 Component after being pinged by Zend to do it. It was fun writing it and learning more that I ever [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m sure everyone is almost aware by now Zend Framework 1.8 has been released. This is an extra special release for me as I spend two good weeks back in March writing the Ec2 Component after being pinged by Zend to do it.</p>
<p>It was fun writing it and learning more that I ever wanted to know about the Ec2 API&#8217;s but all it all it was a great expierice and I&#8217;m glad that I got the chance to do it.</p>
<p>Other notable items in the 1.8 release are:</p>
<ul>
<li>Zend_Application</li>
<li>Zend_Tool</li>
<li>Zend_Crypt</li>
<li>Zend_Service_Amazon_S3</li>
<li><a title="Zend Framework 1.8 Released" href="http://devzone.zend.com/article/4524-Zend-Framework-1.8.0-Released">and so much more</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/04/30/zend-framework-18-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework Ec2 API</title>
		<link>http://bombdiggity.net/blog/2009/03/27/zend-framework-ec2-api/</link>
		<comments>http://bombdiggity.net/blog/2009/03/27/zend-framework-ec2-api/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 04:33:57 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=133</guid>
		<description><![CDATA[So about two weeks ago Wil Sinclair from Zend pinged me about creating an Zend Framework API interface for Amazon Ec2. I was coming off of playing around with Ec2 for work and figured I would give it a shot. With the proposal filed I began the task of coding it out. After two weeks [...]]]></description>
			<content:encoded><![CDATA[<p>So about two weeks ago Wil Sinclair from Zend pinged me about creating an<a href="http://framework.zend.com/"> Zend Framework</a> API interface for Amazon Ec2. I was coming off of playing around with Ec2 for work and figured I would give it a shot. With the <a title="Zend_Service_Amazon_Ec2 Proposal" href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Service_Amazon_Ec2+-+Jon+Whitcraft">proposal filed</a> I began the task of coding it out. After two weeks of writing code I had a working interface for the Query API from Amazon.</p>
<p>I do have to say I learned a lot while doing the inital work and I&#8217;m happy that Wil pinged me to do it. If you want to check out the code currently it lives on <a href="http://github.com/sidhighwind/zend_service_amazon_ec2/tree/master">github</a> but it is on track to make the 1.8 release of Zend Framework.</p>
<p>Please leave a commet here or on the proposal for anything that I may have over looked or if you have any ideas on how I could make it better.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/03/27/zend-framework-ec2-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser Caching with Zend Framework</title>
		<link>http://bombdiggity.net/blog/2009/03/27/browser-caching-with-zend-framework/</link>
		<comments>http://bombdiggity.net/blog/2009/03/27/browser-caching-with-zend-framework/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 04:27:34 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=130</guid>
		<description><![CDATA[While watching the Zend Devzone RSS feed they posted a link to an article that talks about using the Etag Header to make ZF more cache friendly to the browser. While I was a little hesitant at first about this in my testing on my dev server it seems to have improved page performance in [...]]]></description>
			<content:encoded><![CDATA[<p>While watching the <a title="Zend Developer Zone" href="http://devzone.zend.com">Zend Devzone</a> RSS feed they posted a link to an article that talks about using the Etag Header to make ZF more cache friendly to the browser.</p>
<p><span id="more-130"></span>While I was a little hesitant at first about this in my testing on my dev server it seems to have improved page performance in the form of reduced bandwidth coming off the server which is always a good thing.</p>
<p>All that is required is to create and register a new front controller plugin. <a title="Zend Framework Browser Caching" href="http://smartycode.com/performance/zend-framework-browser-caching/">Click here for the most up to date code</a>.</p>
<p>I personally think it&#8217;s worth checking out if you run a zend framework based site as it&#8217;s only about ~35 lines of code at the time of writing.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/03/27/browser-caching-with-zend-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Splitting Tar Archives&#8230;</title>
		<link>http://bombdiggity.net/blog/2009/03/06/splitting-tar-archives/</link>
		<comments>http://bombdiggity.net/blog/2009/03/06/splitting-tar-archives/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 14:32:34 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=117</guid>
		<description><![CDATA[With working on deploying sites on Amazon EC2 we wanted to cut down on the time that it took to sync the sites from our seed servers to the new server. Our logical way to do this was to put a snapshot of the sites are Amazon S3 as a tgz file. Our sites are [...]]]></description>
			<content:encoded><![CDATA[<p>With working on deploying sites on Amazon EC2 we wanted to cut down on the time that it took to sync the sites from our seed servers to the new server.  Our logical way to do this was to put a snapshot of the sites are Amazon S3 as a tgz file.  Our sites are around 2gb each and while that is no problem to S3 as it max file size is 5gb but in interest of taking less time to upload each site and save on the chance of the file be corrupted on upload we decided to split the files.</p>
<h3><span id="more-117"></span>Splitting The Archive In To Pieces.</h3>
<pre class="brush: bash">
tar czPf - /dir_to_tar/ | split -b 200m -d - test_backup.tgz.
</pre>
<p>The code is very simple.  First well tell <a title="Gnu Tar man page" href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=3&amp;url=http%3A%2F%2Fwww.gnu.org%2Fsoftware%2Ftar%2Fmanual%2Ftar.html&amp;ei=ZTSxSd6YOIKyNM_l7cYE&amp;usg=AFQjCNEzGYgb_p-YLD-0JPJw5Lawxxdj9Q&amp;sig2=H5dSlNqZ1NKfNUKBGI1miw">tar</a> to create (c), gzip (g), absolute names (P) and force (f) and the path that we want in the archive.  It then gets piped to the <a title="Split man page" href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Funixhelp.ed.ac.uk%2FCGI%2Fman-cgi%3Fsplit&amp;ei=kjSxSdK7KI6-M8fQqMUE&amp;usg=AFQjCNFXY1GH8Ze_F4t8PDhjiObJFdcOTA&amp;sig2=k4MMPmg59miHMyjqaF7Ybw">split</a> command where split is told to make no larger than 200mb files (b) and to put numeric suffixes on the files (d).  Since we don&#8217;t have an input file the &#8211; represents the stream in from the tar command and we want it to output to test_backup.tgz. as the 00, 01, 02&#8230;. will be added to the end of that file.</p>
<p>After that is done running we just put the files on s3 using the <a title="s3Sync" href="http://s3sync.net/wiki">s3Sync</a> utility.</p>
<h3>Combining The Pieces In To One Archive:</h3>
<p>What happens when you want to extract the archive that you split.  You can just extract each file like you normally do.  This is how I do it but I&#8217;m always open for better ideas.</p>
<pre class="brush: bash">
cat test_backup.tgz.* &gt; test_backup.tgz
</pre>
<p>I must state that I&#8217;ve never had a split archive over 09 so i&#8217;m not sure how it will act when when you get more than that but like I said before if you have any better methods I&#8217;m open to new and better ways.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/03/06/splitting-tar-archives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
