<?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"
	>

<channel>
	<title>Gavin on PHP</title>
	<atom:link href="http://zoeandgavin.com/wpmu/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://zoeandgavin.com/wpmu/php</link>
	<description>Web Development</description>
	<pubDate>Wed, 23 Jul 2008 19:16:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Upgraded to PHP5</title>
		<link>http://zoeandgavin.com/wpmu/php/2008/06/09/upgraded-to-php5/</link>
		<comments>http://zoeandgavin.com/wpmu/php/2008/06/09/upgraded-to-php5/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 13:59:50 +0000</pubDate>
		<dc:creator>Gavin Blair</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zoeandgavin.com/wpmu/php/?p=26</guid>
		<description><![CDATA[I&#8217;ve finally done it. Stefan Priebsch did a talk that I caught the last part of, 50 Reasons You Should Be Using PHP5 (the last few being, &#8220;PHP6 will be really neat&#8221; and &#8220;PHP5 is fun to do&#8221;). Not having seen the entire talk I still felt justified in leaving my Macbook&#8217;s default PHP4 installation in. When I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally done it. <a href="http://inside.e-novative.de/">Stefan Priebsch</a> did a talk that I caught the last part of, <a href="http://inside.e-novative.de/archives/106-PHP-in-the-Windy-City.html#extended">50 Reasons You Should Be Using PHP5</a> (the last few being, &#8220;PHP6 will be really neat&#8221; and &#8220;PHP5 is fun to do&#8221;). Not having seen the entire talk I still felt justified in leaving my Macbook&#8217;s default PHP4 installation in. When I mentioned this to some attendees of <a href="http://tek.phparch.com/">php|tek</a>, their jaws dropped to the floor. Scandal!<span id="more-26"></span></p>
<p>The main reason that I didn&#8217;t want to try to install PHP5 was that I&#8217;m on a Mac. Generally there are two ways to install something on a mac. First, you can go grab the .DMG file and run the pre-made installation file. This usually works, but sometimes it can crash and no PHP will work for you ever. The second way is to grab the source code and compile it yourself. It goes without saying that that takes forever, especially if you have to keep trying different compile flags to see what works best, and what allows the compile to finish.</p>
<p>As an entrepreneur with a startup on his plate, I really need PHP to work for me. I couldn&#8217;t risk breaking PHP for my machine.</p>
<p>One day, however, I just got tired of typing <strong><span style="color: #993300">&lt;?php echo </span><span style="color: #000080">$variable</span><span style="color: #993300">; ?&gt;</span></strong> and got a little jealous of PHP5&#8217;s <strong><span style="color: #993300">&lt;?=</span><span style="color: #000080">$variable</span><span style="color: #993300">?&gt;</span></strong>. It sounds cheap, but this is the main reason that I took the plunge. And yes, I compiled it from source. It worked, but it required me to upgrade my MySQL installation too. The new MySQL installation required me to re-install PHP5. MySQL also decided to let me keep all of my databases, as long as I don&#8217;t reboot my machine. Of course, I found this out the hard way, waking up the next morning, turning on my Macbook and realizing that I don&#8217;t have any databases!</p>
<p>All is well now, I found an old dump of my most important database, and I just love echoing out variables with shorttags. And now, here is my <em><strong>2 Reasons You Should Be Using PHP5</strong></em>:</p>
<ol>
<li>Short tags!</li>
<li>People will stop bugging you about it.</li>
</ol>
<div>Oh, and in case you have a Macbook with Tiger on it (Leopard already comes with PHP5 installed), <a href="http://www.kittypee.com/2005/05/24/php5-mac-tiger/">here</a> is the tutorial I used.</div>
<div>Cheers</div>
]]></content:encoded>
			<wfw:commentRss>http://zoeandgavin.com/wpmu/php/2008/06/09/upgraded-to-php5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Frameworks to Try Out</title>
		<link>http://zoeandgavin.com/wpmu/php/2008/05/26/php-frameworks-to-try-out/</link>
		<comments>http://zoeandgavin.com/wpmu/php/2008/05/26/php-frameworks-to-try-out/#comments</comments>
		<pubDate>Tue, 27 May 2008 01:04:36 +0000</pubDate>
		<dc:creator>Gavin Blair</dc:creator>
		
		<category><![CDATA[Frameworks]]></category>

		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[Code Igniter]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[PEAR]]></category>

		<category><![CDATA[symfony]]></category>

		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://zoeandgavin.com/wpmu/php/?p=11</guid>
		<description><![CDATA[Coming back from the php&#124;tek conference, I&#8217;ve made a list of some PHP frameworks that I&#8217;d like to get some experience with. I&#8217;m worried that Code Igniter is so easy though that I won&#8217;t like working with anything else!
By the discussions surrounding them I think many of these frameworks come with a program that creates [...]]]></description>
			<content:encoded><![CDATA[<p>Coming back from the <a href="http://tek.phparch.com/">php|tek</a> conference, I&#8217;ve made a list of some PHP frameworks that I&#8217;d like to get some experience with. I&#8217;m worried that <a title="Code Igniter" href="http://codeigniter.com/">Code Igniter</a> is so easy though that I won&#8217;t like working with anything else!</p>
<p>By the discussions surrounding them I think many of these frameworks come with a program that creates a database for you depending on your answers to a series of questions. This, I don&#8217;t like. I want full control over my database design. As <a href="http://maggienelson.com/">Maggie Nelson</a> put it in her talk <a title="Angering Database Gods" href="http://www.objectivelyoriented.com/2008/05/angering_database_gods.html"><em>Angering Database Gods</em></a>, Active Record classes can be very bad for proper and efficient database interactions.</p>
<p>Nevertheless, I should at least give these a try.</p>
<p><span id="more-11"></span></p>
<ul>
<li><a title="Drupal" href="http://drupal.org/">Drupal</a> (not really a framework) </li>
</ul>
<p><img class="size-thumbnail wp-image-27 alignleft" style="float: left" src="http://zoeandgavin.com/wpmu/php/files/2008/05/druplicon_large-150x150.jpg" alt="Drupal is not really a framework. It is a CMS." width="150" height="150" /></p>
<p>Drupal is not really a framework - it is a <a title="Wikipedia - CMS" href="http://en.wikipedia.org/wiki/Content_management_system">Content Management System</a> (CMS). However, it allows so much customization that it is practically a framework. I&#8217;ve spent a lot of time hacking <a title="Wordpress" href="http://wordpress.org/">Wordpress</a> from a blog system to other purposes, and I think that working with Drupal will be a delight in comparison (no offense, Wordpress, but you are a blog, not an e-store. Sorry for mistreating you!)</p>
<p> </p>
<p> </p>
<p> </p>
<ul>
<li><a title="PEAR" href="http://pear.php.net/">PEAR</a></li>
</ul>
<p><img class="alignleft size-medium wp-image-30" style="float: left" src="http://zoeandgavin.com/wpmu/php/files/2008/05/pear-300x150.gif" alt="" width="300" height="150" />I guess this is not a framework either, although their site says &#8220;<acronym title="PHP Extension and Application Repository">PEAR</acronym> is a framework and distribution system for reusable PHP components.&#8221; PEAR stands for PHP (which ironically is an acronym in itself) Extension and Application Repository. This can come in be useful. I believe that I can use it to get the rest of the frameworks.</p>
<p> </p>
<ul>
<li><a title="Symfony Project" href="http://www.symfony-project.org/">Symfony</a></li>
</ul>
<p><img class="size-medium wp-image-28 alignleft" style="float: left" src="http://zoeandgavin.com/wpmu/php/files/2008/05/symfony-logo.png" alt="Symfony is a PHP framework" width="271" height="115" /></p>
<p>Symfony was recommended to me when I mentioned to someone that I was using Code Igniter. Apparently there will be a smooth transition. After reading <a href="http://www.phparch.com/c/magazine/author/223">Bart McLeod</a>&#8217;s article in <a title="PHP Architect Magazine" href="http://www.phparch.com">php|architect</a> entitled <em>A Refactoring Diary, Part II: symfony</em>, however, I&#8217;m a little daunted by the thought of starting something with Symfony, even though their website says it is easy to use.</p>
<p> </p>
<ul>
<li><a title="Zend Framework" href="http://framework.zend.com/">Zend Framework</a></li>
</ul>
<p><img class="alignleft size-medium wp-image-29" style="float: left" src="http://zoeandgavin.com/wpmu/php/files/2008/05/zend_framework_logo.png" alt="" width="259" height="136" />Zend Framework was also suggested to me. I don&#8217;t have much to say about it yet, since I haven&#8217;t had the time to look into it. It has a cool logo, though, and it&#8217;s Zend! I can&#8217;t wait to try it out.</p>
<p> </p>
<p> </p>
<p> </p>
<ul>
<li><a title="CakePHP" href="http://www.cakephp.org/">CakePHP</a></li>
</ul>
<p><img class="alignnone size-medium wp-image-31 alignleft" style="float: left" src="http://zoeandgavin.com/wpmu/php/files/2008/05/cake-php-logo.png" alt="" width="228" height="209" /></p>
<p>Everyone bashes CakePHP when describing their own framework. Code Igniter calls it bloated. However, I had better figure out for myself what everyone is talking about. CakePHP is still pretty popular, and I want to know why.</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Since Maggie Nelson&#8217;s talk about databases, I&#8217;ve been wary of trying out new frameworks, especially ones that do a lot of database abstraction, and hinge on the use of Active Record classes. These frameworks easily let developers forget that putting database queries into a<strong> </strong><span style="color: #993300"><strong>foreach()</strong></span> loop is a bad idea. This can be done much more efficient if everything is calculated in the loop, and one query sent to update everything after the loop.</p>
<p>Let me know if you have any comments/tips about any of these frameworks!</p>
]]></content:encoded>
			<wfw:commentRss>http://zoeandgavin.com/wpmu/php/2008/05/26/php-frameworks-to-try-out/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery and Code Igniter</title>
		<link>http://zoeandgavin.com/wpmu/php/2008/05/20/jquery-and-code-igniter/</link>
		<comments>http://zoeandgavin.com/wpmu/php/2008/05/20/jquery-and-code-igniter/#comments</comments>
		<pubDate>Tue, 20 May 2008 19:21:15 +0000</pubDate>
		<dc:creator>Gavin Blair</dc:creator>
		
		<category><![CDATA[Code Igniter]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://zoeandgavin.com/wpmu/php/?p=10</guid>
		<description><![CDATA[There aren&#8217;t that many tutorials on how to use jQuery and Code Igniter together. I&#8217;ve written a bit on how to do some Ajax with jQuery and Code Igniter here, on the Code Igniter Forums. With jQuery, Ajax is pretty easy to do, once you figure out how to get it working once. The toughest [...]]]></description>
			<content:encoded><![CDATA[<p>There aren&#8217;t that many tutorials on how to use jQuery and Code Igniter together. I&#8217;ve written a bit on how to do some Ajax with jQuery and Code Igniter <a title="jQuery plus Code Igniter in the CI Forum" href="http://codeigniter.com/forums/viewthread/79844/">here</a>, on the Code Igniter Forums. With jQuery, Ajax is pretty easy to do, once you figure out how to get it working once. The toughest part is figuring out how to have it send POST data to the right function of the right controller.</p>
<p>If you want a working example, <strong><a title="jQuery and Code Igniter Example" href="http://www.zoeandgavin.com/jquery_plus_ci.zip">Download it Here</a></strong><strong>. </strong>Be sure to read the README.txt!</p>
<p>Don&#8217;t forget, the important issue when doing javascript of any kind is to make sure it degrades nicely - it has to work even if Javascript is turned off!</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://zoeandgavin.com/wpmu/php/2008/05/20/jquery-and-code-igniter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MUified Open Source Projects</title>
		<link>http://zoeandgavin.com/wpmu/php/2008/05/11/muified-open-source-projects/</link>
		<comments>http://zoeandgavin.com/wpmu/php/2008/05/11/muified-open-source-projects/#comments</comments>
		<pubDate>Sun, 11 May 2008 22:41:54 +0000</pubDate>
		<dc:creator>Gavin Blair</dc:creator>
		
		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Busby]]></category>

		<category><![CDATA[business]]></category>

		<category><![CDATA[Jobba The Site]]></category>

		<category><![CDATA[MU]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://zoeandgavin.com/wpmu/php/?p=8</guid>
		<description><![CDATA[I&#8217;ve noticed a trend in how I&#8217;ve handled my latest open source projects. I mean, after they&#8217;ve been released. I release the code, I set up my client&#8217;s implementation, and then I MUify (my word) it. What do I mean by MUify? It&#8217;s the difference between Wordpress and Wordpress MU. I&#8217;ll illustrate with an example.
I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed a trend in how I&#8217;ve handled my latest open source projects. I mean, after they&#8217;ve been released. I release the code, I set up my client&#8217;s implementation, and then I MUify (my word) it. What do I mean by MUify? It&#8217;s the difference between <a title="Wordpress" href="http://wordpress.org/">Wordpress</a> and <a title="Wordpress MU" href="http://mu.wordpress.org/">Wordpress MU</a>. I&#8217;ll illustrate with an example.<span id="more-8"></span></p>
<p>I&#8217;ve been working on a <a title="Jobba The Site" href="http://zoeandgavin.com/wpmu/php/jobba-the-site/">job board application</a> for the last 10 months for the Trent University Career Centre. My team and I worked very hard to meet the deadline. The application is built on <a title="Code Igniter" href="http://codeigniter.com/">Code Igniter</a>, so our project is open source. After the release to the client, we generalized it (took out the hard-coded Trent-specific stuff) and made a public code release.</p>
<p>After that, I decided to create my own job board website. Companies can sign up to get their very own job board for internal hiring. This is what I mean by MUify.</p>
<p>The same can be done with <a title="Busby" href="http://zoeandgavin.com/wpmu/php/about/">Busby</a>. I will make my general release, implement it for as many small businesses that will pay me to do it, and then create an online MUified version, where businesses can sign up for their own online store. Maybe I&#8217;ll even have an online &#8220;mall&#8221; that links stores together, and a special store that people can sell things in for free.</p>
<p>I wonder if it will be advantageous to MUify my applications and have businesses go through an automated registration process rather than talking to them myself and selling my services door-to-door. I guess I can catch the international clients with my MU versions and go door-to-door to local businesses with the original versions. Comments?</p>
]]></content:encoded>
			<wfw:commentRss>http://zoeandgavin.com/wpmu/php/2008/05/11/muified-open-source-projects/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Code Igniter and Wordpress</title>
		<link>http://zoeandgavin.com/wpmu/php/2008/05/11/code-igniter-and-wordpress/</link>
		<comments>http://zoeandgavin.com/wpmu/php/2008/05/11/code-igniter-and-wordpress/#comments</comments>
		<pubDate>Sun, 11 May 2008 13:48:40 +0000</pubDate>
		<dc:creator>Gavin Blair</dc:creator>
		
		<category><![CDATA[Code Igniter]]></category>

		<category><![CDATA[Wordpress]]></category>

		<category><![CDATA[Models]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://zoeandgavin.com/wpmu/php/?p=7</guid>
		<description><![CDATA[For those who don&#8217;t know, Code Igniter is an open source PHP framework. And of course, Wordpress is blogging software. When you create a Wordpress theme, you have to put it into the /wp-content/themes/folder. To list the blog&#8217;s categories, you use the function wp_list_categories(), which puts the categories in an unordered list. The function takes some arguments [...]]]></description>
			<content:encoded><![CDATA[<p>For those who don&#8217;t know, <a title="Code Igniter" href="http://codeigniter.com/">Code Igniter</a> is an open source PHP framework. And of course, <a title="Wordpress" href="http://wordpress.org/">Wordpress</a> is blogging software. When you create a Wordpress theme, you have to put it into the <span style="color: #993300">/wp-content/themes</span><span style="color: #993300">/</span>folder. To list the blog&#8217;s categories, you use the function <span style="color: #008000">wp_list_categories()</span>, which puts the categories in an unordered list. The function takes some arguments for formatting, but there is very little you can do with <span style="color: #008000">wp_list_categories()</span>.<span id="more-7"></span> For example, you can&#8217;t display all categories that contain a certain string (in title or description). Sometimes you just want more control over how things are displayed, and Wordpress&#8217;s method of displaying themes just doesn&#8217;t give it to you.</p>
<p>That is why I am using a Code Igniter install as my blog theme. I have created several<a title="Code Igniter Wordpress Models" href="http://zoeandgavin.com/wpmu/php/code-igniter-wordpress-models/"> Code Igniter Wordpress Models</a> that allow you to pull exactly what you want from a Wordpress database. This way, you can use Wordpress as a blog administration tool, and Code Igniter can show your stuff, how you want it.</p>
<p>The Code Igniter install does not go into the <span style="color: #993300">/wp-content/themes/</span> folder - it goes in your site root. Just throw my CI+WP models into the <span style="color: #993300">/system/application/models/</span> folder, and you&#8217;re good to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://zoeandgavin.com/wpmu/php/2008/05/11/code-igniter-and-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Web Developers vs. Business People</title>
		<link>http://zoeandgavin.com/wpmu/php/2008/05/10/web-developers-vs-business-people/</link>
		<comments>http://zoeandgavin.com/wpmu/php/2008/05/10/web-developers-vs-business-people/#comments</comments>
		<pubDate>Sat, 10 May 2008 21:24:00 +0000</pubDate>
		<dc:creator>Gavin Blair</dc:creator>
		
		<category><![CDATA[PHP Excel]]></category>

		<category><![CDATA[business]]></category>

		<category><![CDATA[clients]]></category>

		<category><![CDATA[Excel]]></category>

		<category><![CDATA[online store]]></category>

		<category><![CDATA[PHPExcel]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Web developers are supposed to make websites for businesses, for money. It&#8217;s their job. The problem is, web developers and business people very seldom speak the same language. It seems like a trivial problem, but it is often a very difficult barrier.
For example, I met with a potential client the other day. I had some [...]]]></description>
			<content:encoded><![CDATA[<p>Web developers are supposed to make websites for businesses, for money. It&#8217;s their job. The problem is, web developers and business people very seldom speak the same language. It seems like a trivial problem, but it is often a very difficult barrier.<span id="more-1"></span></p>
<p>For example, I met with a potential client the other day. I had some e-store software that I wanted to set up for him. He was very receptive, and was getting pretty excited about what my software can do for his business. He just had one question for me. &#8220;Will I own the software? If I pay you for this website, I want to own the software. It has to be mine.&#8221;</p>
<p>This stumped me. My software was built on open source frameworks. I was charging him for installation and customization. The software as a result is open source, and definitely not his to own. I started to tell him that the software would not be his, but he would be able to use it. This in turn made my prospective client very angry. He was in no way going to pay for something that he could not own - this was unacceptable to him.</p>
<p>After much careful talk, I deduced that &#8220;owning&#8221; the software to him meant that he could access it from his computer at home, nothing more. It didn&#8217;t mean that he would own the code, or have the rights to it or anything - just that he could use it anytime he wanted. </p>
<p>This kind of misunderstanding almost cost me a deal. The main reason that I am bringing this up is that in addition to being designers and coders, web developers must also know excellent communication skills. Business owners like using Microsoft Excel. You can build as must software as you want, and make it as easy to use as anything, but business owners will always go back to Excel. My e-store software is useless to one of my clients because their business is based completely in spreadsheets. The only way my e-store software can be beneficial to them is if he can import products to the store from an Excel file, download the store&#8217;s inventory into an Excel file, and even add/edit/delete items from that file and re-import it. To a web developer, this may seem redundant, especially if one has spent hours and hours building a web interface to perform those exact add/edit/delete actions. However, to a business person whose business is run entirely out of spreadsheets, this is the only solution that makes sense.</p>
<p>That is why this week I am looking into <a title="PHPExcel" href="http://www.codeplex.com/PHPExcel/" target="_blank">PHP Excel</a>. It should be relatively easy to import and export .xls or comma-delimited files using PHP, based on the contents of a MySQL database. I&#8217;ll post my findings here.</p>
<p>For more on Excel Spreadsheets and Business Logic, <a title="Excel Business Logic with PHPExcel" href="http://blog.maartenballiauw.be/post/2008/03/Reuse-Excel-business-logic-with-PHPExcel.aspx">read this</a>.</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://zoeandgavin.com/wpmu/php/2008/05/10/web-developers-vs-business-people/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
