<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Donat Studios</title>
    <link>http://donatstudios.com/</link>
    <description></description>
    <image>
      <url>http://donatstudios.com/favicon.ico</url>
      <link>http://donatstudios.com/</link>
      <title>Donat Studios</title>
    </image>
    <item>
      <guid>http://donatstudios.com/FastPatch</guid>
      <title>Fast Patches with Git</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Fri, 27 Aug 2010 15:59:26 CST</pubDate>
      <link>http://donatstudios.com/FastPatch</link>
      <description><![CDATA[<p>In my work, I deal with a lot of very similar codebases - and often if I fix something in one project I'll want to fix it in many others.  For a long time this has meant popping open Beyond Compare, which works, but isn't the simplest solution.</p>
<p>I use git on my projects - but they're not similar enough just to be branches. Recently I came up with a way to patch one or more commits from a project to another easily.  Here is a simple shell script I wrote to handle the task.</p>
<p>Simply put, you can use it either by <code style="white-space: nowrap;">fast-patch.sh /z/my_project</code> to patch a project with the latest commit from the project in the working directory or with an optional paramater, specify a number of commits, eg <code style="white-space: nowrap;">fast-patch.sh /z/my_project 5</code></p>
<p>Also, it will generate a patch log to ~/fastPatch.log which I generally use directly for my commit message by way of <code style="white-space: nowrap;">git commit -F ~/fastPatch.log</code></p>
<p>Any comments on how I could improve it, or questions are quite welcome.</p>
<script src="http://gist.github.com/554158.js?file=fast-patch.sh"></script>]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/Balanced_Take_on_Gzip</guid>
      <title>A Balanced Look at GZIP and the User Experience</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Mon, 16 Aug 2010 18:30:31 CST</pubDate>
      <link>http://donatstudios.com/Balanced_Take_on_Gzip</link>
      <description><![CDATA[<p>  With Google recently starting to involve load time in search  rankings, there has been a lot of talk about GZIP.  Google Webmaster Tools exclaims "Compressing  the following resources with gzip could reduce their transfer size by <strong>X</strong>KB:". Many people listen to this, and go out looking for a quick fix without realizing that <strong>poor GZIP implementation has a strongly negative effect on  the overall user experience</strong>.</p>
<p>There are two main ways in PHP to go about implementing  GZIP. The first is <a href="http://php.net/manual/en/function.ob-gzhandler.php">ob_gzhandler</a>.   Basically all that is really involved in setting this up is adding <code>ob_start(&quot;ob_gzhandler&quot;);</code> anywhere  before headers are sent, and it will blindly handle this for you. </p>
<p>The second is <a href="http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression" target="_blank">zlib.output_compression</a> which while entirely transparent and Zends states that <q cite="http://www.php.net/manual/en/function.ob-gzhandler.php">using zlib.output_compression is preferred over ob_gzhandler().</q></p>
<p>  This method can have a huge downside for users.  It can for instance greatly exacerbate the sluggishness  of an already slow page or even site. Right now your probably saying to yourself "What? I  thought GZIP made everything faster. This guy is crazy.". Allow me to explain. </p>
<p> Let&rsquo;s say that you have a site with no all encompasing output  buffer.  As PHP works its way through  your script it occasionally flushes out its internal buffer to apache, which in turn flushes it out to the browser, allowing the browser to begin rendering the incomplete document. Also, let&rsquo;s say as an example you have a hold up slowing down your page in the footer of your site. The  user would already have the rest of the content and could  begin reading  and enjoying the site.</p>
<p>  Now let&rsquo;s compare to a site GZIPed with an output buffer  callback, e.g. ob_gzhandler. After the output buffer is started, your code  begins to execute.  Everything echoed is  held in the buffer until the page is completely done and the output buffer closes, at which point it is  GZIPed and flushed out to the user.   The user recieves less bits, but that hold up in the footer we spoke of before halts up the entire  rendering process, and the user cannot see anything  until the footer completes.</p>
<p>  For your viewing pleasure, a demonstration:</p>
<fieldset><legend>Side by Side Comparison</legend>
	<table>
		<tr>
			<th>Non-GZIPed</th>
			<th>GZIPed</th>
		</tr>
		<tr><td>
			<iframe frameBorder="0" src="assets/17/gzip_test.php" style="width:280px;height:150px"></iframe>
		</td><td>
			<iframe frameBorder="0" src="assets/17/gzip_test.php?gzip=1" style="width:280px;height:150px"></iframe>
		</td></tr>
	</table>
    <small>It has come to my attention that Webkit browsers wait for a full result in an iframe to begin rendering - so this example will not work in Safari/Chrome</small>
</fieldset>
<h2>Take Note</h2>
<p>I am not stating that all GZIP is bad. To the contrary, GZIP can be very beneficial and I absolutely sympathize with google wanting to cut down on their bandwidth. If you have Firebug or something similar you can note that the request for the Non-GZIPed example is a whopping 100 <strong>kilobytes</strong>, whereas the GZIPed examples request is a measily 323 <em><strong>bytes</strong></em>! The reason for this is I did not have enough content to get Apache to flush so to get around this I added the following line.</p>
<pre>echo str_repeat(' ', 100000); <em>//This creates 100kb worth of data, enough to trigger my copy of Apache to flush;</em></pre>
<p>Not only does this trick cause Apache to flush,  but it  exagerates the positive effect of GZIP. Simple patterns, or in this case large amounts of whitespace, will compress quite wondefully.</p>
<p>Uncompressed static files, JavaScript and CSS being two of the best examples compress quite well. The best way to do this is on an Apache server is with </p>
<pre>&lt;IfModule mod_deflate.c&gt;<br />
&lt;FilesMatch &quot;\.(js|css)$&quot;&gt;<br />
SetOutputFilter DEFLATE<br />
&lt;/FilesMatch&gt;<br />
&lt;/IfModule&gt;</pre>
<h2>Looking for a Solution</h2>
<p>I've posted a number of questions to Stack Overflow [<a href="http://stackoverflow.com/questions/2868167/any-way-to-chunk-gzip-with-apache-and-php">1</a>]  [<a href="http://stackoverflow.com/questions/2955180/mod-deflate-caching-question">2</a>]  researching this writing and actually found very limited help.</p>
<p>It appears murky whether or not the protocol even supports  the functionality of chunking GZIP results into separately compressed blocks,  as would be required to decompress portions before the page is done – you can  chunk a complete GZIP response, but the advantage of this is limited.</p>
<p> Lastly I have seen &ldquo;promises&rdquo; of ob_gzhandler caching the  results leading to a speed boost on a number of blogs – this is purely fiction and not to be trusted.</p>
<h2>Moral of the Story</h2>
<p>Understand what you&rsquo;re doing before you do it.  <em>Blindly</em> using output buffering for GZIP can have adverse effects on your site.  </p>
]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/SimpleCalendar</guid>
      <title>SimpleCalendar</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Wed, 30 Jun 2010 19:17:11 CST</pubDate>
      <link>http://donatstudios.com/SimpleCalendar</link>
      <description><![CDATA[<h1>Simple Calendar</h1>

<div class="GithubFeed"><h2>Recent Activity</h2><h3><dfn class="entryDate" title="Mon, 12 Jul 2010 14:32:34 -0500">Jul. 12, 2010</dfn></h3>Merge branch 'master' of github.com:donatj/SimpleCalendar<hr />Leftover Debugging Echo Removed<hr /><h3><dfn class="entryDate" title="Sat, 10 Jul 2010 12:39:14 -0500">Jul. 10, 2010</dfn></h3>Added doc blocks to addDailyHtml and clearDailyHtml<hr /><h3><dfn class="entryDate" title="Thu, 08 Jul 2010 13:43:10 -0500">Jul. 8, 2010</dfn></h3>- Fix for months that start on sunday<br />
- Fix for months that end on saturday<hr />Formatting changes to the calendars surrounding table.<hr />Removed an accidental print_r<hr /><h3><dfn class="entryDate" title="Thu, 01 Jul 2010 17:42:49 -0500">Jul. 1, 2010</dfn></h3>Event Modification Started<hr /><h3><dfn class="entryDate" title="Wed, 30 Jun 2010 15:10:22 -0500">Jun. 30, 2010</dfn></h3>Initial version of SimpleCalendar<hr /></div>

<p>Simple Calendar is a very simple PHP calendar class.</p>
<p><small>More Details Soon</small></p>
<p><a href="http://github.com/donatj/SimpleCalendar" target="_blank">Click here for the Github repository.</a></p>

<table class="datatable" style="width: 100%" cellpadding="0" cellspacing="0">
<tr><th align="left">Build</th><th align="left">Date</th><th align="left">Message</th></tr></table>
]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/JDZoom</guid>
      <title>JDZoom</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Mon, 07 Jun 2010 21:18:35 CST</pubDate>
      <link>http://donatstudios.com/JDZoom</link>
      <description><![CDATA[<h1>JDZoom</h1>

<div class="GithubFeed"><h2>Recent Activity</h2><h3><dfn class="entryDate" title="Mon, 07 Jun 2010 11:22:08 -0500">Jun. 7, 2010</dfn></h3>README.md and .gitignore added<hr />Initial Commit<hr /></div>

<p>JDZoom is a MooTools powered hover detail zoom</p>
<p><small>More Details Soon</small></p>
<p><a href="http://github.com/donatj/jdzoom" target="_blank">Click here for the Github repository.</a></p>

<table class="datatable" style="width: 100%" cellpadding="0" cellspacing="0">
<tr><th align="left">Build</th><th align="left">Date</th><th align="left">Message</th></tr><tr class="odd"><td align="left">v0.1<br /><small><a href="http://github.com/donatj/jdzoom/zipball/v0.1">Download</a></small></td><td align="left"><dfn class="entryDate" title="Mon, 07 Jun 2010 11:22:08 -0500">Jun. 7, 2010</dfn></td><td align="left"><small>README.md and .gitignore added</small></td></tr></table>
]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/No_App_P1_PhpED</guid>
      <title>There Isn't an App for&#x2026; - Part 1: PhpED</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Thu, 07 Jan 2010 14:53:44 CST</pubDate>
      <link>http://donatstudios.com/No_App_P1_PhpED</link>
      <description><![CDATA[<h2>&ldquo;There Isn't an App For That&rdquo; - Windows Apps I haven't been able to replace in Mac OS X</h2>
<p>For a very long time I was a Windows guy, I <em>was once</em> a DOS guy. I switched nearly exclusively to Mac for my home use about 4 years ago. I&rsquo;ve been very happy with it. Its stable, well engineered, and - my favorite part of all - consistent. Yet, in this time there remain a few applications I cannot seem to replace.</p>
<h3><a href="http://www.nusphere.com/">Nusphere PhpED</a></h3>
<p> I am a PHP Developer by trade, and PhpED for my money is by far the best development environment for the serious PHP developer. When I do develop on the Mac platform it is usually split between two applications &ndash; Coda and TextMate. They are fantastic text editors, don&rsquo;t misunderstand, but when you are developing highly classed applications a strong IDE becomes highly desirable. PhpED&rsquo;s IntelliSense style PHP auto completion is <strong>on par</strong> with and in some ways <strong>surpasses</strong> Visual Studios.</p>
<p>Applications like Dreamweaver, Coda, TextMate and Espresso by comparison provide very basic auto completion. Zend Studio, Aptana Studio and other Eclipse based solutions have varying qualities of auto completion, but are awkward due to Eclipses generality and slow and visually out of water due to being built on Java. Komodo comes the closest, but can be very slow at times. Weighing in at $299 its pricetag is also heavy.</p>
<p>To give you in an example, in my CorpusPHP Framework the user class is built specifically to be extended for the sites particular needs. The login class therefore has a member instance of <em>whatever</em> type of object extending user you might have. This member is dynamically set as an instance and therefore type cannot be determined by <em>most</em> editors and auto completion will not work.&nbsp; PhpED on the other hand has a solution. This brings me to my favorite PhpED feature - deep phpDocumentor integration.</p>
<pre>class Login {<br />
&nbsp;&nbsp;&nbsp;&nbsp;/**
&nbsp;&nbsp;&nbsp;&nbsp;* Object that holds the user object, brought over from the session
&nbsp;&nbsp;&nbsp;&nbsp;* @var User
&nbsp;&nbsp;&nbsp;&nbsp;*/
&nbsp;&nbsp;&nbsp;&nbsp;public $user;

&nbsp;&nbsp;&nbsp;&nbsp;&hellip;&nbsp;&hellip;&nbsp;&hellip;<br />
}</pre>
<p>The above code snippet shows the user member of the login class. It can be any type of user, for instance admin or limited. It will though be inherently be something that extends the user object.&nbsp; Using phpDocumentor syntax here we imply that the type is a <em>user</em> and since PhpED is smart, it auto completes based on this.&nbsp; If you are unfamiliar with phpDocumentor syntax you should <a href="http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.pkg.html" target="_blank">read up on it</a>, and begin marking your PHP up in this standardized syntax.</p>
<p> <img src="images/post/phpedAutocomplete.png" alt="Php Autocomplete" /></p>
<p> PhpED takes this integration further and will show descriptions of methods and functions as well as their parameters and return values based on their inline phpDocumentor documentation.</p>
<p> <img src="images/post/phpedCodeDescription.png" alt="PhpED phpDoc description" /></p>
<p> While auto complete is the PhpED killer feature in my book, it has many other excellent features.</p>
<p>&nbsp;Its internal debugger&nbsp; is second to none, and requires <em>no</em> setup unlike other debuggers. It installs its own copies of Apache and PHP 4 &amp; PHP 5.2 or 5.3 which it uses to debug. The debugger can output to an internal version of IE or Mozilla or any external browser. Its quite configurable, everything you would expect like ability to set $_GET, $_POST, etc variables, break points, runtime analysis.</p>
<p>Some smaller features I personally enjoy are for instance:</p>
<ul>
	<li>To-Do list shows you all the todo&rsquo;s throughout your project.</li>
	<li>Continually improving, high quality CSS/HTML auto completion.</li>
	<li>The ability to set a default character set on a per-project basis</li>
	<li>Non-Ascii range characters show up dark blue in variable and function names, making them obvious &ndash; which is particularly helpful when working on code from a Cyrillic coder whereas &Alpha; (Alpha) and A are <em>visually</em> identical but entirely different characters.</li>
	<li>Great support &ndash; Support will work with you to fix a problem.</li>
</ul>]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/CorpusPHP</guid>
      <title>CorpusPHP</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Wed, 02 Dec 2009 15:21:04 CST</pubDate>
      <link>http://donatstudios.com/CorpusPHP</link>
      <description><![CDATA[<h1>CorpusPHP - The PHP Framework for the Rest of Us</h1>
<div class="GithubFeed"><h2>Recent Activity</h2><h3><dfn class="entryDate" title="Tue, 31 Aug 2010 11:14:23 -0500">Aug. 31, 2010</dfn></h3>Arial Replaced with Vera, references to helvetica removed<hr /><h3><dfn class="entryDate" title="Thu, 26 Aug 2010 08:16:25 -0500">Aug. 26, 2010</dfn></h3>Made thumbnailer 404 with a blank image<hr />Updated the drawing of the category tree to respect listing status<hr />Updated Core::href to url encode seourls<hr /><h3><dfn class="entryDate" title="Wed, 14 Jul 2010 20:40:13 -0500">Jul. 14, 2010</dfn></h3>General CSS Cleanup (More on the way)<hr /><h3><dfn class="entryDate" title="Wed, 19 May 2010 23:11:13 -0500">May. 19, 2010</dfn></h3>Added logic to Corpus allowing object style {} invocation on Modules as well as [] array style, regex also updated accordingly in corpus.sql<hr /><h3><dfn class="entryDate" title="Fri, 14 May 2010 12:42:07 -0500">May. 14, 2010</dfn></h3>Basic SSL support added<hr /><h3><dfn class="entryDate" title="Tue, 23 Mar 2010 15:05:21 -0500">Mar. 23, 2010</dfn></h3>FlickrFeed updated to use JSON rather than Serialized PHP<br />
general.js &lt;button&gt; wrapping updated to allow for an ignore rel<hr /><h3><dfn class="entryDate" title="Mon, 15 Mar 2010 15:30:49 -0500">Mar. 15, 2010</dfn></h3>Removed version numbers from mootools build filenames to prevent git rename confusion.<hr /><h3><dfn class="entryDate" title="Wed, 10 Mar 2010 15:23:59 -0600">Mar. 10, 2010</dfn></h3>Modules<br />
-------<br />
<br />
Comments Module<br />
<br />
- Updated Gravatar Code<br />
<br />
FlickrFeed<br />
<br />
- Updated Caching<br />
<br />
Misc<br />
----<br />
<br />
displayImage<br />
<br />
- Updated Expiration Header<hr /><h3><dfn class="entryDate" title="Mon, 08 Mar 2010 08:56:56 -0600">Mar. 8, 2010</dfn></h3>Updated default layout header to reflect current version of MooTools<br />
Updated print style sheet to no longer underline header tags<br />
Updated image scaler with a few more headers to improve browser caching<br />
Removed some old commented out code from general.php<hr /><h3><dfn class="entryDate" title="Fri, 26 Feb 2010 14:47:05 -0600">Feb. 26, 2010</dfn></h3>- Added an Ellipses to the search page.<br />
- DropdownFromSql code simplified<br />
- Comments Updated<hr /><h3><dfn class="entryDate" title="Wed, 24 Feb 2010 09:24:08 -0600">Feb. 24, 2010</dfn></h3>Merge branch 'master' of github.com:donatj/CorpusPHP<hr />General Code Cleanup<br />
====================<br />
<br />
`Source/includes/functions/general.php` htmlEA function removed, functionality merged into htmlE and then expanded to be recursive.<br />
<br />
Database<br />
========<br />
<br />
Table Structure<br />
---------------<br />
<br />
Several fields set to ASCII for primary key length support on older versions of MySQL<br />
<br />
- `cache`.`module`<br />
- `cache`.`key`<br />
- `config`.`module`<br />
<br />
Scripts<br />
-------<br />
<br />
`Scripts/canonization.sql` added to standardize and clean up database before dump.<br />
`Scripts/db_dump.bat` updated to call `canonization.sql`<hr />General Code Cleanup<br />
====================<br />
<br />
`Source/includes/functions/general.php` htmlEA function removed, functionality merged into htmlE and then expanded to be recursive.<br />
<br />
Database<br />
========<br />
<br />
Table Structure<br />
---------------<br />
<br />
Several set to ASCII to for primary key length support on older versions of MySQL<br />
<br />
- `cache`.`module`<br />
- `cache`.`key`<br />
- `config`.`module`<br />
<br />
Scripts<br />
-------<br />
<br />
`Scripts/canonization.sql` added to standardize and clean up database before dump.<br />
`Scripts/db_dump.bat` updated to call `canonization.sql`<hr /><h3><dfn class="entryDate" title="Mon, 22 Feb 2010 10:00:40 -0600">Feb. 22, 2010</dfn></h3>Updated Mootools More to 1.2.4.2<hr /><h3><dfn class="entryDate" title="Thu, 18 Feb 2010 16:36:08 -0600">Feb. 18, 2010</dfn></h3>Updated Documentation<br />
Updated corpus.sql<hr />Repository Restructured<br />
-Working Corpus now in Source Folder<br />
-`Scripts` folder added, includes database dump batch, and README.md HTML viewer<br />
-`Local` folder added, for testing use with local database connections, etc<br />
<br />
Documentation<br />
-Finally! Created an initial README.md<br />
-TODO moved from includes folder into root<hr /><h3><dfn class="entryDate" title="Fri, 12 Feb 2010 15:47:22 -0600">Feb. 12, 2010</dfn></h3>Image Scaler using 301 redirects was incompatible with directory structuring - Rolling back a portion of the code<hr /><h3><dfn class="entryDate" title="Thu, 11 Feb 2010 12:20:38 -0600">Feb. 11, 2010</dfn></h3>Efficiency and scaling update to the thumbnailer.<hr /><h3><dfn class="entryDate" title="Mon, 08 Feb 2010 14:56:27 -0600">Feb. 8, 2010</dfn></h3>Cache.php<br />
-Major rewrite of cache handling - now requires an instance<br />
<br />
Configuration.php<br />
-Added module option to constructor to interface Corpus class and module namespace<br />
<br />
Corpus.php<br />
-New __premeta function pulls the first scans data into the module namespace<br />
-$_cache and $_config added to the __load function, vis-&agrave;-vis the module namespace<br />
<br />
Modules<br />
-Updated for new 'name' meta attribute, 'call' depricated, 'callable' boolean added<br />
--Button.php<br />
--Crux.php<br />
--FlashLoader.php<br />
--FlickrFeed.php<br />
--LastFM.php<br />
--TwitterFeed.php<br />
-Configuration options added<br />
--FlickrFeed.php<br />
--LastFM.php<br />
--TwitterFeed.php<hr /><h3><dfn class="entryDate" title="Wed, 03 Feb 2010 16:54:54 -0600">Feb. 3, 2010</dfn></h3>functions/general.php<br />
&nbsp;&nbsp;-Updated nempty for PHP 5.3 compatibility (Weird casting bug)<br />
&nbsp;&nbsp;-Removed some unused, commented out, functions<hr /><h3><dfn class="entryDate" title="Tue, 02 Feb 2010 12:01:44 -0600">Feb. 2, 2010</dfn></h3>Updated XML and HTML Sitemaps<br />
<br />
HTML sitemap set to not show up in sitemap.<br />
XML sitemap updated to show non-databased pages.<hr /><h3><dfn class="entryDate" title="Mon, 01 Feb 2010 16:10:16 -0600">Feb. 1, 2010</dfn></h3>Replaced strings in db::fetch calls with db:: constants in the following files<br />
includes/classes/Cache.php<br />
includes/classes/Core.php<br />
includes/classes/Database.php<br />
includes/classes/Login.php<br />
includes/dbo/User.php<br />
includes/functions/corporeal.php<hr />Merge branch 'master' of github.com:donatj/CorpusPHP<hr />Database class updated to use constants rather than strings, documentation updated.<hr />Database class updated to use constants, documentation updated<hr />.gitignore updated to ignore MacOS metadata<hr /><h3><dfn class="entryDate" title="Fri, 29 Jan 2010 15:58:04 -0600">Jan. 29, 2010</dfn></h3>Small Updates to Modules :<br />
&nbsp;&nbsp;-Last.FM<br />
&nbsp;&nbsp;-Twitter Feed<br />
<br />
corpus/content/feed.rss.php :<br />
&nbsp;&nbsp;-Added working pubDate to RSS Feed<br />
<br />
css/shared.css :<br />
&nbsp;&nbsp;-Message Stack Display Issue fixed in shared.css<br />
<br />
includes/TODO :<br />
&nbsp;&nbsp;Added a TODO to track todos<br />
<br />
includes/functions/general.php :<br />
&nbsp;&nbsp;-Updated Comments<br />
&nbsp;&nbsp;-Function AuthNetProcess<br />
&nbsp;&nbsp;&nbsp;&nbsp;--Allowed passing a message stack for credit card processing errors<br />
&nbsp;&nbsp;&nbsp;&nbsp;--Added a by-reference response handler<br />
&nbsp;&nbsp;&nbsp;&nbsp;--Updated logging mechanism<hr /><h3><dfn class="entryDate" title="Wed, 27 Jan 2010 10:18:46 -0600">Jan. 27, 2010</dfn></h3>Added TODO to track issues<hr /><h3><dfn class="entryDate" title="Fri, 22 Jan 2010 16:05:20 -0600">Jan. 22, 2010</dfn></h3>Sitemap.php - Removed some site specific copy.<br />
table.php - Updated table module for integrated header support<br />
Upgraded: Mootools 1.2.3 -&gt; 1.2.4<br />
Added: Button.php button module<hr />Slight change in Last.fm API handeling<hr /><h3><dfn class="entryDate" title="Tue, 19 Jan 2010 14:19:56 -0600">Jan. 19, 2010</dfn></h3>Removed ::queryIfNot and merged functionality into ::query in db, Changed calls to queryIfNot<hr />Removed Portfolio images<hr /><h3><dfn class="entryDate" title="Thu, 14 Jan 2010 10:27:25 -0600">Jan. 14, 2010</dfn></h3>Slight preliminary updates to the Cache class, as well as updates to the PHP Documentor code in Corpus, Database and MessageStack classes<hr /></div>
<p>CorpusPHP is setting out to be a world class PHP Framework. The aim is simple, to provide encapsulation, modularization, and helpful tools, all without changing the way you write PHP.</p>
<p><strong>Project Information, documentation, and a timeline for the first release available  availble soon</strong></p>
<p>Nightly's available at <a href="http://github.com/donatj/CorpusPHP" target="_new">GitHub</a>, or download the latest milestone below.
<table class="datatable" style="width: 100%" cellpadding="0" cellspacing="0">
<tr><th align="left">Build</th><th align="left">Date</th><th align="left">Message</th></tr><tr class="odd"><td align="left">v0.98<br /><small><a href="http://github.com/donatj/CorpusPHP/zipball/v0.98">Download</a></small></td><td align="left"><dfn class="entryDate" title="Tue, 31 Aug 2010 11:14:23 -0500">Aug. 31, 2010</dfn></td><td align="left"><small>Arial Replaced with Vera, references to helvetica removed</small></td></tr><tr class=""><td align="left">v0.92<br /><small><a href="http://github.com/donatj/CorpusPHP/zipball/v0.92">Download</a></small></td><td align="left"><dfn class="entryDate" title="Fri, 14 May 2010 12:42:07 -0500">May. 14, 2010</dfn></td><td align="left"><small>Basic SSL support added</small></td></tr><tr class="odd"><td align="left">v0.9<br /><small><a href="http://github.com/donatj/CorpusPHP/zipball/v0.9">Download</a></small></td><td align="left"><dfn class="entryDate" title="Thu, 18 Feb 2010 13:05:58 -0600">Feb. 18, 2010</dfn></td><td align="left"><small>Repository Restructured<br />
-Working Corpus now in Source Folder<br />
-`Scripts` folder added, includes database dump batch, and README.md HTML viewer<br />
-`Local` folder added, for testing use with local database connections, etc<br />
<br />
Documentation<br />
-Finally! Created an initial README.md<br />
-TODO moved from includes folder into root</small></td></tr><tr class=""><td align="left">v0.85<br /><small><a href="http://github.com/donatj/CorpusPHP/zipball/v0.85">Download</a></small></td><td align="left"><dfn class="entryDate" title="Mon, 08 Feb 2010 14:56:27 -0600">Feb. 8, 2010</dfn></td><td align="left"><small>Cache.php<br />
-Major rewrite of cache handling - now requires an instance<br />
<br />
Configuration.php<br />
-Added module option to constructor to interface Corpus class and module namespace<br />
<br />
Corpus.php<br />
-New __premeta function pulls the first scans data into the module namespace<br />
-$_cache and $_config added to the __load function, vis-à-vis the module namespace<br />
<br />
Modules<br />
-Updated for new 'name' meta attribute, 'call' depricated, 'callable' boolean added<br />
--Button.php<br />
--Crux.php<br />
--FlashLoader.php<br />
--FlickrFeed.php<br />
--LastFM.php<br />
--TwitterFeed.php<br />
-Configuration options added<br />
--FlickrFeed.php<br />
--LastFM.php<br />
--TwitterFeed.php</small></td></tr><tr class="odd"><td align="left">v0.7<br /><small><a href="http://github.com/donatj/CorpusPHP/zipball/v0.7">Download</a></small></td><td align="left"><dfn class="entryDate" title="Wed, 03 Feb 2010 16:54:54 -0600">Feb. 3, 2010</dfn></td><td align="left"><small>functions/general.php<br />
	-Updated nempty for PHP 5.3 compatibility (Weird casting bug)<br />
	-Removed some unused, commented out, functions</small></td></tr><tr class=""><td align="left">v0.1<br /><small><a href="http://github.com/donatj/CorpusPHP/zipball/v0.1">Download</a></small></td><td align="left"><dfn class="entryDate" title="Wed, 02 Dec 2009 11:07:00 -0600">Dec. 2, 2009</dfn></td><td align="left"><small>Initial CorpusPHP Alpha Release</small></td></tr></table>
]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/Andrew_Gross</guid>
      <title>The Work of Andrew Gross</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Sat, 28 Nov 2009 15:21:09 CST</pubDate>
      <link>http://donatstudios.com/Andrew_Gross</link>
      <description><![CDATA[Details to Come]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/Donat_Studios_Launches</guid>
      <title>Donat Studios Officially Launches</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Mon, 26 Oct 2009 20:45:28 CST</pubDate>
      <link>http://donatstudios.com/Donat_Studios_Launches</link>
      <description><![CDATA[<p>After much ado, Donat Studios is finally live!</p>
<p>There are a few things left to complete. Eventually setting up the documentation and public git repository for CorpusPHP will certainly take up a fair amount of time. I'm still not quite sure what to put in my portfolio, I was thinking of for the time being just throwing a bunch of my sketches in there.</p>
<p>My reasoning and goals behind this site are slightly different than my other sites. More than anything I wanted a place where I could rant about everything web related. I have strong opinions on many topics, and where Oasisband.net is good for movies and politics, and PHPStandards is pretty much just raw anger directed at Zend, and my live journal is for my personal life. Donat Studios on the other hand will allow me to express my thoughts on web development, databases, html, php, ajax, design, basically everything I do at work.</p>
<p>Where does the name &quot;Donat Studios&quot; come from? I was getting some photos printed by a great place in St. Paul, &quot;White House Custom Color&quot; and they needed to know the name of my studio. I didn't have a studio, so I quickly made up &quot;Donat Studios&quot;. Later, I realized I liked the name, and it stuck.</p>
<p>Here's wishing my newest domain luck!</p>]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/JSONP</guid>
      <title>The Sad Truth About and Reasoning Behind JSONP</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Mon, 12 Oct 2009 16:36:35 CST</pubDate>
      <link>http://donatstudios.com/JSONP</link>
      <description><![CDATA[<p>I don&rsquo;t want anyone take this the wrong way.&nbsp; I am having a torrid affair with JSON. It is so much simpler to parse than XML, and is an all around exceptional way to represent data. I have one caveat though, and that is &ldquo;JSON with Padding&rdquo; or &ldquo;JSONP&rdquo; as it goes by.</p>
<p>While building <em>this site</em> I was trying to bring in images from my Flickr account, as you may have noticed. Building the module in PHP, I basically ran <em>file_get_contents</em> on the feeds url and passed that directly into json_decode. On print_r&rsquo;ing the results, it was null. It had failed.&nbsp; As a test I echoed the result of the file_get_contents to see what was up. It was succeeding at retrieving the feed, and at a glance it looked like JSON, yet it was failing to parse. I knew something was up. </p>
<p> Here is an example result set:</p>
<pre>jsonFlickrFeed({<br />                &quot;title&quot;: &quot;Uploads from donatj&quot;,<br />                &quot;link&quot;: &quot;http://www.flickr.com/photos/donatj/&quot;,<br />                &quot;description&quot;: &quot;&quot;,<br />                &quot;modified&quot;: &quot;2009-05-31T08:24:46Z&quot;,<br />                &quot;generator&quot;: &quot;http://www.flickr.com/&quot;,<br />                &quot;items&quot;: [<br />           {<br />                        &quot;title&quot;: &quot;STP81353&quot;,<br />                        &quot;link&quot;: &quot;http://www.flickr.com/photos/donatj/3581174864/&quot;,<br />                        &quot;media&quot;: {&quot;m&quot;:&quot;http://farm4.static.flickr.com/3568/3581174864_be1a44764e_m.jpg&quot;},<br />                        &quot;date_taken&quot;: &quot;2009-03-30T19:10:34-08:00&quot;,<br />                        &quot;description&quot;: &quot;&lt;p&gt;&lt;a href=\&quot;http://www.flickr.com/people/donatj/\&quot;&gt;donatj&lt;\/a&gt; posted a photo:&lt;\/p&gt; &lt;p&gt;&lt;a href=\&quot;http://www.flickr.com/<br />photos/donatj/3581174864/\&quot; title=\&quot;STP81353\&quot;&gt;&lt;img src=\&quot;http://farm4.static.flickr.com/3568/3581174864_be1a44764e_m.jpg\&quot; width=\&quot;180\&quot; height=\&quot;240\&quot; alt=\&quot;S<br />TP81353\&quot; /&gt;&lt;\/a&gt;&lt;\/p&gt; &quot;,<br />                        &quot;published&quot;: &quot;2009-05-31T08:24:46Z&quot;,<br />                        &quot;author&quot;: &quot;nobody@flickr.com (donatj)&quot;,<br />                        &quot;author_id&quot;: &quot;30444376@N08&quot;,<br />                        &quot;tags&quot;: &quot;&quot;<br />           }<br />        ]<br />})</pre><p>On further examination I noticed, as you should have noted, the data is wrapped in a function.&nbsp; My first thought was that this violates the <a href="http://www.ietf.org/rfc/rfc4627.txt?number=4627">JSON Specification</a>, so I immediately tweeted about how silly it was for Flickr to have an invalid JSON feed when their parent company Yahoo employs Douglas Crockford, the creator of JSON. I soon received a response from a colleague informing me that this was JSONP. He explained what it was, and how to use it in jQuery.</p>
<p>	It basically comes down to this:&nbsp; XMLHttpRequest will not, for cross site scripting protection, work across domains.&nbsp; Therefore, JSON cannot be directly retrieved nor parsed via JavaScript across domains.<br />
	This is where JSONP comes in.&nbsp; JSONP is essentially a regular JSON result set wrapped in a function.&nbsp; Rather than using XMLHttpRequest to retrieve the document, you dynamically attach a script tag to the page pointing the the JSONP document, which evokes a function call passing your JSON object to whatever function the JSONP is set to pass the data to, forgoing the need to eval anything.</p>
<p>I have a number of <em>criticisms</em> of this approach.</p>
<ul>
	<li>First and foremost, JSONP      is at its very heart remote code execution.&nbsp; You must have <em>absolute</em> faith not only in the intentions of the site you are      bringing the feed in from, but the security of said site as well, because      the code is in fact being <strong><em>executed</em></strong> by the browser with <em>no      chance</em> for putting regular expressions or other such safety mechanisms      in place. This makes your site and visitors <em>wide open</em> to <strong>any and      all</strong> malicious code a hacker may plant in the feed.</li>
	<li>JSONP is a language specific      data type. What I mean by this is that JSONP is designed <em>for</em> <strong>JavaScript</strong>, and even then <strong>strictly      in the context of a web browser</strong>.&nbsp;      There is no <em>need, none,</em> for JSONP anywhere else or in any other language (PHP, ASP.Net, Ruby on      Rails). Making a <em>feed</em> in a      language specific format is inherently in <em>bad form</em>.</li>
	<li>Adding to the last point,      other languages currently cannot naturally parse JSONP. As I ran into in      PHP, it is <em>not valid JSON</em> and      json_decode will not handle it.&nbsp; My colleagues      answer was to write a regular expression to remove the function, but this      is at best a hack.</li>
	<li>Mixing function and data      goes in the face of <em>separation of concerns.</em> You&rsquo;ve got logic in your data, you&rsquo;ve got data in your logic.&nbsp; Bad form, good sir, bad form.</li>
</ul>
<p>JSONP is in many cases an unsafe practice, and more over its just <em>evil</em>. It is a necessary evil in some cases, but evil none the less.</p>
<p>There is at <em>least</em> one<strong> safe alternative</strong> to JSONP, and I&rsquo;m willing to wager more. The simplest solution provided you have access to server side code is to download, sanitize, optionally cache, and finally pass locally any remote JSON to the client rather than having the clients machine directly load the feed. Yes, this is added overhead on your side, bur for much added <strong>security</strong>.</p>
<p>If nothing else, it is up to you to weigh the risks and benefits before blindly using JSONP.</p>]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/?id=13</guid>
      <title>Regional Tibetan Youth Congress Minnesota</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Wed, 31 Dec 1969 18:00:00 CST</pubDate>
      <link>http://donatstudios.com/?id=13</link>
      <description></description>
    </item>
    <item>
      <guid>http://donatstudios.com/XML_Excel_Exporter</guid>
      <title>XML Excel Exporter</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Mon, 07 Jun 2010 16:54:58 CST</pubDate>
      <link>http://donatstudios.com/XML_Excel_Exporter</link>
      <description><![CDATA[<h1>XML Excel Exporter</h1>
<p>Current available for download at GitHub as part of CorpusPHP <a href="http://github.com/donatj/CorpusPHP/blob/master/Source/includes/classes/XSpreadsheet.php">here</a> the class is in no way dependant on any other part of Corpus.<p>
<p>The files generated will work with versions of Office 2003 and up. It is considered production safe, and is currently in use in a fair number of production sites.<p>


<h3>Known bugs:</h3>
<ul>
	<li>Office 2007 barks about XLS file extensions despite refusing to open XML file extensions downloaded from the internet.</li>
	<li>DOMDocument incorrectly converts several non-printed/low range characters (eg: &amp;#10;).</li>
</ul>

<h3>Limitations:</h3>
<ul>
	<li>File Format is not supported by:
	<ul>
		<li>Open Office</li>
		<li>Google Documents</li>
		<li>Microsoft Office Live</li>
	</ul>
	</li>
</ul>


<h3 align="center">More Info Soon</h3>]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/Projects</guid>
      <title>Code &amp; Projects</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Wed, 31 Dec 1969 18:00:00 CST</pubDate>
      <link>http://donatstudios.com/Projects</link>
      <description></description>
    </item>
    <item>
      <guid>http://donatstudios.com/Portfolio</guid>
      <title>Portfolio</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Wed, 31 Dec 1969 18:00:00 CST</pubDate>
      <link>http://donatstudios.com/Portfolio</link>
      <description><![CDATA[I have been building sites for many years, and the following is a collection of my works.]]></description>
    </item>
    <item>
      <guid>http://donatstudios.com/Blog</guid>
      <title>Blog</title>
      <author>noreply@donatstudios.com(Donat Studios)</author>
      <pubDate>Wed, 31 Dec 1969 18:00:00 CST</pubDate>
      <link>http://donatstudios.com/Blog</link>
      <description></description>
    </item>
  </channel>
</rss>

