<?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>Andrew Havens &#187; Zend Framework</title>
	<atom:link href="http://www.andrewhavens.com/tag/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andrewhavens.com</link>
	<description>Designer + Developer</description>
	<lastBuildDate>Tue, 29 Sep 2009 00:58:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to set up the Zend Framework Command Line Tool on Mac OS X</title>
		<link>http://www.andrewhavens.com/2009/09/how-to-set-up-the-zend-framework-command-line-tool-on-mac-os-x/</link>
		<comments>http://www.andrewhavens.com/2009/09/how-to-set-up-the-zend-framework-command-line-tool-on-mac-os-x/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 00:51:04 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Mac OS X 10.5]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.andrewhavens.com/?p=271</guid>
		<description><![CDATA[Now that the Zend Framework ships with a command line tool, it's even easier to get started programming with the Zend Framework. In this tutorial, I will show you how to set up the command line tool for use on Mac OS X.]]></description>
			<content:encoded><![CDATA[<p>Now that the Zend Framework ships with a command line tool, it&#8217;s even easier to get started programming with the Zend Framework. In this tutorial, I will show you how to set up the command line tool for use on Mac OS X.</p>
<p>First, <a title="Download the newest version of the Zend Framework" href="http://framework.zend.com/download/latest">download the newest version of the Zend Framework</a>. Both the full and minimal versions come with the Command Line tool. For this tutorial, I will be using version 1.9.3.</p>
<p>Once the folder has downloaded,  it will need to be extracted and moved somewhere you can find it. I will be moving this folder to the top level &#8220;/Library/&#8221; directory so it will be easy to type. Within the ZendFramework directory, there is a directory called bin. Within this directory is a file called zf.sh. This is the command line tool. So if you want to use the tool, open your Terminal application and navigate to the directory that you want your project created.</p>
<p>cd Sites</p>
<p>Then, type:</p>
<p>/Library/ZendFramework/bin/zf.sh create ProjectName</p>
<p>A new Zend Framework project will be created in the Sites directory with the name of ProjectName. But this is more than I&#8217;d rather type on a regular basis, so we should create an alias. To create an alias, type the following:</p>
<p>alias zf.sh=/Library/ZendFramework/bin/zf.sh</p>
<p>Now all we have to type is:</p>
<p>zf.sh create ProjectName</p>
<p>That&#8217;s it! By running this command in the command line, we have just created a new Zend Framework project in the current directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2009/09/how-to-set-up-the-zend-framework-command-line-tool-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started sending emails with the Zend Framework</title>
		<link>http://www.andrewhavens.com/2009/04/getting-started-sending-emails-with-the-zend-framework/</link>
		<comments>http://www.andrewhavens.com/2009/04/getting-started-sending-emails-with-the-zend-framework/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 05:20:55 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Mail]]></category>

		<guid isPermaLink="false">http://blog.andrewhavens.com/?p=135</guid>
		<description><![CDATA[I just found this tutorial on Sending Emails with the Zend Framework. This tutorial couldn&#8217;t get any simpler, and explains the process of using Zend_Mail in plain English &#8211; much easier to read than the Zend documentation! It starts out simple, and gets advanced. Also includes lots of examples!
]]></description>
			<content:encoded><![CDATA[<p>I just found this tutorial on <a href="http://www.techfounder.net/2008/07/18/handling-mail-and-mime-in-php-using-the-zend-framework/">Sending Emails with the Zend Framework</a>.<span id="more-135"></span> This tutorial couldn&#8217;t get any simpler, and explains the process of using Zend_Mail in plain English &#8211; much easier to read than the Zend documentation! It starts out simple, and gets advanced. Also includes lots of examples!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2009/04/getting-started-sending-emails-with-the-zend-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Zend_Test &#8211; Step 4: Testing your Zend Framework Controllers</title>
		<link>http://www.andrewhavens.com/2009/03/getting-started-with-zend_test-step-4-testing-your-zend-framework-controllers/</link>
		<comments>http://www.andrewhavens.com/2009/03/getting-started-with-zend_test-step-4-testing-your-zend-framework-controllers/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 18:56:26 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Test]]></category>

		<guid isPermaLink="false">http://blog.andrewhavens.com/?p=100</guid>
		<description><![CDATA[In part four of this "How to get started using Zend_Test" series, we will finally get to start testing our controllers!]]></description>
			<content:encoded><![CDATA[<p>Finally! We can start testing our Controllers! I will assume that your application has the same directory structure as the <a href="http://framework.zend.com/docs/quickstart">Zend Framework Quick Start tutorial</a>. Here&#8217;s an overview of what our directory structure will look like:</p>
<p>/myApp/application/controllers<br />
/myApp/tests/application/controllers</p>
<p>Our tests directory will mirror our application. We might also include a &#8216;library&#8217; directory in the tests directory so we can test our custom library components. For now, we&#8217;ll just keep it simple and test our controllers.</p>
<p>Now, we&#8217;ll create a file that will take care of auto loading. Create a new file called &#8216;loader.php&#8217; in you tests directory. All of our tests will require this file.</p>
<pre class="brush: php;">
&lt;?php

define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/'));

set_include_path( APPLICATION_PATH . '/../library' . PATH_SEPARATOR .
APPLICATION_PATH . '/models' . PATH_SEPARATOR .
APPLICATION_PATH . '/forms' . PATH_SEPARATOR .
get_include_path() );

require_once &quot;Zend/Loader.php&quot;;
Zend_Loader::registerAutoload();
</pre>
<p>Now let&#8217;s create a simple controller test. We&#8217;ll call this &#8216;IndexControllerTest.php&#8217; and put it in our tests/application/controllers directory. We just need to set the location of our bootstrap file. When <code>Zend_Test_PHPUnit_ControllerTestCase</code> constructs, it will look for the bootstrap file that we set here.</p>
<pre class="brush: php;">
&lt;?php

require_once '../loader.php';

class IndexControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
{
    public $bootstrap = '../../application/bootstrap.php';

    public function testIndexAction()
    {
    $this-&gt;dispatch('/index');
    $this-&gt;assertController('index');
    $this-&gt;assertAction('index');
    $this-&gt;assertResponseCode(200);
    }

}
</pre>
<p>That&#8217;s it! All we have to do is run this file with our PHPUnit command line interface (that we used in the last tutorial).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2009/03/getting-started-with-zend_test-step-4-testing-your-zend-framework-controllers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting started with Zend_Test &#8211; Step 3: Make sure PHPUnit is ready for testing</title>
		<link>http://www.andrewhavens.com/2009/03/getting-started-with-zend_test-step-3-make-sure-phpunit-is-ready-for-testing/</link>
		<comments>http://www.andrewhavens.com/2009/03/getting-started-with-zend_test-step-3-make-sure-phpunit-is-ready-for-testing/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 03:56:24 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Test]]></category>

		<guid isPermaLink="false">http://blog.andrewhavens.com/?p=95</guid>
		<description><![CDATA[Now that we&#8217;ve installed PEAR and PHPUnit, we can verify that PHPUnit is working correctly by writing our first test.
Since we installed PHPUnit through PEAR, and we have properly configured our include_path variable in our php.ini file, we can create our test files anywhere and PHP will know where to look to find PHPUnit. So [...]]]></description>
			<content:encoded><![CDATA[<p>Now that we&#8217;ve installed PEAR and PHPUnit, we can verify that PHPUnit is working correctly by writing our first test.</p>
<p>Since we installed PHPUnit through PEAR, and we have properly configured our include_path variable in our php.ini file, we can create our test files anywhere and PHP will know where to look to find PHPUnit. So I will create a new file in my /Users/andrew/Sites directory and call it FoobarTest.php with the following contents:</p>
<pre class="brush: php;">

&lt;?php

class FoobarTest extends PHPUnit_Framework_TestCase {

public function testFoobar() {
$this-&gt;fail();
}

}
</pre>
<p>By writing our function name to start with &#8220;test&#8221;, PHPUnit will know to run this function as a test. Typically you will want to name your test functions with names similar to the functions that you are testing, preceded by &#8220;test&#8221;.</p>
<p>Now let&#8217;s run our test!</p>
<pre class="brush: cpp;">

cd /Users/andrew/Sites
phpunit FoobarTest.php
</pre>
<p>You should see something like the following:</p>
<pre class="brush: cpp;">

PHPUnit 3.3.15 by Sebastian Bergmann.

F

Time: 0 seconds

There was 1 failure:

1) testFoobar(FoobarTest)
/Users/andrew/Sites/FoobarTest.php:6

FAILURES!
Tests: 1, Assertions: 0, Failures: 1.
</pre>
<p>Yay! It works! &#8220;But wait,&#8221; you say, &#8220;it says failures. Why is this a good thing?&#8221; Test-driven development is all about writing tests first. Remember this saying: Red, Green, Refactor. Start by writing the test, which will fail, of course, because you haven&#8217;t written any code yet! Then write the code until your test passes. Then STOP. There&#8217;s no need to keep writing. The code is finished. You know it works because you have the test to prove it. Tests are written to fail. Code is written to fix the tests.</p>
<p>However, this is a poor example of a test, so let&#8217;s write a real one.</p>
<p>Let&#8217;s start by thinking about what we want to build. How about we build a class called Foobar (to make things easy since we already have a FoobarTest) that has a function called getMessage(). However, getMessage() doesn&#8217;t return a string like we might expect, it returns an array. A test for that might look like the following. Also note that our function name is a little more verbose. Tests can serve as a sort of documentation. Think of underscores as commas and name your functions to explain what happens in the test.</p>
<pre class="brush: php;">

&lt;?php

class FoobarTest extends PHPUnit_Framework_TestCase {

public function testGetMessage_ReturnsAnArray() {
$foobar = new Foobar();
$message = $foobar-&gt;getMessage();
$this-&gt;assertTrue(is_array($message));
}

}
</pre>
<p>Now if we run our test again, we should see the following:</p>
<pre class="brush: cpp;">

PHPUnit 3.3.15 by Sebastian Bergmann.

PHP Fatal error:  Class 'Foobar' not found in /Users/andrew/Sites/FoobarTest.php on line 6

Fatal error: Class 'Foobar' not found in /Users/andrew/Sites/FoobarTest.php on line 6
</pre>
<p>Now we have an error that says PHPUnit can&#8217;t find our Foobar class. Well that&#8217;s because we haven&#8217;t created it yet! So create a new file in the same directory as our test, name it Foobar.php, and give it the following contents:</p>
<pre class="brush: php;">

&lt;?php

class Foobar {

}
</pre>
<p>Next, let&#8217;s update our test so it knows where to find our new class:</p>
<pre class="brush: php;">

&lt;?php

require_once('Foobar.php');

class FoobarTest extends PHPUnit_Framework_TestCase {

//...
</pre>
<p>That&#8217;s all we need to do. Remember, all we are trying to do is get the test to pass. Right now the test tells us that we need to create a Foobar class so that&#8217;s what we&#8217;ve done. Let&#8217;s run our test again and see what it says.</p>
<pre class="brush: cpp;">

HPUnit 3.3.15 by Sebastian Bergmann.

PHP Fatal error:  Call to undefined method Foobar::getMessage() in /Users/andrew/Sites/FoobarTest.php on line 9

Fatal error: Call to undefined method Foobar::getMessage() in /Users/andrew/Sites/FoobarTest.php on line 9
</pre>
<p>Hooray! We no longer have the same message as before. Now we need to create our getMessage() function in our Foobar class.</p>
<pre class="brush: php;">

&lt;?php

class Foobar {

public function getMessage() {

}

}
</pre>
<p>Run our test again and we should see another change:</p>
<pre class="brush: cpp;">

PHPUnit 3.3.15 by Sebastian Bergmann.

F

Time: 0 seconds

There was 1 failure:

1) testGetMessage_ReturnsAnArray(FoobarTest)
Failed asserting that &lt;boolean:false&gt; is true.
/Users/andrew/Sites/FoobarTest.php:10

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
</pre>
<p>getMessage() doesn&#8217;t return anything, so let&#8217;s change that:</p>
<pre class="brush: php;">

&lt;?php

class Foobar {

public function getMessage() {
return array();
}

}
</pre>
<p>That should be enough for us to get our test to pass. Let&#8217;s see if it works.</p>
<pre class="brush: cpp;">

PHPUnit 3.3.15 by Sebastian Bergmann.

.

Time: 0 seconds

OK (1 test, 1 assertion)
</pre>
<p>It works! We&#8217;re done. I think you get the picture. Let&#8217;s move on to some actual controller tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2009/03/getting-started-with-zend_test-step-3-make-sure-phpunit-is-ready-for-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Zend_Test &#8211; Step 1: Setting up PEAR on Mac OS X 10.5 (Leopard)</title>
		<link>http://www.andrewhavens.com/2009/03/setting-up-pear-on-mac-os-x-105-leopard/</link>
		<comments>http://www.andrewhavens.com/2009/03/setting-up-pear-on-mac-os-x-105-leopard/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 12:55:57 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Mac OS X 10.5]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Test]]></category>

		<guid isPermaLink="false">http://blog.andrewhavens.com/?p=70</guid>
		<description><![CDATA[Question: How do I get started using Zend_Test? What is the process necessary to start using Zend_Test for testing my Zend Framework application?

Answer: Zend_Test extends PHPUnit. Therefore, we need to start by installing PHPUnit. The easiest way to install PHPUnit is by installing PEAR. Therefore...you get the idea. We need PEAR. I'll walk you through the process I took to install PEAR on Mac OS X 10.5 (Leopard).]]></description>
			<content:encoded><![CDATA[<p><strong>Question: </strong>How do I get started using Zend_Test? What is the process necessary to start using Zend_Test for testing my Zend Framework application?</p>
<p><strong>Answer:</strong> Zend_Test extends PHPUnit. Therefore, we need to start by installing PHPUnit. The easiest way to install PHPUnit is by installing PEAR. Therefore&#8230;you get the idea. We need PEAR. I&#8217;ll walk you through the process I took to install PEAR on Mac OS X 10.5 (Leopard).</p>
<p>Open up your trusty Terminal application by going to /Applications/Utilities.</p>
<p>First, we&#8217;ll switch over to a user that has enough permission to do anything, our super user:</p>
<pre class="brush: sql;">sudo su -</pre>
<p>Next, we&#8217;ll change directories to /usr/local by typing:</p>
<pre class="brush: cpp;">cd /usr/local</pre>
<p>Then, we&#8217;ll download and run the pear installer:</p>
<pre class="brush: sql;">curl http://pear.php.net/go-pear | php</pre>
<p>Press enter to begin the installation process. Press enter again to use no HTTP proxy. You should then see a screen with seven installation locations. The first one should say /usr/local. If this is not the case, press 1 and enter. Type /usr/local and press enter again. Now we should all be on the same page.</p>
<p>Press enter to continue with the installation. When asked, you can accept the additional PEAR packages by typing Y and pressing enter.</p>
<p>The installer will run through the installation, downloading and installing the necessary packages. Eventually the installation will finish. You may receive a warning that your php.ini file does not contain the PEAR PHP directory we specified (/usr/local/PEAR). This is okay. We will be editing this file in the next step. So simply type n and press enter. Press enter againto finish the installation. PEAR should now be installed and ready to use. Let&#8217;s see if it works by typing:</p>
<pre class="brush: sql;">pear version</pre>
<p>We should see a few lines including the version of PEAR we just installed, PHP version, etc. But wait, we&#8217;re not done yet! We still need to edit our php.ini file. If you don&#8217;t have a php.ini, you&#8217;ll need to create one by copying the php.ini.default:</p>
<pre class="brush: css;">cp /etc/php.ini.default /etc/php.ini</pre>
<p>Now were ready to edit our php.ini file. Open the file with Pico (or any other text editor):</p>
<pre class="brush: sql;">pico /etc/php.ini</pre>
<p>Scroll down about 1/3 and find the line that says:</p>
<pre class="brush: sql;">;include_path = “.:/php/includes”</pre>
<p>The semicolon at the beginning of the line means it&#8217;s commented out. Replace this line with the following:</p>
<pre class="brush: cpp;">include_path = “.:/usr/local/PEAR”</pre>
<p>Press Control + O, then enter, to save your changes. Then, Control + X to exit Pico. Restart your Apache server and you should be good to go!</p>
<pre class="brush: sql;">apachectl restart</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2009/03/setting-up-pear-on-mac-os-x-105-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up logging with Firebug and FirePHP in Zend Framework 1.7.5</title>
		<link>http://www.andrewhavens.com/2009/02/setting-up-logging-with-firephpfirebug-in-zend-framework-175/</link>
		<comments>http://www.andrewhavens.com/2009/02/setting-up-logging-with-firephpfirebug-in-zend-framework-175/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 10:40:54 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[FireBug]]></category>
		<category><![CDATA[FirePHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.andrewhavens.com/?p=55</guid>
		<description><![CDATA[Question: How do I set up logging with FirePHP in Zend Framework?
Answer:

Step 1: Make sure you have Zend Framework 1.6+
Step 2: Install both Firebug and FirePHP extensions for Firefox.
Step 3: Make sure you have Console and Net enabled.\
Step 4: Set up Zend Log in your bootstrap file:



$writer = new Zend_Log_Writer_Firebug();
$logger = new Zend_Log($writer);

You can now [...]]]></description>
			<content:encoded><![CDATA[<p>Question: How do I set up logging with FirePHP in Zend Framework?</p>
<p>Answer:</p>
<ul>
<li>Step 1: Make sure you have Zend Framework 1.6+</li>
<li>Step 2: Install both Firebug and FirePHP extensions for Firefox.</li>
<li>Step 3: Make sure you have Console and Net enabled.\</li>
<li>Step 4: Set up Zend Log in your bootstrap file:</li>
</ul>
<pre class="brush: php;">

$writer = new Zend_Log_Writer_Firebug();
$logger = new Zend_Log($writer);
</pre>
<p>You can now send a log message to Firebug with the following code (in your bootstrap file):</p>
<pre class="brush: php;">

$logger-&gt;log('Hello World!', Zend_Log::DEBUG);
</pre>
<p>If you wanted to use the logger outside of your bootstrap file, you can set $logger in the session:</p>
<pre class="brush: php;">

Zend_Registry::set('logger', $logger);

$logger = Zend_Registry::get('logger');
$logger-&gt;log('This is my log message', Zend_Log::INFO);
</pre>
<p>However, when I want to debug, I don&#8217;t want a bunch of lines or characters when I just want to output something to the logger. So I prefer to make a function in my bootstrap file that can be used throughout my application:</p>
<pre class="brush: php;">

$writer = new Zend_Log_Writer_Firebug();
$logger = new Zend_Log($writer);
Zend_Registry::set('logger', $logger);

function debug($message) {
$logger = Zend_Registry::get('logger');
$logger-&gt;debug($message);
}
</pre>
<p>That way, in my I can use by simply calling:</p>
<pre class="brush: php;">

debug('hello!');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2009/02/setting-up-logging-with-firephpfirebug-in-zend-framework-175/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There&#8217;s a new IDE in town!</title>
		<link>http://www.andrewhavens.com/2009/02/theres-a-new-ide-in-town/</link>
		<comments>http://www.andrewhavens.com/2009/02/theres-a-new-ide-in-town/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 09:06:05 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Product Reviews]]></category>
		<category><![CDATA[Espresso]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.andrewhavens.com/?p=51</guid>
		<description><![CDATA[Now that I&#8217;m getting into Object Oriented PHP programming, and the Zend Framework, I need an editor that can keep up with the complexity of my projects. Integrated Development Environments can make developing websites go so much faster and more smoothly. I&#8217;ve been using Aptana for all of my PHP projects, but it just feels [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;m getting into Object Oriented PHP programming, and the <a title="Zend Framework" href="http://framework.zend.com">Zend Framework</a>, I need an editor that can keep up with the complexity of my projects. Integrated Development Environments can make developing websites go so much faster and more smoothly. I&#8217;ve been using <a title="Aptana" href="http://www.aptana.com/php">Aptana</a> for all of my PHP projects, but it just feels bloated at times. Sometimes I just want a simple text editor and some FTP software. I decided to try <a title="TextMate" href="http://macromates.com/">TextMate</a>, the glorified Mac OS X text editor, and was relatively impressed but really wished there was some sort of integrated FTP functionality. At work, I&#8217;ve been using <a title="Subversion" href="http://subversion.tigris.org/">Subversion</a> to keep files in sync with my co-workers. I really like the &#8220;synchronize&#8221; feature of using Subversion, and really wish I could have some feature like that with FTP.</p>
<p>Well I recently came across an application called <a title="Espresso" href="http://macrabbit.com/espresso/">Espresso</a>. It&#8217;s in public beta right now, but so far, I am very impressed. The software is so simple and intuitive. I don&#8217;t know if you could technically call it an IDE, but it sure covers most of the features I use most of the time. It feels like TextMate, only simpler, with a bunch of integrated features like FTP, code completion, syntax highlighting, outline view, file search, live preview&#8230;the list goes on. My personal favorite is the &#8220;Publish&#8221; feature. This is like a mix of FTP and Subversion, making it possible to &#8220;synchronize&#8221; your local changes with the current state of your remote files. Again, this feature is so intuitive. It made it really easy to see which files I had changed, and allows me upload all my changes in a single click.</p>
<p>Another cool feature, is the ability to add extensions. These extensions are called Sugars (which you add to your Espresso. Clever, eh?). I can&#8217;t wait to see what sorts of Sugars are in the works!</p>
<p>I would definitely recommend checking out Espresso. Especially if you&#8217;re getting started with PHP programming, or want to get better at building websites. This may become a valuable tool that will help you learn faster and get things done easier.</p>
<p><strong>Update:</strong> <a href="http://macrabbit.com/espresso/">Espresso 1.0 has just been released!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2009/02/theres-a-new-ide-in-town/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Form U.S. state drop down select menu</title>
		<link>http://www.andrewhavens.com/2008/11/zend-form-us-state-drop-down-select-menu/</link>
		<comments>http://www.andrewhavens.com/2008/11/zend-form-us-state-drop-down-select-menu/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 20:52:00 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Form]]></category>

		<guid isPermaLink="false">http://blog.amperactive.com/?p=35</guid>
		<description><![CDATA[Question: Is there a Zend Form state drop down select menu already created that I could just add to my form?
Answer: No. At least I don&#8217;t think so. Zend_Form doesn&#8217;t have any Zend_Form_Element_StateSelect or anything like that. The only way I found was to pass in an array of states. Feel free to copy and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Question:</strong> Is there a Zend Form state drop down select menu already created that I could just add to my form?</p>
<p><strong>Answer: </strong>No. At least I don&#8217;t think so. Zend_Form doesn&#8217;t have any Zend_Form_Element_StateSelect or anything like that. The only way I found was to pass in an array of states. Feel free to copy and paste my code.</p>
<pre class="brush: php;">

$states = array('AL'=&gt;'Alabama','AK'=&gt;'Alaska','AZ'=&gt;'Arizona','AR'=&gt;'Arkansas','CA'=&gt;'California','CO'=&gt;'Colorado','CT'=&gt;'Connecticut','DE'=&gt;'Delaware','DC'=&gt;'District Of Columbia','FL'=&gt;'Florida','GA'=&gt;'Georgia','HI'=&gt;'Hawaii','ID'=&gt;'Idaho','IL'=&gt;'Illinois', 'IN'=&gt;'Indiana', 'IA'=&gt;'Iowa',  'KS'=&gt;'Kansas','KY'=&gt;'Kentucky','LA'=&gt;'Louisiana','ME'=&gt;'Maine','MD'=&gt;'Maryland', 'MA'=&gt;'Massachusetts','MI'=&gt;'Michigan','MN'=&gt;'Minnesota','MS'=&gt;'Mississippi','MO'=&gt;'Missouri','MT'=&gt;'Montana','NE'=&gt;'Nebraska','NV'=&gt;'Nevada','NH'=&gt;'New Hampshire','NJ'=&gt;'New Jersey','NM'=&gt;'New Mexico','NY'=&gt;'New York','NC'=&gt;'North Carolina','ND'=&gt;'North Dakota','OH'=&gt;'Ohio','OK'=&gt;'Oklahoma', 'OR'=&gt;'Oregon','PA'=&gt;'Pennsylvania','RI'=&gt;'Rhode Island','SC'=&gt;'South Carolina','SD'=&gt;'South Dakota','TN'=&gt;'Tennessee','TX'=&gt;'Texas','UT'=&gt;'Utah','VT'=&gt;'Vermont','VA'=&gt;'Virginia','WA'=&gt;'Washington','WV'=&gt;'West Virginia','WI'=&gt;'Wisconsin','WY'=&gt;'Wyoming');

$state = new Zend_Form_Element_Select('state');
$state-&gt;setLabel('State')
-&gt;setMultiOptions($states)
-&gt;setRegisterInArrayValidator(false);
$form-&gt;addElement($state);
</pre>
<p>Here&#8217;s a link to a helpful blog post with common PHP arrays: <a href="http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewhavens.com/2008/11/zend-form-us-state-drop-down-select-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
