<?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>Shane Stillwell</title>
	<atom:link href="http://www.shanestillwell.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shanestillwell.com</link>
	<description>Craftmaster of Code. Avid Scouter.</description>
	<lastBuildDate>Tue, 15 May 2012 14:29:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Problems using VirtualBox to access sites on the net</title>
		<link>http://www.shanestillwell.com/index.php/2012/05/15/problems-using-virtualbox-to-access-sites-on-the-net/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=problems-using-virtualbox-to-access-sites-on-the-net</link>
		<comments>http://www.shanestillwell.com/index.php/2012/05/15/problems-using-virtualbox-to-access-sites-on-the-net/#comments</comments>
		<pubDate>Tue, 15 May 2012 14:29:42 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/?p=328</guid>
		<description><![CDATA[Background I&#8217;ve set up my VirtualBox to access my localhost (OSX) by following instructions similar to this post, using NAT. Everything was great until I started testing the staging site on the net (not my localhost). Most things worked fine, but uploading larger images would just fail in IE. Uploads worked fine on the localhost,...  <a href="http://www.shanestillwell.com/index.php/2012/05/15/problems-using-virtualbox-to-access-sites-on-the-net/" class="more-link" title="Read Problems using VirtualBox to access sites on the net">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>I&#8217;ve set up my VirtualBox to access my localhost (OSX) by following instructions similar to <a href="http://sandhillcreative.com/kb/2009/11/19/accessing-your-local-mamp-dev-environment-from-virtualbox/comment-page-1/#comment-194">this post</a>, using NAT. Everything was great until I started testing the staging site on the net (not my localhost). Most things worked fine, but uploading larger images would just fail in IE. Uploads worked fine on the localhost, but failed on stage, so I initially thought it was a configuration on the staging server webserver.</p>
<p>&nbsp;</p>
<a href="http://www.shanestillwell.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-15-at-8.59.58-AM.png"><img class="size-full wp-image-329 alignright" title="Screen Shot 2012-05-15 at 8.59.58 AM" src="http://www.shanestillwell.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-15-at-8.59.58-AM.png" alt="" width="589" height="486" /></a>
<h3>Solution</h3>
<p>The problem was the network adapter for VirtualBox. I was using NAT as the network adapter setting. This was the cause of the issue.</p>
<p>&nbsp;</p>
<p>My VirtualBox was not receiving the<strong> ICMP Fragmentation Required</strong> bit from the server. That is why larger images would hang, but smaller images would go through fine.</p>
<p>Now the solution is to change the network adapter back and forth between NAT and Bridged when I notice funkiness on remote sites.</p>
<h3></h3>
<h3>References</h3>
<p>http://sandhillcreative.com/kb/2009/11/19/accessing-your-local-mamp-dev-environment-from-virtualbox/comment-page-1/#comment-194</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2012/05/15/problems-using-virtualbox-to-access-sites-on-the-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVC for Appcelerator Titanium (understanding Tweetanium)</title>
		<link>http://www.shanestillwell.com/index.php/2012/03/29/mvc-for-appcelerator-titanium-understanding-tweetanium/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mvc-for-appcelerator-titanium-understanding-tweetanium</link>
		<comments>http://www.shanestillwell.com/index.php/2012/03/29/mvc-for-appcelerator-titanium-understanding-tweetanium/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 12:31:46 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/?p=308</guid>
		<description><![CDATA[Tweetianium builds it&#8217;s own namespace that it operates under rather than calling code that looks like the following to open up a new window. Ti.UI.createWindow&#40;&#123;url:'somefile.js', importantdata: mydata &#125;&#41;; This essentially uses different files to open new windows, it&#8217;s managable to point, but I had trouble with not having some sort of global variables I could...  <a href="http://www.shanestillwell.com/index.php/2012/03/29/mvc-for-appcelerator-titanium-understanding-tweetanium/" class="more-link" title="Read MVC for Appcelerator Titanium (understanding Tweetanium)">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/appcelerator-titans/tweetanium">Tweetianium</a> builds it&#8217;s own namespace that it operates under rather than calling code that looks like the following to open up a new window.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Ti.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createWindow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">'somefile.js'</span><span style="color: #339933;">,</span> importantdata<span style="color: #339933;">:</span> mydata <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This essentially uses different files to open new windows, it&#8217;s managable to point, but I had trouble with not having some sort of global variables I could call on.</p>
<h2>In walks <a href="https://github.com/appcelerator-titans/tweetanium">Tweetanium</a> and <a href="https://github.com/krawaller/struct">Struct</a></h2>
<p>These keep the entirety of the code in basically a namespaced object. I have to admit, it took me 2-3 times looking over the code to really get it. Let me try to help.</p>
<h2>app.js</h2>
<a href="http://www.shanestillwell.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-27-at-9.10.10-AM.png"><img src="http://www.shanestillwell.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-27-at-9.10.10-AM.png" alt="" title="app.js" class="alignright size-full wp-image-310" /></a>
<ol>
<li>This is the app.js file</li>
<li>We are including the main include file. As you&#8217;ll see, files add new methods and properties to the global object, then include other sub files that will add more properties and methods.</li>
<li><em>tt.ui.createApplicationWindow()</em> creates a Titanium window and is passed to the tt.app.mainWindow property. Then it&#8217;s opened with <em>open()</em></li>
</ol>
<h2>/tweetanium/tweetanium.js</h2>
<a href="http://www.shanestillwell.com/wp-content/uploads/2012/03/tweetanium2.png"><img src="http://www.shanestillwell.com/wp-content/uploads/2012/03/tweetanium2.png" alt="" title="tweetanium2" class="alignright size-full wp-image-317" /></a>
<ol>
<li>This is the <em>/tweetanium/tweetanium.js</em> file. The initial file in our application.</li>
<li>Here we are creating the namespace <em>tt</em>, all properties and methods will extend this object.</li>
<li>This is an anonymous self executing function that holds some initial methods. <em>tt.app</em> is used to hold various properties such as <em>currentWindow</em>.</li>
<li>Lastly we include sub files. <strong>Notice</strong> how the subfiles are named like their folders. So you have <em>/tweetanium/ui/ui.js</em> and <em>/tweetanium/model/model.js</em>. You could name them anything, but in those respective files they include all the files in that folder, let&#8217;s take a look.</li>
</ol>
<h2>/tweetanium/ui/ui.js</h2>
<a href="http://www.shanestillwell.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-29-at-7.14.25-AM.png"><img src="http://www.shanestillwell.com/wp-content/uploads/2012/03/Screen-Shot-2012-03-29-at-7.14.25-AM.png" alt="" title="Screen Shot 2012-03-29 at 7.14.25 AM" class="alignright size-full wp-image-320" /></a>
<ol>
<li>Here we are in the <em>/tweetanium/ui/ui.js</em> file.</li>
<li>We now create a subobject called <em>tt.ui</em> that will hold all the user interface properties and methods. Then we can add any utilities used by various interface functions</li>
<li>Now we include all the user interface files. There are some that are Views, and others that are Windows. So if you have a View shared by several Windows, you can split that out into it&#8217;s own file. Notice that we include all the rest of the files in that <em>ui</em> directory.
</ol>
<h2>There you go</h2>
<p>Using this same waterfall approach to building the namespace, you can make the whole Titanium app in a surprisingly short amount of time. Once you get structure to your files, it&#8217;s easier to stay organized.</p>
<p>Some further files to investigate would be the <em>/tweetanium/ui/styles.js</em> and the <em>/tweetanium/ui/ApplicationWindow</em>, noticing that most windows have a corresponding <em>create****</em> method that will create the object and had it back to the caller.</p>
<h2>Resources:</h2>
<ul>
<li><a href="https://github.com/appcelerator-titans/tweetanium">https://github.com/appcelerator-titans/tweetanium</a></li>
<li><a href="http://blog.krawaller.se/titanium-application-structure-learning-from ">http://blog.krawaller.se/titanium-application-structure-learning-from </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2012/03/29/mvc-for-appcelerator-titanium-understanding-tweetanium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MongoDB &#8220;Couldn&#8217;t Send Query&#8221;</title>
		<link>http://www.shanestillwell.com/index.php/2012/03/18/mongodb-couldnt-send-query/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mongodb-couldnt-send-query</link>
		<comments>http://www.shanestillwell.com/index.php/2012/03/18/mongodb-couldnt-send-query/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 18:43:55 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/?p=305</guid>
		<description><![CDATA[I would get random error messages from my MongoDB based app GoScouter of couldn't send query It was random and quite frustration. I was not able to find anything definite online about such error, but that it might be a bug in the PHP MongoDB Driver. I was using version 1.2.7, so I did a...  <a href="http://www.shanestillwell.com/index.php/2012/03/18/mongodb-couldnt-send-query/" class="more-link" title="Read MongoDB &#8220;Couldn&#8217;t Send Query&#8221;">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I would get random error messages from my MongoDB based app <a href="http://goscouter.com">GoScouter</a> of</p>
<pre>couldn't send query</pre>
<p>It was random and quite frustration. I was not able to find anything definite online about such error, but that it might be a bug in the PHP MongoDB Driver. I was using version 1.2.7, so I did a <code>pecl upgrade mongo</code> on the web server (using PHP-FPM) and this seemed to fix the problem. Now I&#8217;m running version 1.2.9 and I have not received a <code>Couldn't Send Query</code> error yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2012/03/18/mongodb-couldnt-send-query/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Doctrine ODM MongoDB using an OR query</title>
		<link>http://www.shanestillwell.com/index.php/2012/03/09/doctrine-odm-mongodb-using-an-or-query/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=doctrine-odm-mongodb-using-an-or-query</link>
		<comments>http://www.shanestillwell.com/index.php/2012/03/09/doctrine-odm-mongodb-using-an-or-query/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 01:13:53 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/?p=299</guid>
		<description><![CDATA[This is no where in the documentation that I could find on Doctrine&#8217;s site. I wanted to do search with a criteria of OR. For example, in psuedo code Find all Events where (first_name like &#8216;Jim&#8217;) OR (last_name like &#8216;Jim&#8217;) OR (title like &#8216;Jim) I searched, but the keyword of &#8220;OR&#8221; with Google doesn&#8217;t yield...  <a href="http://www.shanestillwell.com/index.php/2012/03/09/doctrine-odm-mongodb-using-an-or-query/" class="more-link" title="Read Doctrine ODM MongoDB using an OR query">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>This is no where in the documentation that I could find on Doctrine&#8217;s site. I wanted to do search with a criteria of OR.</p>
<p>For example, in psuedo code</p>
<p>Find all Events where (first_name like &#8216;Jim&#8217;) OR (last_name like &#8216;Jim&#8217;) OR (title like &#8216;Jim)</p>
<p>I searched, but the keyword of &#8220;OR&#8221; with Google doesn&#8217;t yield very good results.</p>
<p>Thanks to Jamie Sutherland at<br />
<a href="http://www.jamiesutherland.com/2011/07/01/doctrine-2-odm-querybuilder-addor/">http://www.jamiesutherland.com/2011/07/01/doctrine-2-odm-querybuilder-addor/</a></p>
<p>Here is how it&#8217;s done</p>
<script>document.write('<link rel="stylesheet" href="https://gist.github.com/stylesheets/gist/embed.css"/>')

document.write('<div id=\"gist-2004424\" class=\"gist\">\n\n        <div class=\"gist-file\">\n          <div class=\"gist-data gist-syntax\">\n              <div class=\"gist-highlight\"><pre><div class=\'line\' id=\'LC1\'><span class=\"cp\">&lt;?php<\/span><\/div><div class=\'line\' id=\'LC2\'><br/><\/div><div class=\'line\' id=\'LC3\'><span class=\"nv\">$result<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$this<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">_dm<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">createQueryBuilder<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;HOD\\Model\\Person&#39;<\/span><span class=\"p\">);<\/span><\/div><div class=\'line\' id=\'LC4\'><span class=\"nv\">$result<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">addOr<\/span><span class=\"p\">(<\/span><span class=\"nv\">$result<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">expr<\/span><span class=\"p\">()<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">field<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;firstName&#39;<\/span><span class=\"p\">)<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">equals<\/span><span class=\"p\">(<\/span><span class=\"k\">new<\/span> <span class=\"nx\">\\MongoRegex<\/span><span class=\"p\">(<\/span><span class=\"s2\">&quot;/^<\/span><span class=\"si\">{<\/span><span class=\"nv\">$query<\/span><span class=\"si\">}<\/span><span class=\"s2\">/i&quot;<\/span><span class=\"p\">)))<\/span><\/div><div class=\'line\' id=\'LC5\'>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"o\">-&gt;<\/span><span class=\"na\">addOr<\/span><span class=\"p\">(<\/span><span class=\"nv\">$result<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">expr<\/span><span class=\"p\">()<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">field<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;lastName&#39;<\/span><span class=\"p\">)<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">equals<\/span><span class=\"p\">(<\/span><span class=\"k\">new<\/span> <span class=\"nx\">\\MongoRegex<\/span><span class=\"p\">(<\/span><span class=\"s2\">&quot;/^<\/span><span class=\"si\">{<\/span><span class=\"nv\">$query<\/span><span class=\"si\">}<\/span><span class=\"s2\">/i&quot;<\/span><span class=\"p\">)));<\/span><\/div><div class=\'line\' id=\'LC6\'><span class=\"k\">return<\/span> <span class=\"nv\">$result<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">getQuery<\/span><span class=\"p\">()<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">execute<\/span><span class=\"p\">();<\/span><\/div><\/pre><\/div>\n          <\/div>\n\n          <div class=\"gist-meta\">\n            <a href=\"https://gist.github.com/raw/2004424/a1a502b9af13d5f6ff871b37dcc365e2710b8993/doctrine_or_query.php\" style=\"float:right;\">view raw<\/a>\n            <a href=\"https://gist.github.com/2004424#file_doctrine_or_query.php\" style=\"float:right;margin-right:10px;color:#666\">doctrine_or_query.php<\/a>\n            <a href=\"https://gist.github.com/2004424\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n          <\/div>\n        <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>&lt;?php

$result = $this-&gt;_dm-&gt;createQueryBuilder('HOD\Model\Person');
$result-&gt;addOr($result-&gt;expr()-&gt;field('firstName')-&gt;equals(new \MongoRegex(&quot;/^{$query}/i&quot;)))
    -&gt;addOr($result-&gt;expr()-&gt;field('lastName')-&gt;equals(new \MongoRegex(&quot;/^{$query}/i&quot;)));
return $result-&gt;getQuery()-&gt;execute();</pre></code></noscript></div>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2012/03/09/doctrine-odm-mongodb-using-an-or-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performing a &#8216;like&#8217; match in MongoDB</title>
		<link>http://www.shanestillwell.com/index.php/2012/02/02/performing-a-like-match-in-mongodb/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=performing-a-like-match-in-mongodb</link>
		<comments>http://www.shanestillwell.com/index.php/2012/02/02/performing-a-like-match-in-mongodb/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 17:31:45 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Doctrine2]]></category>
		<category><![CDATA[MongoDB]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/?p=290</guid>
		<description><![CDATA[So looking through the Doctrine ODM docs on Query Building, I didn&#8217;t see anything that lent itself to a like query such as that is found in MySQL. There isn&#8217;t a like, option, but using Regular Expressions will work just fine for me. $queryBuilder-&#62;field&#40;'title'&#41;-&#62;equals&#40;new \MongoRegex&#40;'/keyword/i'&#41;&#41;; That will perform a case-insensative query for the term &#8216;keyword&#8216;...  <a href="http://www.shanestillwell.com/index.php/2012/02/02/performing-a-like-match-in-mongodb/" class="more-link" title="Read Performing a &#8216;like&#8217; match in MongoDB">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>So looking through the <a href="http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html">Doctrine ODM docs on Query Building</a>, I didn&#8217;t see anything that lent itself to a <em>like</em> query such as that is found in MySQL. There isn&#8217;t a <em>like</em>, option, but using <strong>Regular Expressions</strong> will work just fine for me.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$queryBuilder</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">field</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> \MongoRegex<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/keyword/i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That will perform a case-insensative query for the term &#8216;<em>keyword</em>&#8216; in the field &#8216;<em>title</em>&#8216;</p>
<p>Resources<br />
<a href="http://groups.google.com/group/doctrine-user/browse_thread/thread/daadb4e3030c196c ">http://groups.google.com/group/doctrine-user/browse_thread/thread/daadb4e3030c196c </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2012/02/02/performing-a-like-match-in-mongodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Zend Framework &amp; Doctrine 2 Design</title>
		<link>http://www.shanestillwell.com/index.php/2012/01/30/thoughts-on-zend-framework-doctrine-2-design/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=thoughts-on-zend-framework-doctrine-2-design</link>
		<comments>http://www.shanestillwell.com/index.php/2012/01/30/thoughts-on-zend-framework-doctrine-2-design/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 19:30:37 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Doctrine2]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/?p=272</guid>
		<description><![CDATA[I usually structure my Zend Framework projects like the image on the right. This comes almost straight from the ZF documentation for recommended project structures http://framework.zend.com/manual/en/project-structure.project.html I&#8217;ve been stressing using PHPunit more and more in my projects and endevour to include tests for all my classes. When you are connected to a DB, it&#8217;s harder to...  <a href="http://www.shanestillwell.com/index.php/2012/01/30/thoughts-on-zend-framework-doctrine-2-design/" class="more-link" title="Read Thoughts on Zend Framework &#038; Doctrine 2 Design">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.shanestillwell.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-30-at-12.47.02-PM.png"><img class="alignright size-medium wp-image-273" title="Zend Framework Directory Structure" src="http://www.shanestillwell.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-30-at-12.47.02-PM-225x300.png" alt="" width="225" height="300" /></a>I usually structure my Zend Framework projects like the image on the right. This comes almost straight from the ZF documentation for recommended project structures <a href="http://framework.zend.com/manual/en/project-structure.project.html">http://framework.zend.com/manual/en/project-structure.project.html</a></p>
<p>I&#8217;ve been stressing using PHPunit more and more in my projects and endevour to include tests for all my classes. When you are connected to a DB, it&#8217;s harder to test, but with the help of the Doctrine2 workflow, I think I&#8217;ve found a nice way to keep DB updates out of my Unit Tests.</p>
<h2>How to test without touching a DB?</h2>
<p>First, you need to have really skinny controllers. What does that mean? Well, controllers should really only do a few things.</p>
<ul>
<li>Work with both the <em>Request</em> and the <em>Response</em></li>
<li>Instantiate forms and populate them with data</li>
<li>Talk to the <em>Views</em></li>
<li>Hand everything else off to a class in the <em>services</em> directory</li>
</ul>
<div>Did you catch that last part? Most of the heavy lifting you&#8217;re tempted to put in the controller should be shifted out to a services class (e.g. Application_Service_Email). That way you can keep your controllers nice and lean.</div>
<div>Now the services classes will be the ones doing instantiating classes to get the work done.</div>
<h2>How does Doctrine fit into this?</h2>
<p>Glad you asked. Doctrine uses a particular workflow when writing out values to the DB (MySql, Mongo, Postgres).</p>
<p>First you have to tell Doctrine to persist your object, in our case here the $user object. This is done using the DocumentManager ($dm). How do you get ahold of $dm?  That&#8217;s another lesson soon to come.</p>
<p><em>$dm-&gt;persist($user);</em></p>
<p>You can do this to multiple objects and Doctrine keeps them in a queue. Then you have to write your changes to the DB. We do this with the flush command</p>
<p><em>$dm-&gt;flush();</em></p>
<p>That physically goes out to the DB and creates/updates/deletes all the objects in the queue. A very efficient way to work with the DB.</p>
<h2>That&#8217;s great, but how does this fit into Unit Testing?</h2>
<p>Simple. We persist in the Service class and flush in the controller. Here&#8217;s how this would look in the code? I thought you&#8217;d never ask.</p>
<script>document.write('<link rel="stylesheet" href="https://gist.github.com/stylesheets/gist/embed.css"/>')

document.write('<div id=\"gist-1706078\" class=\"gist\">\n\n        <div class=\"gist-file\">\n          <div class=\"gist-data gist-syntax\">\n              <div class=\"gist-highlight\"><pre><div class=\'line\' id=\'LC1\'><span class=\"cp\">&lt;?php<\/span> <\/div><div class=\'line\' id=\'LC2\'><br/><\/div><div class=\'line\' id=\'LC3\'><span class=\"k\">class<\/span> <span class=\"nc\">Application_Service_User<\/span> <span class=\"k\">extends<\/span> <span class=\"nx\">Application_Service_Abstract<\/span><\/div><div class=\'line\' id=\'LC4\'><span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC5\'>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">public<\/span> <span class=\"k\">function<\/span> <span class=\"nf\">createUser<\/span><span class=\"p\">(<\/span><span class=\"nx\">\\Application_Model_User<\/span> <span class=\"nv\">$user<\/span><span class=\"p\">,<\/span> <span class=\"nv\">$data<\/span><span class=\"p\">)<\/span><\/div><div class=\'line\' id=\'LC6\'>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC7\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$user<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$user<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">createUser<\/span><span class=\"p\">(<\/span><span class=\"nv\">$data<\/span><span class=\"p\">);<\/span><\/div><div class=\'line\' id=\'LC8\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$this<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">dm<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">persist<\/span><span class=\"p\">(<\/span><span class=\"nv\">$user<\/span><span class=\"p\">);<\/span><\/div><div class=\'line\' id=\'LC9\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">return<\/span> <span class=\"nv\">$user<\/span><span class=\"p\">;<\/span><\/div><div class=\'line\' id=\'LC10\'>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">}<\/span><\/div><div class=\'line\' id=\'LC11\'><br/><\/div><div class=\'line\' id=\'LC12\'><span class=\"p\">}<\/span><\/div><\/pre><\/div>\n          <\/div>\n\n          <div class=\"gist-meta\">\n            <a href=\"https://gist.github.com/raw/1706078/64ab23f4fcebe11829a1053cbfd3d24dda158a1f/User.php\" style=\"float:right;\">view raw<\/a>\n            <a href=\"https://gist.github.com/1706078#file_user.php\" style=\"float:right;margin-right:10px;color:#666\">User.php<\/a>\n            <a href=\"https://gist.github.com/1706078\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n          <\/div>\n        <\/div>\n\n        <div class=\"gist-file\">\n          <div class=\"gist-data gist-syntax\">\n              <div class=\"gist-highlight\"><pre><div class=\'line\' id=\'LC1\'><span class=\"cp\">&lt;?php<\/span><\/div><div class=\'line\' id=\'LC2\'><br/><\/div><div class=\'line\' id=\'LC3\'><br/><\/div><div class=\'line\' id=\'LC4\'><span class=\"k\">class<\/span> <span class=\"nc\">AuthController<\/span> <span class=\"k\">extends<\/span> <span class=\"nx\">Zend_Controller_Action<\/span><\/div><div class=\'line\' id=\'LC5\'><span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC6\'><br/><\/div><div class=\'line\' id=\'LC7\'><br/><\/div><div class=\'line\' id=\'LC8\'>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">public<\/span> <span class=\"k\">function<\/span> <span class=\"nf\">createAction<\/span><span class=\"p\">()<\/span><\/div><div class=\'line\' id=\'LC9\'>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC10\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$form<\/span>   <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nx\">\\Application_Form_User<\/span><span class=\"p\">();<\/span><\/div><div class=\'line\' id=\'LC11\'><br/><\/div><div class=\'line\' id=\'LC12\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"o\">!<\/span><span class=\"nv\">$this<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">getRequest<\/span><span class=\"p\">()<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">isPost<\/span><span class=\"p\">())<\/span> <span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC13\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$this<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">view<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">form<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$form<\/span><span class=\"p\">;<\/span><\/div><div class=\'line\' id=\'LC14\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">return<\/span><span class=\"p\">;<\/span><\/div><div class=\'line\' id=\'LC15\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">}<\/span><\/div><div class=\'line\' id=\'LC16\'><br/><\/div><div class=\'line\' id=\'LC17\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"o\">!<\/span><span class=\"nv\">$form<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">isValid<\/span><span class=\"p\">(<\/span><span class=\"nv\">$_POST<\/span><span class=\"p\">))<\/span> <span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC18\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$this<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">view<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">form<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$form<\/span><span class=\"p\">;<\/span><\/div><div class=\'line\' id=\'LC19\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">return<\/span><span class=\"p\">;<\/span><\/div><div class=\'line\' id=\'LC20\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">}<\/span><\/div><div class=\'line\' id=\'LC21\'><br/><\/div><div class=\'line\' id=\'LC22\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"k\">try<\/span> <span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC23\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$userService<\/span>        <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nx\">\\Application_Service_User<\/span><span class=\"p\">();<\/span><\/div><div class=\'line\' id=\'LC24\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$user<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$userService<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">createUser<\/span><span class=\"p\">(<\/span><span class=\"k\">new<\/span> <span class=\"nx\">\\Application_Model_User<\/span><span class=\"p\">(),<\/span> <span class=\"nv\">$form<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">getValues<\/span><span class=\"p\">());<\/span><\/div><div class=\'line\' id=\'LC25\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$this<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">dm<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">flush<\/span><span class=\"p\">(<\/span><span class=\"k\">array<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;safe&#39;<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"k\">true<\/span><span class=\"p\">));<\/span> <span class=\"c1\">// Catch duplicates in MongoDB<\/span><\/div><div class=\'line\' id=\'LC26\'><br/><\/div><div class=\'line\' id=\'LC27\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">}<\/span> <span class=\"k\">catch<\/span> <span class=\"p\">(<\/span><span class=\"nx\">MongoException<\/span> <span class=\"nv\">$e<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span><\/div><div class=\'line\' id=\'LC28\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$form<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">reset<\/span><span class=\"p\">();<\/span><\/div><div class=\'line\' id=\'LC29\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"nv\">$this<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">view<\/span><span class=\"o\">-&gt;<\/span><span class=\"na\">form<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$form<\/span><span class=\"p\">;<\/span><\/div><div class=\'line\' id=\'LC30\'><br/><\/div><div class=\'line\' id=\'LC31\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">}<\/span><\/div><div class=\'line\' id=\'LC32\'>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"p\">}<\/span><\/div><div class=\'line\' id=\'LC33\'><br/><\/div><div class=\'line\' id=\'LC34\'><span class=\"p\">}<\/span><\/div><div class=\'line\' id=\'LC35\'><br/><\/div><\/pre><\/div>\n          <\/div>\n\n          <div class=\"gist-meta\">\n            <a href=\"https://gist.github.com/raw/1706078/9f41636014bf5ad0f3b7159c72ebe18e1dc5a434/UserController.php\" style=\"float:right;\">view raw<\/a>\n            <a href=\"https://gist.github.com/1706078#file_user_controller.php\" style=\"float:right;margin-right:10px;color:#666\">UserController.php<\/a>\n            <a href=\"https://gist.github.com/1706078\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n          <\/div>\n        <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>&lt;?php 

class Application_Service_User extends Application_Service_Abstract
{
    public function createUser(\Application_Model_User $user, $data)
    {
        $user = $user-&gt;createUser($data);
        $this-&gt;dm-&gt;persist($user);
        return $user;
    }

}</pre></code></noscript></div>
<p>The important parts to look at in the above code is the in the &#8216;User.php&#8217; (Service Class), we are persisting our objects there. In the Controller we are flushing them.</p>
<p>This makes it easy to test since you&#8217;re not actually going to hit the DB unless you test the Controller (That&#8217;s integration testing, not Unit testing).</p>
<h2>One Caveat</h2>
<p>Sometimes you need the Id of an object. You&#8217;re only able to get this when you actually insert the object into the DB. So in your Service class it may be necessary to issue the <em>flush</em> command, but there are ways around this tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2012/01/30/thoughts-on-zend-framework-doctrine-2-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.shanestillwell.com/index.php/2012/01/29/271/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=271</link>
		<comments>http://www.shanestillwell.com/index.php/2012/01/29/271/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 18:02:23 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/index.php/2012/01/29/271/</guid>
		<description><![CDATA[A simple framework for zend js integration through Ajax that can be used for element]]></description>
			<content:encoded><![CDATA[<p>A simple framework for zend js integration through Ajax that can be used for element</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2012/01/29/271/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting Audio to a CCK FileField content type for Drupal 6</title>
		<link>http://www.shanestillwell.com/index.php/2011/11/03/converting-audio-to-a-cck-filefield-content-type-for-drupal-6/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=converting-audio-to-a-cck-filefield-content-type-for-drupal-6</link>
		<comments>http://www.shanestillwell.com/index.php/2011/11/03/converting-audio-to-a-cck-filefield-content-type-for-drupal-6/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 00:38:28 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.shanestillwell.com/?p=152</guid>
		<description><![CDATA[This is the script I used to convert our Audio content type to CCK FileField content type. &#160; I created a content type called podcast Copy the following script to a file convert.php and place it in your website&#8217;s DocumentRoot https://gist.github.com/1335420 Run the script by going to your website http://example.com/convert.php Done&#8230; now the audio nodes show...  <a href="http://www.shanestillwell.com/index.php/2011/11/03/converting-audio-to-a-cck-filefield-content-type-for-drupal-6/" class="more-link" title="Read Converting Audio to a CCK FileField content type for Drupal 6">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>This is the script I used to convert our <a href="http://drupal.org/project/audio">Audio</a> content type to <a href="http://drupal.org/project/cck">CCK</a> <a href="http://drupal.org/project/filefield">FileField</a> content type.</p>
<p>&nbsp;</p>
<ol>
<li>I created a content type called <strong>podcast</strong></li>
<li>Copy the following script to a file <em>convert.php</em> and place it in your website&#8217;s DocumentRoot</li>
<li><a href="https://gist.github.com/1335420">https://gist.github.com/1335420</a></li>
<li>Run the script by going to your website http://example.com/convert.php</li>
<li>Done&#8230; now the audio nodes show be podcast nodes and will work.</li>
</ol>
<div>For extra fun, I&#8217;ve added <a href="http://drupal.org/project/swftools">SWFTools</a></div>
<h3>Resources</h3>
<p>This was of limited help<br />
<a href="http://geeksandgod.com/tutorials/computers/cms/drupal/drupal-converting-audio-module-filefield-module">http://geeksandgod.com/tutorials/computers/cms/drupal/drupal-converting-audio-module-filefield-module</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2011/11/03/converting-audio-to-a-cck-filefield-content-type-for-drupal-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poedit and phtml files giving error from xgettext</title>
		<link>http://www.shanestillwell.com/index.php/2011/08/26/poedit-and-phtml-files-giving-error-from-xgettext/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=poedit-and-phtml-files-giving-error-from-xgettext</link>
		<comments>http://www.shanestillwell.com/index.php/2011/08/26/poedit-and-phtml-files-giving-error-from-xgettext/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 01:27:20 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<h3>Problem</h3>
I had just set up a Poedit for a project at work and was trying to update the *.po file with new translations. It wasn't finding a whole load of them.

After a while of poking around, it dawned on me that it was not looking in my phtml files. Simple enough, I just added *.phtml to the list of extensions in the parsers preference.

Then I receive a big long error message that xgettext didn't know what phtml.

<h3>Solution</h3>
Add pthtml to your list of extensions
<code>
*.php;*.phtml
</code>

You also need to add " -L php" to the end of your Parser command
<code>
xgettext --force-po -o %o %C %K %F -L php
</code>

]]></description>
			<content:encoded><![CDATA[<h3>Problem</h3>
<p>I had just set up a Poedit for a project at work and was trying to update the *.po file with new translations. It wasn&#8217;t finding a whole load of them.</p>
<p>After a while of poking around, it dawned on me that it was not looking in my phtml files. Simple enough, I just added *.phtml to the list of extensions in the parsers preference.</p>
<p>Then I receive a big long error message that xgettext didn&#8217;t know what phtml.</p>
<h3>Solution</h3>
<p>Add pthtml to your list of extensions<br />
<code><br />
*.php;*.phtml<br />
</code></p>
<p>You also need to add &#8221; -L php&#8221; to the end of your Parser command<br />
<code><br />
xgettext --force-po -o %o %C %K %F -L php</code></p>
<div class="mceTemp">
<dl id="attachment_134" class="wp-caption alignnone" style="width: 242px;">
<dt class="wp-caption-dt"><a href="http://www.shanestillwell.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-25-at-9.15.19-PM.png"><img class="size-medium wp-image-134" title="Poedit Parse PHP" src="http://www.shanestillwell.com/wp-content/uploads/2011/08/Screen-Shot-2011-08-25-at-9.15.19-PM-232x300.png" alt="Poedit Parse PHP" width="232" height="300" /></a></dt>
</dl>
</div>
<p><code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2011/08/26/poedit-and-phtml-files-giving-error-from-xgettext/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The continuing Saga of Lion</title>
		<link>http://www.shanestillwell.com/index.php/2011/08/17/the-continuing-saga-of-lion/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-continuing-saga-of-lion</link>
		<comments>http://www.shanestillwell.com/index.php/2011/08/17/the-continuing-saga-of-lion/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 01:56:47 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Should you upgrade to OS X Lion???   Meh.... it's presented more problems than previous upgrades.

Maybe I should have waited until 10.7.1, so this is my punishment for being bleeding edge.

Another issue I saw was the continual nag when I opened some apps (Billings and Cyberduck) that "This program was downloaded from the Internet... blah blah blah" This normally happens once for a program then goes away after you say "OK", but this was happening everytime I opened those two programs.

The solution.

<code>
sudo xattr -d com.apple.quarantine /Applications/Billings.app
</code>

This shut the bugger up.

Resources
https://discussions.apple.com/message/6930135#6930135


]]></description>
			<content:encoded><![CDATA[<p>Should you upgrade to OS X Lion???   Meh&#8230;. it&#8217;s presented more problems than previous upgrades.</p>
<p>Maybe I should have waited until 10.7.1, so this is my punishment for being bleeding edge.</p>
<p>Another issue I saw was the continual nag when I opened some apps (Billings and Cyberduck) that &#8220;This program was downloaded from the Internet&#8230; blah blah blah&#8221; This normally happens once for a program then goes away after you say &#8220;OK&#8221;, but this was happening everytime I opened those two programs.</p>
<p>The solution.</p>
<p><code><br />
sudo xattr -d com.apple.quarantine /Applications/Billings.app<br />
</code></p>
<p>This shut the bugger up.</p>
<p>Resources</p>
<p>https://discussions.apple.com/message/6930135#6930135</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shanestillwell.com/index.php/2011/08/17/the-continuing-saga-of-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

