<?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>Software and Technology Ramblings &#187; Doug Hays</title>
	<atom:link href="http://blog.eastfacesoftware.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.eastfacesoftware.com</link>
	<description>A blog of software design, architecture, and other unread ramblings.</description>
	<lastBuildDate>Thu, 09 Dec 2010 17:01:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQLPO -vs- CoreData</title>
		<link>http://blog.eastfacesoftware.com/2010/09/30/sqlpo-vs-coredata/</link>
		<comments>http://blog.eastfacesoftware.com/2010/09/30/sqlpo-vs-coredata/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 04:20:27 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[Core Data]]></category>
		<category><![CDATA[SQLPO]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=95</guid>
		<description><![CDATA[We are working on a legacy iPhone app that uses the awesome SQLPO to persist my objects to a sqlite database.  The app doesn&#8217;t have a lot of data (100&#8217;s of rows) but, in our testing, believe that we are experiencing a bit of lag with SQLPO especially when inserting records.
So, I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>We are working on a legacy iPhone app that uses the awesome SQLPO to persist my objects to a sqlite database.  The app doesn&#8217;t have a lot of data (100&#8217;s of rows) but, in our testing, believe that we are experiencing a bit of lag with SQLPO especially when inserting records.</p>
<p>So, I decided to run a super-simple benchmark to see whether the move to Core Data would be worth the pain.</p>
<p>I created two apps, each with a single class that would be persisted to the database several times over, one that used Core Data and another using SQLPO.  The initial aim of the test was to compare these two frameworks on older iPhone hardware.  But, after seeing the results on an iPhone 4, I didn&#8217;t feel the need to blow the dust off of my 1st Gen iPhone:</p>
<table>
<tr>
<th align="left">Time Test</th>
<th align="right">SQLPO</th>
<th align="right">Core Data</th>
</tr>
<tr>
<td>500 Record Insert</td>
<td align="right">27.5s</td>
<td align="right">0.43s</td>
</tr>
<tr>
<td>500 Record Update</td>
<td align="right">15.13 sec</td>
<td align="right">0.44 sec</td>
</tr>
<tr>
<td>10000 Record Insert</td>
<td align="right">360 sec*</td>
<td align="right">5.72 sec</td>
</tr>
<tr>
<td>10000 Record Update</td>
<td align="right">300 sec*</td>
<td align="right">5.82 sec</td>
</tr>
<tr>
<td colspan="3"><em>* Test did not finish.  App crashed</em></td>
</table>
<p>So, Core Data is faster, but does it perform better with memory usage?  We noticed SQLPO was a bit liberal with its memory usage, so we were glad to see Core Data&#8217;s result:</p>
<table>
<tr>
<th align="left">Memory Test</th>
<th align="right">SQLPO</th>
<th align="right">Core Data</th>
</tr>
<tr>
<td>Max Live Bytes</td>
<td align="right">99.5 MB</td>
<td align="right">2.54 MB</td>
</tr>
</tr>
<tr>
<td>Idle Live Bytes</td>
<td align="right">3.02 MB</td>
<td align="right">1.74 MB</td>
</tr>
<tr>
<td>Time to release</td>
<td align="right">63 sec</td>
<td align="right">1 sec</td>
</tr>
</table>
<p>Clearly a move to Core Data is the smart way to go and it had been on the to-do list for a future release.  But, with these numbers, I think it may get a bump in priority.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2010/09/30/sqlpo-vs-coredata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UIWebView too wide after rotation from Landscape</title>
		<link>http://blog.eastfacesoftware.com/2010/09/22/uiwebview-too-wide-after-rotation-from-landscape/</link>
		<comments>http://blog.eastfacesoftware.com/2010/09/22/uiwebview-too-wide-after-rotation-from-landscape/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 15:04:29 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[UIWebView]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=86</guid>
		<description><![CDATA[I had the simplest of UIWebView implementations throwing me an odd issue.  It was an iPad app with a UIWebView, stretched to fill the entire screen, loaded from a local HTML file.  
If the view was loaded in landscape and then rotated to portrait, the content size of the web view would remain [...]]]></description>
			<content:encoded><![CDATA[<p>I had the simplest of UIWebView implementations throwing me an odd issue.  It was an iPad app with a UIWebView, stretched to fill the entire screen, loaded from a local HTML file.  </p>
<p>If the view was loaded in landscape and then rotated to portrait, the content size of the web view would remain at 1024 pixels wide even though the HTML content only took up 700px.</p>
<p>I finally found a <a href="http://discussions.info.apple.com/message.jspa?messageID=11797948" target="_blank">helpful post</a> that suggested I add the following inside the HEAD tag of my HTML:</p>
<pre>
&lt;meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"&gt;
</pre>
<p>That does the trick!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2010/09/22/uiwebview-too-wide-after-rotation-from-landscape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authorize.NET &#8211; The merchant login ID or password is invalid or the account is inactive</title>
		<link>http://blog.eastfacesoftware.com/2010/09/14/authorize-net-the-merchant-login-id-or-password-is-invalid-or-the-account-is-inactive/</link>
		<comments>http://blog.eastfacesoftware.com/2010/09/14/authorize-net-the-merchant-login-id-or-password-is-invalid-or-the-account-is-inactive/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 04:28:33 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Authorize.NET]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=82</guid>
		<description><![CDATA[I&#8217;m adding Authorize.NET to one of my client&#8217;s CakePHP apps and used the Authorize.NET CakePHP Component which saved me a world of time.

But, after setting everything up, I ran my first transaction and got this error: The merchant login ID or password is invalid or the account is inactive.  I double checked my API [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m adding Authorize.NET to one of my client&#8217;s CakePHP apps and used the <a href="http://bakery.cakephp.org/articles/view/authorize-net-aim-integration-component" target="_blank">Authorize.NET CakePHP Component</a> which saved me a world of time.
</p>
<p>But, after setting everything up, I ran my first transaction and got this error: <i>The merchant login ID or password is invalid or the account is inactive</i>.  I double checked my API Login ID and Transaction Key and they were correct.  Finally, I stumbled on a <a href="http://www.zen-cart.com/forum/showthread.php?t=87443" target="_blank">helpful thread</a> that set me in the right direction.</p>
<p>I was using the test.authorize.net URL but that is only for <i>developer accounts</i>. Even if you are in Test mode, but have a &#8216;Normal&#8217; Authorize.NET account, you need to use the secure.authorize.net URL.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2010/09/14/authorize-net-the-merchant-login-id-or-password-is-invalid-or-the-account-is-inactive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone and iPad is not showing up in Xcode Organizer or iTunes</title>
		<link>http://blog.eastfacesoftware.com/2010/09/13/iphone-and-ipad-is-not-showing-up-in-xcode-organizer-or-itunes/</link>
		<comments>http://blog.eastfacesoftware.com/2010/09/13/iphone-and-ipad-is-not-showing-up-in-xcode-organizer-or-itunes/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 19:19:24 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=79</guid>
		<description><![CDATA[Just a quick tip if your iPad or iPhone is not appearing in Xcode or iTunes.  This was happening to me even after a complete machine restart.
Found a tip that suggested a re-install of iTunes.
So, I re-installed iTunes and I&#8217;m back in business! 
]]></description>
			<content:encoded><![CDATA[<p>Just a quick tip if your iPad or iPhone is not appearing in Xcode or iTunes.  This was happening to me even after a complete machine restart.</p>
<p>Found a tip that suggested a re-install of iTunes.</p>
<p>So, I re-installed iTunes and I&#8217;m back in business! </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2010/09/13/iphone-and-ipad-is-not-showing-up-in-xcode-organizer-or-itunes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Status Update URL issue with URL encoding</title>
		<link>http://blog.eastfacesoftware.com/2010/05/19/twitter-status-update-url-issue-with-url-encoding/</link>
		<comments>http://blog.eastfacesoftware.com/2010/05/19/twitter-status-update-url-issue-with-url-encoding/#comments</comments>
		<pubDate>Wed, 19 May 2010 20:43:38 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[iPhone Development]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=75</guid>
		<description><![CDATA[I am developing an iPhone app that allows the user to tweet information from the app.  For simplicity&#8217;s sake, I chose to use the URL method of sending the user off to Twitter to sign in and finish their status update.  When I redirected the user to:
http://mobile.twitter.com/home?status=Hello%20World
The status update was dropped after the [...]]]></description>
			<content:encoded><![CDATA[<p>I am developing an iPhone app that allows the user to tweet information from the app.  For simplicity&#8217;s sake, I chose to use the URL method of sending the user off to Twitter to sign in and finish their status update.  When I redirected the user to:</p>
<pre>http://mobile.twitter.com/home?status=Hello%20World</pre>
<p>The status update was dropped after the user logged in.  So, I switched to:</p>
<pre>http://www.twitter.com/home?status=Hello%20World</pre>
<p>which looked fine even on a smaller screen.  And, after the user logged in, the status message was retained.  But, so was the URL encoding.  Instead of &#8220;Hello World&#8221; the status would have been an unsightly &#8220;Hello%20World&#8221;.  </p>
<p>I finally stumbled onto the fix and it&#8217;s an easy one.  Just drop the www:</p>
<pre>http://twitter.com/home?status=Hello%20World</pre>
<p>And, now it works as expected after the user logs in.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2010/05/19/twitter-status-update-url-issue-with-url-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling CakePHP Code from Other PHP Code</title>
		<link>http://blog.eastfacesoftware.com/2010/01/11/calling-cakephp-code-from-other-php-code/</link>
		<comments>http://blog.eastfacesoftware.com/2010/01/11/calling-cakephp-code-from-other-php-code/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 05:13:15 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Non-CakePHP]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=68</guid>
		<description><![CDATA[In order to call CakePHP from non-CakePHP code, we will copy index.php from /app/webroot and put it into our non-CakePHP codebase as cakephp.php.
Then, we&#8217;ll create a function requestCakePHP that requires the cakephp.php file:



Then, whenever we need to call for some Cake, we just call requestCake with the URL minus the hostname:

echo requestCakePHP("/webpages/view/2");

In the example above, [...]]]></description>
			<content:encoded><![CDATA[<p>In order to call CakePHP from non-CakePHP code, we will copy index.php from /app/webroot and put it into our non-CakePHP codebase as cakephp.php.</p>
<p>Then, we&#8217;ll create a function requestCakePHP that requires the cakephp.php file:<br />
<code><br />
<?<br />
function requestCakePHP($url)</p>
<p>{           </p>
<p>    // Set the url parameter for cakephp<br />
    $_GET['url'] = $url;</p>
<p>    require_once 'cakephp.php';</p>
<p>    // Fire up CakePHP and buffer results<br />
    ob_start();<br />
    $Dispatcher= new Dispatcher ();<br />
    $Dispatcher->dispatch($url);       </p>
<p>    return ob_get_clean();</p>
<p>}<br />
?><br />
</code></p>
<p>Then, whenever we need to call for some Cake, we just call requestCake with the URL minus the hostname:</p>
<p><code><br />
echo requestCakePHP("/webpages/view/2");<br />
</code></p>
<p>In the example above, I have a webpages controller, a view action and am viewing webpage #2.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2010/01/11/calling-cakephp-code-from-other-php-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps Info Window Too Big &#8211; Fixed!</title>
		<link>http://blog.eastfacesoftware.com/2009/09/09/google-maps-info-window-too-big-fixed/</link>
		<comments>http://blog.eastfacesoftware.com/2009/09/09/google-maps-info-window-too-big-fixed/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 15:13:27 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=54</guid>
		<description><![CDATA[It always feels good to solve a long-standing and puzzling issue.  Today&#8217;s fix has to do with a Google Maps window that was about 50% taller than it had to be:

After several rounds of setting fixed widths inside the info window&#8217;s HTML content, I added the following CSS for .gmapmarker which is the class of [...]]]></description>
			<content:encoded><![CDATA[<p>It always feels good to solve a long-standing and puzzling issue.  Today&#8217;s fix has to do with a Google Maps window that was about 50% taller than it had to be:</p>
<p><img class="alignnone size-full wp-image-57" title="Google Maps Info Window - Too Tall" src="http://blog.eastfacesoftware.com/wp-content/uploads/2009/09/Picture-6.png" alt="Google Maps Info Window - Too Tall" width="407" height="365" /></p>
<p>After several rounds of setting fixed widths inside the info window&#8217;s HTML content, I added the following CSS for .gmapmarker which is the class of the div that wraps all of my info window&#8217;s content:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 318px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">#gmapmarker {</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 318px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>display: block;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 318px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>max-height: 185px;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 318px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<pre class="code">.gmapmarker {
    max-height: 185px;
}</pre>
<div></div>
<div>And that did the trick:</div>
<div><img class="alignnone size-full wp-image-58" title="Google Maps Info Window - Height Fixed" src="http://blog.eastfacesoftware.com/wp-content/uploads/2009/09/Picture-7.png" alt="Google Maps Info Window - Height Fixed" width="404" height="307" /></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2009/09/09/google-maps-info-window-too-big-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatic Switching of Environments with Adobe AIR</title>
		<link>http://blog.eastfacesoftware.com/2009/05/17/automatic-switching-of-environments-with-adobe-air/</link>
		<comments>http://blog.eastfacesoftware.com/2009/05/17/automatic-switching-of-environments-with-adobe-air/#comments</comments>
		<pubDate>Mon, 18 May 2009 05:31:54 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=50</guid>
		<description><![CDATA[There is an issue with AIR application development to which I still have not found an official answer.
I just need to switch between http://localhost and http://fakeproductionurl.com depending on whether I was running in Flex Builder (via adl).
I found all sorts of articles about using conditional compilation (yikes) and reading XML files (I&#8217;m too lazy).
This is [...]]]></description>
			<content:encoded><![CDATA[<p>There is an issue with AIR application development to which I still have not found an official answer.</p>
<p>I just need to switch between http://localhost and http://fakeproductionurl.com depending on whether I was running in Flex Builder (via adl).</p>
<p>I found all sorts of articles about using conditional compilation (yikes) and reading XML files (I&#8217;m too lazy).</p>
<p>This is what I ended up using:</p>
<pre class="code">if (NativeApplication.nativeApplication.publisherID != "") {
   return "http://fakeproductionurl.com";
}
else {
   return "http://localhost";
}</pre>
<p>It doesn&#8217;t give you the ability to switch between 3+ different environments, but it&#8217;s a very easy way to toggle between development / production environments.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2009/05/17/automatic-switching-of-environments-with-adobe-air/feed/</wfw:commentRss>
		<slash:comments>3192</slash:comments>
		</item>
		<item>
		<title>Installing CakePHP 1.2 in a Subdirectory</title>
		<link>http://blog.eastfacesoftware.com/2009/03/17/installing-cakephp-12-in-a-subdirectory/</link>
		<comments>http://blog.eastfacesoftware.com/2009/03/17/installing-cakephp-12-in-a-subdirectory/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 22:02:56 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=46</guid>
		<description><![CDATA[I needed to test some CakePHP code on a client&#8217;s 1and1 server today, so I dropped my CakePHP app in a subdirectory (called agents2) on his site.  But, after doing so, I kept getting &#8220;Class &#8216;Configure&#8217; not found&#8221;.  Luckily, I stumbled upon this blog post over at kushaura.com which saved me.
The core issue was with [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to test some CakePHP code on a client&#8217;s 1and1 server today, so I dropped my CakePHP app in a subdirectory (called agents2) on his site.  But, after doing so, I kept getting &#8220;Class &#8216;Configure&#8217; not found&#8221;.  Luckily, I stumbled upon this blog post over at <a href="http://kushaura.com/blog/view/name:Installing-CakePHP-in-a-Subdirectory" target="_blank">kushaura.com</a> which saved me.</p>
<p><P>The core issue was with my root .htaccess file which needed to be changed to:</p>
<pre class="code">
      RewriteEngine on
      RewriteBase    /agents2/

      RewriteRule    ^$ app/webroot/    [L]

      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule (.*) app/webroot/$1 [L]
</pre>
<p>And that did the trick.</p>
<p>Thanks, Kushaura.com!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2009/03/17/installing-cakephp-12-in-a-subdirectory/feed/</wfw:commentRss>
		<slash:comments>145</slash:comments>
		</item>
		<item>
		<title>PRG</title>
		<link>http://blog.eastfacesoftware.com/2008/11/26/prg/</link>
		<comments>http://blog.eastfacesoftware.com/2008/11/26/prg/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 05:02:09 +0000</pubDate>
		<dc:creator>Doug Hays</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://blog.eastfacesoftware.com/?p=42</guid>
		<description><![CDATA[In doing some research on ASP.NET MVC, Phil Haack mentioned a pattern that I had never heard of but love to use: PRG -or- Post, Redirect, Get.
Take a web form for example.  When the user clicks Save, the data is sent via POST back to the web application.  The web app saves the data to [...]]]></description>
			<content:encoded><![CDATA[<p>In doing some research on <a href="http://channel9.msdn.com/pdc2008/PC21/" target="_blank">ASP.NET MVC</a>, <a href="http://haacked.com/" target="_blank">Phil Haack</a> mentioned a pattern that I had never heard of but love to use: <a href="http://en.wikipedia.org/wiki/Post/Redirect/Get" target="_blank">PRG</a> -or- <a href="http://en.wikipedia.org/wiki/Post/Redirect/Get" target="_blank">Post, Redirect, Get</a>.</p>
<p>Take a web form for example.  When the user clicks <strong>Save</strong>, the data is sent via POST back to the web application.  The web app saves the data to the database and then redirects the user to the next page within the application.  The user&#8217;s browser then requests that page via GET.  </p>
<p>The beauty of this pattern is made very clear by Phil.  This will eliminate the possibly confusing &#8220;Are you sure you want to resubmit this form data?&#8221; browser message.  But, for me, an even better reason is that it eliminates possible data issues when the browser re-posts the data after that refresh.  </p>
<p>Either way, I&#8217;m glad to have learned the name of this pattern and even more thankful that my use of it has been validated.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eastfacesoftware.com/2008/11/26/prg/feed/</wfw:commentRss>
		<slash:comments>319</slash:comments>
		</item>
	</channel>
</rss>

