<?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>Sphaerula &#187; databases</title>
	<atom:link href="http://sphaerula.com/wordpress/tag/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://sphaerula.com/wordpress</link>
	<description>by Conrad Halling</description>
	<lastBuildDate>Wed, 20 Jul 2011 01:11:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Book Review: Web Database Applications with PHP and MySQL</title>
		<link>http://sphaerula.com/wordpress/books/book-review-web-database-applications-with-php-and-mysql/</link>
		<comments>http://sphaerula.com/wordpress/books/book-review-web-database-applications-with-php-and-mysql/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 02:21:43 +0000</pubDate>
		<dc:creator>Conrad Halling</dc:creator>
				<category><![CDATA[Bioinformatics]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://sphaerula.com/wordpress/books/book-review-web-database-applications-with-php-and-mysql/</guid>
		<description><![CDATA[Web Database Applications with PHP and MySQL, 2nd Edition, was written by Hugh E. Williams and David Lane and published by O’Reilly in May, 2004. I purchased this book in 2005 when I was doing some consulting for a microarray &#8230; <a href="http://sphaerula.com/wordpress/books/book-review-web-database-applications-with-php-and-mysql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oreilly.com/catalog/webdbapps2/" target="_blank"><cite>Web Database Applications with PHP and MySQL, 2nd Edition</cite></a>, was written by Hugh E. Williams and David Lane and published by O’Reilly in May, 2004.</p>
<p>I purchased this book in 2005 when I was doing some consulting for a microarray company in Massachusetts, where I was adapting the BioArray Software Environment (<a href="http://base1.thep.lu.se/" target="_blank">BASE 1.2</a>), which was written in PHP, to their process. I had set the book aside until recently, when I was motivated to review PHP so I could modify the <a href="http://sphaerula.com/wordpress/computing/on-becoming-a-wordpress-master/" target="_blank">WordPress theme</a> that I use for this blog.</p>
<p><a href="http://www.php.net/" target="_blank">PHP</a> is the programming language usually referred to by the <em>P</em> in the acronym <acronym title="Linux Apache MySQL PHP">LAMP</acronym>, which stands for <em>L</em>inux <em>A</em>pache <em>M</em>ySQL <em>P</em>HP. PHP was designed from the beginning to work closely with the <a href="http://httpd.apache.org/" target="_blank">Apache httpd web server</a> and with the <a href="http://www.mysql.com/" target="_blank">MySQL database management system</a>. PHP code is easily embedded into HTML, and this makes it easy for relative novices to use a three-tier architecture for their web sites.</p>
<p>I found <cite>Web Database Applications with PHP and MySQL</cite> an excellent introduction to PHP and MySQL for someone who is skilled at programming using another language. The introductory material on PHP was just enough to get me started, and I quickly learned to refer to the <a href="http://www.php.net/docs.php" target="_blank">PHP documentation</a> (which is also excellent) when I needed enlightenment. The book also provides several chapters that provide a solid introduction to MySQL 4.1.</p>
<p>The last five chapters of the book are devoted to a complete working example of an online wine store. All source code is available at the authors’ web site, <a href="http://www.webdatabasebook.com/" target="_blank">http://www.webdatabasebook.com/</a>. This is an invaluable resource that can serve as the basis for many other PHP projects.</p>
<p>In my opinion, this book is not appropriate for someone who is learning to program or use databases for the first time. Good alternatives might be <a href="http://www.oreilly.com/catalog/9780596514013/" target="_blank"><cite>Learning PHP &amp; MySQL, 2nd Edition</cite></a>, by Michele E. Davis and Jon A. Phillips (published August, 2007, by O’Reilly), and <a href="http://www.oreilly.com/catalog/learningsql/" target="_blank"><cite>Learning SQL</cite></a>, by Alan Beaulieu (published August, 2005, by O’Reilly). (I read <cite>Learning SQL</cite> recently, and I recommend it highly. Watch for a review at a later date.)</p>
<p>Since the book was published nearly four years ago, some of the material is dated. In 2004, PHP 5.0 was still in beta; PHP has reached 5.2 by now, and support for PHP 4 is about to end. Similarly, the book recommends using MySQL 4.0 or 4.1, whereas today MySQL 5.0 is very stable. The book provides an excellent set of appendices that explain how to install and configure Apache httpd, MySQL, and PHP for Linux, Windows, and Mac OS X. Again, these instructions are now dated, but they should still provide a useful guide.</p>
<p>I found the index somewhat frustrating to use; some items I was interested in are not found there. These include:</p>
<ul>
<li><code>@</code>, the error control operator</li>
<li> <code>&amp;</code> and <code>=&amp;</code>, operators used for working with references to variables</li>
<li>reference, the term referring to a variable that is not passed by value</li>
<li><code>define</code>, the function used to create constants</li>
<li>magic constants, such as <code>__FILE__</code>, <code>__LINE__</code>, <code>__FUNCTION__</code>, <code>__CLASS__</code>, and <code>__METHOD__</code></li>
</ul>
<p>I don’t use PHP in my daily work; rather, I use Perl. (Python is the next language I plan to learn, but that’s another story.) I like how PHP has combined arrays and hashes into a single array type. I like PHP’s Boolean values, <code>true</code> and <code>false</code>. And I like how easy it is to embed PHP into HTML; it makes creating a web page dynamically more intuitive than Perl CGI does. But I dislike the inconsistent and ugly naming of many standard functions  (for example, <code>strtoupper</code>, the PHP equivalent of Perl’s <code>uc</code>), and this seems to be a common complaint about PHP. I also don&#8217;t like the large number of global variables and constants that PHP uses.</p>
<p>There is a BioPHP project (PHP for Bioinformatics), at <a href="http://biophp.org/" target="_blank">http://biophp.org/</a>, but it is not as well developed as the <a href="http://bioperl.org/">BioPerl</a> or <a href="http://biopython.org/" target="_blank">BioPython</a> projects. The only large bioinformatics project that I’m aware of that uses PHP is the BioArray Software Environment (<a href="http://base1.thep.lu.se/" target="_blank">BASE</a>) 1.2. <a href="http://base.thep.lu.se/" target="_blank">Version 2.0 of BASE</a> has been completely rewritten in Java.</p>
]]></content:encoded>
			<wfw:commentRss>http://sphaerula.com/wordpress/books/book-review-web-database-applications-with-php-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

