<?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>botsko &#187; PHP</title>
	<atom:link href="http://www.botsko.net/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.botsko.net/blog</link>
	<description>continuing education</description>
	<lastBuildDate>Sat, 24 Jul 2010 21:42:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PHP5 Class for Authorize.net AIM API</title>
		<link>http://www.botsko.net/blog/2010/04/23/php5-class-for-authorize-net-aim-api/</link>
		<comments>http://www.botsko.net/blog/2010/04/23/php5-class-for-authorize-net-aim-api/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 18:36:33 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=564</guid>
		<description><![CDATA[I recently had the need to integrate a project with the Authorize.net API and I spent some time searching for an existing PHP class/object that would handle it. While I found several, they seemed to be somewhat out of date, not properly maintained, and most importantly &#8211; ugly. I set out write a very clean, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the need to integrate a project with the Authorize.net API and I spent some time searching for an existing PHP class/object that would handle it. While I found several, they seemed to be somewhat out of date, not properly maintained, and most importantly &#8211; ugly.</p>
<p>I set out write a very clean, well organized class that was specifically designed for PHP5. I&#8217;ve published the class on github and would appreciate any patches you wish to submit back.</p>
<p><a href="http://github.com/botskonet/authorize.net">http://github.com/botskonet/authorize.net</a></p>
<p>The class is very basic and will handle the transaction beautifully. It&#8217;s working great in a current project. While there are always features I would like to add as the projects grow, this is entirely ready for use and testing now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2010/04/23/php5-class-for-authorize-net-aim-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fastspring.com Ecommerce PHP Class</title>
		<link>http://www.botsko.net/blog/2010/01/18/fastspring-com-ecommerce-php-class/</link>
		<comments>http://www.botsko.net/blog/2010/01/18/fastspring-com-ecommerce-php-class/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 23:02:17 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=515</guid>
		<description><![CDATA[I&#8217;ve recently done some work with the Fastspring.com ecommerce website. It&#8217;s essentially similar to the flow of a paypal purchase &#8211; companies create pages with products and Fastspring acts as the checkout process doing the user information/payment processing work for you. The customer service was above average but I had to take advantage of it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently done some work with the Fastspring.com ecommerce website. It&#8217;s essentially similar to the flow of a paypal purchase &#8211; companies create pages with products and Fastspring acts as the checkout process doing the user information/payment processing work for you.<br />
<span id="more-515"></span><br />
The customer service was above average but I had to take advantage of it frequently as their documentation is poor. Their technical documentation is almost non-existent, so integrating a client website with the Fastspring.com order pages was difficult.</p>
<p>In the course of that work I&#8217;ve developed this basic class for PHP5. This class assists with creating the proper product links or product order forms. This class is currently in a working state but does not have any unit testing or hard-core testing being done, nor does it cover all of the available ways to integrate.</p>
<p>Go ahead and use it and let me know if you have any issues. As always, feel free to contribute patches back via github.</p>
<p><a href="http://github.com/botskonet/fastspring_php">http://github.com/botskonet/fastspring_php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2010/01/18/fastspring-com-ecommerce-php-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download Old CakePHP Versions</title>
		<link>http://www.botsko.net/blog/2010/01/08/download-old-cakephp-versions/</link>
		<comments>http://www.botsko.net/blog/2010/01/08/download-old-cakephp-versions/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 18:28:36 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=509</guid>
		<description><![CDATA[I&#8217;m not really a fan of CakePHP, but I work with it often and understand it well. I recently had a project where a previous developer modified random cakephp library files directly, thus making it difficult for me to upgrade the framework. I determined that the version currently in use was 1.2.1.8004, which surprisingly is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not really a fan of CakePHP, but I work with it often and understand it well. I recently had a project where a previous developer modified random cakephp library files directly, thus making it difficult for me to upgrade the framework.<br />
<span id="more-509"></span><br />
I determined that the version currently in use was 1.2.1.8004, which surprisingly is no longer available for download from the <a href="http://www.cakephp.org">CakePHP</a> website. I even jumped onto IRC to ask folks where older versions were kept and no one was able to help.</p>
<p>I finally just pulled the cakephp source from the <a href="http://github.com/cakephp/cakephp1x">github account</a>. I knew from the comments in the cakephp release that it was from 1/16/2009, so I looked for any commits that occured that day.</p>
<p>I determined that <a href="http://github.com/cakephp/cakephp1x/commit/9f83e96fb9ddaf69c9b9df51b69dcf115c41dc01">9f83e96</a> was the official tag before the release. Once you have the cakephp repository cloned to your local machine, it&#8217;s easy to simply checkout that specific commit.</p>
<p><code>$ git clone git://github.com/cakephp/cakephp1x.git<br />
$ cd cakephp1x<br />
$ git checkout 9f83e96</code></p>
<p>Voila! Depending on what you want to do with this code, you can simply zip it up and go or create a new git branch.</p>
<p><code>$ git checkout -b your-branch-name</code></p>
<p>The CakePHP team really needs to restore an archive with old releases, or tell me where they&#8217;ve hidden it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2010/01/08/download-old-cakephp-versions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing Peregrine &#8211; a PHP Security Class</title>
		<link>http://www.botsko.net/blog/2009/12/30/announcing-peregrine-a-php-security-class/</link>
		<comments>http://www.botsko.net/blog/2009/12/30/announcing-peregrine-a-php-security-class/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 01:15:19 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=506</guid>
		<description><![CDATA[Today I release a new php caging class for improved security &#8211; Peregrine. I&#8217;ve always been impressed by the idea of a &#8220;variable cage&#8221; in programming. It&#8217;s an additional method of protecting your incoming variables and making sure that you only accept what you&#8217;re expecting. If you&#8217;re not familiar with a cage, think of it [...]]]></description>
			<content:encoded><![CDATA[<p>Today I release a new php caging class for improved security &#8211; <a href="http://github.com/botskonet/Peregrine">Peregrine</a>.</p>
<p>I&#8217;ve always been impressed by the idea of a &#8220;variable cage&#8221; in programming. It&#8217;s an additional method of protecting your incoming variables and making sure that you only accept what you&#8217;re expecting.</p>
<p>If you&#8217;re not familiar with a cage, think of it as a class that copies any (usually incoming) data into an object while destroying the original &#8220;unclean&#8221; data. At this point you must access this data through the &#8220;cage&#8221;, which provides a whole bunch of ways to filter out what you don&#8217;t want.</p>
<p>So an incoming variable (through a GET/POST request for example) may only need to be a integer. You may use a method that returns or checks for integers, and either removes non-integer characters or returns false.</p>
<p>This provides an excellent wall against any malicious attackers, and really helps you define data validation more accurately within your projects.</p>
<p>There are some others out there, and some are very good. However, none worked as well or were as cleanly coded as I would have liked, so I&#8217;ve been working on <strong>Peregrine</strong>.</p>
<p>It&#8217;s hosted at github so you&#8217;re welcome to fork it and contribute back any fixes or feature requests you would like. </p>
<p>To learn how to use it, please read the documentation provided with the code and look through the class itself.</p>
<p><a href="http://github.com/botskonet/Peregrine">http://github.com/botskonet/Peregrine</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/12/30/announcing-peregrine-a-php-security-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing GMT in MySQL, Timezone Conversion in PHP</title>
		<link>http://www.botsko.net/blog/2009/08/13/storing-gmt-in-mysql-timezone-conversion-in-php/</link>
		<comments>http://www.botsko.net/blog/2009/08/13/storing-gmt-in-mysql-timezone-conversion-in-php/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 19:00:22 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=353</guid>
		<description><![CDATA[At Trellis Development we&#8217;re working on several applications which need to frequently convert dates between various time zones. By default, both PHP and MySQL operate using a single timezone which is identified during installation and is quite often the same as the host server. Both tools allow you to specify a different timezone on the [...]]]></description>
			<content:encoded><![CDATA[<p>At Trellis Development we&#8217;re working on several applications which need to frequently convert dates between various time zones.</p>
<p>By default, both PHP and MySQL operate using a single timezone which is identified during installation and is quite often the same as the host server. Both tools allow you to specify a different timezone on the fly, and all following date operations work based off of that locale.</p>
<p>The primary goal is to preserve a base standard time so that we can easily convert between different timezones, without loosing the ability to convert again. Two choices emerged &#8211; storing a Unix Time stamp or a date string stored using GMT/UTC time.<br />
<span id="more-353"></span></p>
<p>The Unix Time stamp is a count of the number of seconds since January 1 1970 00:00:00 GMT. </p>
<p>The only difference between the two is that the time stamp is an integer so it makes no sense when read directly from the database. People don&#8217;t immediately understand that the date <em>1248988280</em> refers to 21:11:20 30-Jul-09 GMT. It makes more sense to me to store the dates in a format that&#8217;s easy to read, so we decided on storing GMT.</p>
<p>In the following demonstration, I show how to get the local time first and then convert that to GMT.</p>
<pre class="brush: php;">
$base_time = time();

// print my local time
print date(&quot;H:i:s d-M-Y T&quot;, $base_time); // 14:49:49 30-Jul-2009 PDT

// Convert my local time to GMT
$gmt = gmdate(&quot;H:i:s d-M-Y T&quot;, $base_time);
print $gmt; // 21:49:49 30-Jul-2009 GMT
</pre>
<p>However, when developing the application it makes most sense to just generate the GMT date first. PHP has a great function for handling that called gmdate:</p>
<pre class="brush: php;">
gmdate(&quot;H:i:s d-M-Y T&quot;);
</pre>
<p>At this point you can store that GMT format to your database. In MySQL, the supported date string format is the standard YYYY-MM-DD HH:MM:SS. The important thing is that you remember that the times are in GMT and will <em>always</em> need to be converted to local time for display.</p>
<p>Once you pull a record with the GMT date, you can then convert it to a specific timezone. The following example requires PHP 5.2 or above.</p>
<pre class="brush: php;">
$cnv_date = new DateTime($gmt);
$cnv_date-&gt;setTimeZone(new DateTimeZone('America/New_York'));
print $cnv_date-&gt;format('H:i:s d-M-Y T'); // 17:49:49 30-Jul-2009 EDT
</pre>
<p>Now, we have a standard date string in GMT stored in the database, and we can easily convert it to another timezone without changing the entire server timezone.</p>
<p>I would recommend that you wrap this functionality into a basic object within your application. Although it&#8217;s not much work for each conversion, it would further reduce the amount of code and give you a central point of management.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/08/13/storing-gmt-in-mysql-timezone-conversion-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating QuickBooks for Mac-based Users</title>
		<link>http://www.botsko.net/blog/2009/07/31/integrating-quickbooks-for-mac-based-users/</link>
		<comments>http://www.botsko.net/blog/2009/07/31/integrating-quickbooks-for-mac-based-users/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 02:57:57 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=346</guid>
		<description><![CDATA[During development of a recent point-of-sale / e-commerce package, I started researching ways of exporting data from a web-based application into QuickBooks. A decent tool called Web Connector allows QB to connect with a web source and share information, and there&#8217;s even what appears to be a very thorough PHP class for interfacing. However, Web [...]]]></description>
			<content:encoded><![CDATA[<p>During development of a recent point-of-sale / e-commerce package, I started researching ways of exporting data from a web-based application into QuickBooks. A decent tool called Web Connector allows QB to connect with a web source and share information, and there&#8217;s even what appears to be a <a href="https://idnforums.intuit.com/messageview.aspx?catid=56&amp;threadid=9164">very thorough PHP class</a> for interfacing.</p>
<p>However, Web Connector is Windows-only. My client runs a Mac.</p>
<p>Disclaimer: Prepare to be disappointed.</p>
<p><span id="more-346"></span></p>
<p>My next choice was to use the Intuit-Interchange Format (IIF) files that QuickBooks has supported for importing/exporting data for years. It&#8217;s drawbacks include the need to manually export the files, reduced stability/security that comes with using text-based files, and the need to manually link various transactions once inside QB.</p>
<p>Having so many drawbacks isn&#8217;t a good start, and when I thought about how much manual work would be involved for the client if they wanted shipping, payments, sales, and customers all connected, I decided it would not be a good solution.</p>
<p>As expected, I found <em>thousands</em> of forum posts of people looking for some solution in PHP with IIF. To my surprise, there seemed to be absolutely <em>no</em> class, package, tutorial, or any proof that anyone had ever used PHP to generate IIF. I know folks have done it, but no one shared their code.</p>
<p>If I were to generate IIF, I&#8217;d have write the class from scratch.</p>
<p>Seeking some solution, any solution, I posted my own <a href="http://stackoverflow.com/questions/1168758/quickbooks-on-mac-php5-no-web-connector">question on Stack Overflow</a>, and even <a href="http://twitter.com/botsko/status/2786986615">Twitter</a>, and got exactly what I feared. More <a href="http://twitter.com/QuickBooksMac/status/2820210799">IIF</a>, and more advice to <a href="http://stackoverflow.com/questions/1168758/quickbooks-on-mac-php5-no-web-connector#answer-1168784">avoid it</a>. Intuit even recommends avoiding IIF because of how poor it is.</p>
<p>I have been unable to find any solution that works well. I&#8217;ve had to advise the client that the best option is to move to QuickBooks on Windows &#8211; running Windows in BootCamp/Virtualization mode on Mac. I&#8217;m not sure how this will turn out, because that&#8217;s an extra expense of Windows, and maybe a new QB license.</p>
<p>Intuit has released no information regarding porting web connector to Mac. QB was always a Windows-first-then-port type software package, so it&#8217;s not surprising.</p>
<p>If anyone has a solution, <a href="http://www.botsko.net/Contact-Us">let me know</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/07/31/integrating-quickbooks-for-mac-based-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Currently Scheduled PCC Courses</title>
		<link>http://www.botsko.net/blog/2009/07/22/currently-scheduled-pcc-courses/</link>
		<comments>http://www.botsko.net/blog/2009/07/22/currently-scheduled-pcc-courses/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 00:12:56 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=340</guid>
		<description><![CDATA[Javascript I am currently teaching Introduction to Javascript at the PCC Mt. Tabor center in SE Portland. Classes are every Monday until August 24, and there&#8217;s still room in the course for those interested. Follow the link above to enroll. The book was already chosen as I&#8217;m essentially a substitute on this one. Despite being [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Javascript</strong><br />
I am currently teaching <a href="http://www.pcc.edu/schedule/default.cfm?fa=dspCourse2&#038;thisTerm=200903&#038;crsCode=CEU978A&#038;subjCode=CEU&#038;crsNum=978A&#038;topicCode=CWB&#038;subtopicCode=WEBDEV&#038;crnList=33452">Introduction to Javascript</a> at the PCC Mt. Tabor center in SE Portland. Classes are every Monday until August 24, and there&#8217;s still room in the course for those interested. Follow the link above to enroll.</p>
<p>The <a href="http://www.amazon.com/JavaScript-TM-Step-Steve-Suehring/dp/0735624496/ref=sr_1_1?ie=UTF8&#038;qid=1247870366&#038;sr=8-1">book</a> was already chosen as I&#8217;m essentially a substitute on this one. Despite being published by Microsoft, it covers some essential topics for developing on the web today. It even mentions Firebug (a firefox extension) so it&#8217;s nice that it&#8217;s not biased towards MSFT.</p>
<p><strong>PHP</strong><br />
In October, I will be teaching the <a href="http://www.pcc.edu/schedule/default.cfm?fa=dspCourse2&#038;thisTerm=200904&#038;crsCode=CEU9789&#038;subjCode=CEU&#038;crsNum=9789&#038;topicCode=CWB&#038;subtopicCode=WEBDEV">Introduction to PHP</a> course a bit closer to where I live and work. I have not yet selected a book, but I&#8217;m currently working on adapting Trellis internal training materials.</p>
<p>There are still spots open so go ahead and register!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/07/22/currently-scheduled-pcc-courses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Studio 7</title>
		<link>http://www.botsko.net/blog/2009/06/24/zend-studio-7-beta/</link>
		<comments>http://www.botsko.net/blog/2009/06/24/zend-studio-7-beta/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 20:22:27 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=321</guid>
		<description><![CDATA[Recently, version 7 of Zend Studio was released. Very unhappy with version 6, but previously satisfied with Zend 5.5, I decided to give it another chance to see if they had any luck improving the user experience. Zend charges you $399 per year to use this software. They&#8217;ve got a standard toolkit for every php [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, version 7 of Zend Studio was released. <a href="http://www.botsko.net/blog/2009/03/php-ide-complaints-ie-zend-studio-6-is-crap/">Very unhappy with version 6</a>, but previously satisfied with Zend 5.5, I decided to give it another chance to see if they had any luck improving the user experience.</p>
<p>Zend charges you $399 per year to use this software. They&#8217;ve got a standard toolkit for every php developer from phpunit support, documentation support, subversion support, code galleries, etc. These would be very useful if Zend had not gotten the user experience part all wrong. For $399 per year, they better have some great advantage over FREE competitors like NetBeans IDE.</p>
<p><span id="more-321"></span><br />
Many of the problems that plagued the last version are problems with the base software (Eclipse), and will remain as long as they continue building upon this platform. Whoever decided to stray from the decent platform in version 5.5 and build 6 on Eclipse needs to explain their decision to their user community.</p>
<p>Eclipse is bulky, over-complicated, and most importantly it has horrible user experience for anyone other than Linux geeks. Building a professional, cross-platform product that costs several hundred per year on this platform was an awful mistake, which is clear in the titles you get when you search for &#8220;zend studio 6&#8243;.</p>
<p>The user interface has been cleaned up in version 7 so it feels more consistent with other programs. It&#8217;s download size is a massive 358MB, while NetBeans for PHP was roughly 25MB. Zend has improved the performance both in start up times and in memory usage.</p>
<p>The &#8220;clunkiness&#8221; of the application is better hidden, but the usability still suffers from almost every single complaint I had about version six. It seems that little has changed besides some the toolbar cleanup, code editing improvements, and performance.</p>
<p>This almost seems to be like Vista was to XP. Folks at Zend (and Microsoft) need to understand that you can&#8217;t make something this bad and convince people that it&#8217;s worth $399 per year. Not even $399 as a single, one-time price.</p>
<p>What&#8217;s worse is that with each new version, Zend adds more support for Zend products. I&#8217;m glad they support everything Zend &#8211; but what if users equally avoid/dislike other zend products? Why does Zend Studio only have built-in support for Zend Framework &#8211; what about cakephp, codeigniter, and others?</p>
<p>For those considering using Zend Studio, I would recommend against it unless you&#8217;re deeply tied to other Zend products (server, framework, etc).</p>
<p>NetBeans is completely free, and works just as well. While it has a few items I could complain about, it&#8217;s much better for my business.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/06/24/zend-studio-7-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Form Builder Plugin</title>
		<link>http://www.botsko.net/blog/2009/04/07/jquery-form-builder-plugin/</link>
		<comments>http://www.botsko.net/blog/2009/04/07/jquery-form-builder-plugin/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 23:26:11 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=295</guid>
		<description><![CDATA[Trellis Development (a parent company of web-based products which I co-founded) has been developing a custom content management system which needed a form creation tool. I adapted a form builder that I created for a previous project as a jQuery 1.3 plugin. It loads in existing form structure data through an XML file (which would [...]]]></description>
			<content:encoded><![CDATA[<p>Trellis Development (a parent company of web-based products which I co-founded) has been developing a custom content management system which needed a form creation tool. I adapted a form builder that I created for a previous project as a jQuery 1.3 plugin. It loads in existing form structure data through an XML file (which would be generated on the server) and passes the changes as a serialized array back to the server.</p>
<p><a href="http://experiments.botsko.net/tests/formbuilder/">View the Demonstration</a><br />
<a href="http://github.com/botskonet/jquery.formbuilder/tree/master">Get source from github</a></p>
<p>I&#8217;ve forked the code from the cms to serve as a stand-alone plugin. It&#8217;s extremely easy to setup, as all you need to do is to activate it on an un/ordered list item element. Then, write your backend code to handle the incoming array as you need, and output the xml data for when the form loads.</p>
<pre class="brush: xml;">
&lt;ul id=&quot;form-builder&quot;&gt;&lt;/ul&gt;
</pre>
<pre class="brush: jscript;">
$(document).ready(function(){
	$('#form-builder').formbuilder({
		'save_url': 'save.php',
		'load_url': 'form-a.xml'
	});
});
</pre>
<p>The <code>save_url</code> is the url that the ajax will be sent to when the user saves the form. The form information is serialized so that the backend programming may handle it as an array.</p>
<p>The <code>load_url</code> is the url of an xml file that describes any existing form information, and the system uses it to restore the fields.</p>
<p>This requires jQuery 1.3+ and uses the scrollTo plugin for nice scrolling.</p>
<p>This is the first revision that&#8217;s external to our cms so I&#8217;ve labeled it 0.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/04/07/jquery-form-builder-plugin/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>PHP IDE Complaints, i.e. Zend Studio 6 is Crap</title>
		<link>http://www.botsko.net/blog/2009/03/18/php-ide-complaints-ie-zend-studio-6-is-crap/</link>
		<comments>http://www.botsko.net/blog/2009/03/18/php-ide-complaints-ie-zend-studio-6-is-crap/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 16:59:49 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=249</guid>
		<description><![CDATA[Updated: 6/6/09: As of now, I&#8217;ve settled on NetBeans as my primary IDE, and Textmate as my secondary. Read below for reasons. In my line of work, a code editing tool is something that you spend almost all of your day with. There are so many that I keep forgetting what I don&#8217;t like about [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Updated: 6/6/09: As of now, I&#8217;ve settled on NetBeans as my primary IDE, and Textmate as my secondary. Read below for reasons.</strong></p>
<p>In my line of work, a code editing tool is something that you spend almost all of your day with. There are so many that I keep forgetting what I don&#8217;t like about each one, and I return to it six months later thinking it was decent. Here, I&#8217;m going to try to outline all of my complaints about each one.</p>
<p>If you&#8217;re a developer of any of these, please let me know what I can do to help you fix these problems, or please contact me to explain why I&#8217;m failing to see your genius.  I&#8217;m certain that I&#8217;ve been through all of the big ones so if I&#8217;m missing one, please let me know.</p>
<p>In general, my must-have features are typically:</p>
<p><span id="more-249"></span></p>
<ul>
<li>Project support. I&#8217;d really prefer to have project files kept outside my project directory. I need to be able to have multiple projects open at once.</li>
<li>Code Assist &#8211; hinting php built-in functions as well as my own.</li>
<li>A decent copy/paste system. If I double-click the word, highlight the $ too.</li>
<li>Support for subversion from within the UI. Ability to do all svn commands.</li>
<li>At least some level of phpdoc auto-generation when I type /**</li>
<li>Support for generating phpDoc output would be nice, but not critical</li>
<li>Basic syntax error highlighting as I type.</li>
<li>Smart closing character writing, smart indenting.</li>
<li>Find/replace in files.</li>
<li>A way to compare files against other files, latest from repository, etc</li>
</ul>
<p>Most of the IDEs below have most of those features, but either make it hard to work with or just plain broken.</p>
<p><strong>Komodo 5</strong></p>
<ul>
<li>It&#8217;s very clean, relatively fast, supports a fair amount of the above criteria, and has a very easy to navigation preferences pane. It&#8217;s also cross-platform and NOT java-based.</li>
<li>Learning how to use projects was a bit ugly at first, but it&#8217;s something I got used to.</li>
<li>Since projects use references that point to files, it&#8217;s hard for me to move/delete/add file directly to the file system through the project pane. I&#8217;ve become so used to this that it&#8217;s a big pain. What&#8217;s more confusing is that the file references look like files on disk, so my natural instinct is to copy them.</li>
<li>Doesn&#8217;t seem to have any way of creating a new project while checking out a subversion repo at the same time.</li>
<li>Doesn&#8217;t have built-in support for phpDoc generation like zend does. It generates the comment structure fine, but it doesn&#8217;t fill-in any @ params. Not critical, but a nice time-saver.</li>
<li>The subversion integration is a bit lacking. I can&#8217;t find a way to do a bulk-add of files. Sometimes I&#8217;ll add several new files to a project and when it&#8217;s time to commit my changes, I can&#8217;t recall all of them. Thus, some files are not added because I missed them. I also can&#8217;t seem to run a history command on a folder to see all changes to the contents. I seem to be limited to running those commands on individual files.</li>
<li>I can&#8217;t compare against the repository in a side-by-side view. The only way I have of seeing the file differences is a standard diff view from svn. This is fine for me, but for large files and designers helping me, it&#8217;s not ideal.</li>
<li>Syntax highlighting is fair to start out with, but I only have the choice of 70 standard colors. I have a specific set of colors I use, and almost none of them are available.</li>
<li>Copying portions of text is smarter than in zend, especially php embedded within html. However, it doesn&#8217;t seem to complete my quotes and it&#8217;s not very smart about where to put a closing function bracket. It always places it on the same line. I would appreciate it if it would place it on the next line, indent it properly, and avoid it completely if one already exists.</li>
</ul>
<p><strong>Zend Studio 6</strong></p>
<p>I have several complaints about the Eclipse project (built in java) that Zend 6 is built on top of to begin with, but I&#8217;ll skip those. Essentially, I feel that it was a poor choice for a professional-level product.</p>
<ul>
<li>When designing this tool, Zend didn&#8217;t pay attention to the KISS principle. There are about thirty ways to create a project and they&#8217;re all clunky. WAY too many.</li>
<li>A ton of preferences, menu items, etc, are organized into folders despite having only one item inside of it. Navigating the options is a nightmare.</li>
<li>Preferences editor is horribly confusing.</li>
<li>I stumped the user forums when I asked how to save a php file to my hard drive, not inside my projects. Just a single file -&gt; save as forces me to save it inside a project. Really?</li>
<li>Mac has an issue with java-based programs where it can be difficult to tell mac that the program is the default for that extension. Really lame. Another reason java base not so smart.</li>
<li>To open files, you must do so from within the program and it will not work by clicking on a file externally and expecting the app to open.</li>
<li>Checking out a project from svn and placing it in the directory I wanted it to be in rather than the default was an unpleasantly lame process.</li>
<li>My favorite feature in Zend 5 was the command-d duplication of the current line/selection. It seems to be completely gone from 6.</li>
<li>There doesn&#8217;t seem to be way a continue a text search after you&#8217;ve closed the search window. In Z5 it was command-G.</li>
<li>Just discovered a lovely bug that disables code assist entirely when you&#8217;ve created a project from a subversion project. That&#8217;s really lame.</li>
<li>Can&#8217;t figure out why the equals signs in my html are black. No syntax coloring is set to black as far as I can tell in the entire app. Since my background is a dark color, they vanish. There are also about five different places syntax coloring is set for a single mixed php/html/js file.</li>
<li>Line numbering and code window background is black like I want. Code folding icon column still white so it&#8217;s nice and ugly.</li>
<li>&#8220;Potential&#8221; code errors trying to helpful. It warns me that a variable is never used despite the fact that it&#8217;s an array that&#8217;s being added to a few lines down.</li>
<li>The weird xml editor window is&#8230; weird. Can&#8217;t I just edit the text? Call me oldschool I guess. There is a way to edit the xml file in the &#8220;text&#8221; mode, but to set that as default I can see.</li>
<li>Weird UI glitches &#8211; like random chunks of the editor window going white after a copy/paste. Need to change tabs and back again to fix it.</li>
<li>It seems to time out randomly when using subversion that has been installed in the default, svnserve way. No way to work or cancel until action times out, sometimes taking six minutes!</li>
<li>Poorly organized context menu on files. Creating a new test case file seems like it would be in the Debug option, but it&#8217;s in the new file option. I can&#8217;t rename a file without using the Refactor tool.</li>
</ul>
<p>They designed zend studio 6 for human use, right?</p>
<p><strong>Zend Studio 5</strong></p>
<ul>
<li>Decent tool. A bit outdated now, but it&#8217;s still fairly simple to use and it has most of the power that I really like.</li>
<li>However, it&#8217;s not the most recent version and I will not be able to use it forever. It does lack some of the more advanced features it&#8217;s new version supports, but it doesn&#8217;t have any major flaws that prevent me from using it.</li>
<li>It does fall victim to the mac editor issue with files not opening properly.</li>
<li>It&#8217;s still a bit large and resource heavy, where as the very similar Komodo is not.</li>
</ul>
<p><strong>PHP Eclipse</strong></p>
<ul>
<li>It&#8217;s based on eclipse so it feels like zend studio 6, so it shares almost every problem.</li>
<li>It doesn&#8217;t have the higher level tools I enjoy in zend &#8211; phpdoc generation, code galleries, templates, etc.</li>
<li>Not as easy to install.</li>
<li>A little too open source for me. No feeling of support or tested stability.</li>
</ul>
<p><strong>NetBeans PHP IDE</strong></p>
<p>PHP support is very recent for the NetBeans suite but it was decent in 6.5, and is very good in 6.7RC1. NetBeans has almost everything I want &#8211; integrated svn, integrated ftp, clean look, easy to use, etc.</p>
<p>Currently, I seem to be seeing some bugs with php code completion for PHP default functions and how the system handles svn:ignore properties, but other than that it&#8217;s been working great. And, it&#8217;s cross-platform.</p>
<p>They seem to be releasing updates frequently (Zend has not had any updates for over a year) so that&#8217;s even more encouraging.</p>
<p>For quick code editing tasks, I&#8217;ve been using Textmate. It&#8217;s support for bundles and how lightweight it is makes it one amazing tool.</p>
<p>BBedit is too costly for quick code work, but I like how fast it starts up. I don&#8217;t like how it handles multiple files &#8211; with so many apps using tabs now, the file list on the right is too weird.</p>
<p>Coda is great as well but I&#8217;m not satisfied with how it handled svn integration, how long 1.5 takes to start, and general problems with syntax highlighting / code completion. For more css-based work, it&#8217;s excellent.</p>
<p>Thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2009/03/18/php-ide-complaints-ie-zend-studio-6-is-crap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
