<?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>Pixel Acres &#187; Technology</title>
	<atom:link href="http://f6design.com/journal/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://f6design.com/journal</link>
	<description>Adventures in web and graphic design</description>
	<lastBuildDate>Wed, 16 May 2012 06:50:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Launching XAMPP at OSX startup</title>
		<link>http://f6design.com/journal/2012/03/12/launching-xampp-at-osx-startup/</link>
		<comments>http://f6design.com/journal/2012/03/12/launching-xampp-at-osx-startup/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 21:42:14 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=2298</guid>
		<description><![CDATA[A few days ago I posted about my experiences setting up XAMPP on OSX. Here&#8217;s another little XAMPP tip&#8230; By default XAMPP won&#8217;t start the Apache and MySQL services at system startup, so every time you reboot your computer you&#8217;ll need to restart them. Wouldn&#8217;t it be nice if those services started automatically? One way [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I posted about my experiences setting up XAMPP on OSX. Here&#8217;s another little XAMPP tip&#8230;</p>
<p>By default XAMPP won&#8217;t start the Apache and MySQL services at system startup, so every time you reboot your computer you&#8217;ll need to restart them. Wouldn&#8217;t it be nice if those services started automatically? One way of doing that is to create a Launch Daemon that runs at system startup and have it start XAMPP for us.</p>
<p>Fire up Terminal, and run the following command:</p>
<pre class="brush: bash; title: ; notranslate">cd /Library/LaunchDaemons
sudo nano apachefriends.xampp.apache.start.plist</pre>
<p>Enter your OSX password when prompted, then in <a href="http://en.wikipedia.org/wiki/GNU_nano">nano</a> paste the following into your new plist:</p>
<pre class="brush: xml; title: ; notranslate">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
&lt;key&gt;EnableTransactions&lt;/key&gt;
&lt;true/&gt;
&lt;key&gt;Label&lt;/key&gt;
&lt;string&gt;apachefriends.xampp.apache.start&lt;/string&gt;
&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
&lt;string&gt;/Applications/XAMPP/xamppfiles/xampp&lt;/string&gt;
&lt;string&gt;startapache&lt;/string&gt;
&lt;/array&gt;
&lt;key&gt;RunAtLoad&lt;/key&gt;
&lt;true/&gt;
&lt;key&gt;WorkingDirectory&lt;/key&gt;
&lt;string&gt;/Applications/XAMPP/xamppfiles&lt;/string&gt;
&lt;key&gt;KeepAlive&lt;/key&gt;
&lt;false/&gt;
&lt;key&gt;AbandonProcessGroup&lt;/key&gt;
&lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;</pre>
<p>Save the file and exit nano (<code>control+o</code>, <code>return</code>, <code>control+x</code>).</p>
<p>Now run the following terminal command:</p>
<pre class="brush: bash; title: ; notranslate">sudo nano apachefriends.xampp.mysql.start.plist</pre>
<p>And into this new file paste:</p>
<pre class="brush: xml; title: ; notranslate">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
&lt;key&gt;EnableTransactions&lt;/key&gt;
&lt;true/&gt;
&lt;key&gt;Label&lt;/key&gt;
&lt;string&gt;apachefriends.xampp.mysql.start&lt;/string&gt;
&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
&lt;string&gt;/Applications/XAMPP/xamppfiles/xampp&lt;/string&gt;
&lt;string&gt;startmysql&lt;/string&gt;
&lt;/array&gt;
&lt;key&gt;RunAtLoad&lt;/key&gt;
&lt;true/&gt;
&lt;key&gt;WorkingDirectory&lt;/key&gt;
&lt;string&gt;/Applications/XAMPP/xamppfiles&lt;/string&gt;
&lt;key&gt;KeepAlive&lt;/key&gt;
&lt;false/&gt;
&lt;key&gt;AbandonProcessGroup&lt;/key&gt;
&lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;</pre>
<p>Save the file and exit nano (<code>control+o</code>, <code>return</code>, <code>control+x</code>).</p>
<p>When you restart your computer the XAMPP Apache and MySQL services should start automatically. You can check this by launching XAMPP Control and checking that Apache and MySQL have green lights displayed next to them.</p>
<h3>A note about security</h3>
<p>If you&#8217;re concerned about the security of your system while running XAMPP, the safest approach is not to run Apache or MySQL at all, in which case you might not want to have those services running while you&#8217;re not using them. However, I&#8217;m fairly certain that unless you intentionally open up port 80 in your hardware/software firewall your XAMPP server should be invisible outside your local network.</p>
<h3>Credit</h3>
<p>A hat tip to &#8216;cwd&#8217;, who <a href="http://superuser.com/questions/243606/i-cant-get-xampp-to-start-automatically-in-os-x">posted this solution</a> on Superuser. I tried a couple of other approaches before I stumbled upon this one which actually works.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2012/03/12/launching-xampp-at-osx-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring VirtualHosts in XAMPP on Mac</title>
		<link>http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/</link>
		<comments>http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 12:02:51 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=2242</guid>
		<description><![CDATA[A few weeks back I rejoined the &#8220;Cult of Mac&#8221; when I replaced my old Asus notebook with a MacBook Pro, and since then I&#8217;ve been busy settling into my new OSX workflow. I do all my development locally, so one of the first applications I installed was XAMPP, a cross platform Apache/MySQL/PHP stack. While [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks back I rejoined the &#8220;Cult of Mac&#8221; when I replaced my old Asus notebook with a MacBook Pro, and since then I&#8217;ve been busy settling into my new OSX workflow. I do all my development locally, so one of the first applications I installed was <a href="http://www.apachefriends.org/en/xampp-macosx.html">XAMPP</a>, a cross platform Apache/MySQL/PHP stack. While I know that <a href="http://www.mamp.info/">MAMP</a> is very popular on Mac, I have been using XAMPP for many years so I thought I&#8217;d stick with what I know.</p>
<p>Installing XAMPP was a snap, but when I came to create my own <a href="http://httpd.apache.org/docs/2.0/vhosts/">Apache VirtualHosts</a> things started getting fiddly. Here are the steps I followed to get everything running smoothly.</p>
<h3>What are VirtualHosts?</h3>
<p>First, some quick background on what we&#8217;re trying to achieve.</p>
<p>VirtualHosts allow Apache to map a hostname to a directory on the filesystem. You can set up as many VirtualHosts as you need, so that each website operates under its own hostname. For example, you might want to map <code>mysite.local</code> to <code>/Users/yourusername/mysite</code>. To test your development site all you would need to do is plug &#8220;http://mysite.local&#8221; into your browser&#8217;s address bar.</p>
<h3>Enable VirtualHosts</h3>
<p>The first thing you&#8217;ll need to do is open the file <code>/Applications/XAMPP/xamppfile/etc/httpd.conf</code> in your favourite text editor. Look for the following lines:</p>
<pre class="brush: plain; title: ; notranslate"># Virtual hosts
#Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf</pre>
<p>Uncomment the second line by removing the hash (<code>#</code>), so that Apache loads your custom VirtualHosts configuration file:</p>
<pre class="brush: plain; title: ; notranslate"># Virtual hosts
Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf</pre>
<h3>Create your VirtualHosts</h3>
<p>Open the file <code>/Applications/XAMPP/xamppfile/etc/extra/httpd-vhosts.conf</code>. Towards the bottom of the file you will see some example VirtualHosts, which you should comment out or delete.</p>
<p>At the bottom of the file, add &#8216;localhost&#8217; as the default named VirtualHost:</p>
<pre class="brush: plain; title: ; notranslate"># localhost
&lt;VirtualHost *:80&gt;
    ServerName localhost
    DocumentRoot &quot;/Applications/XAMPP/htdocs&quot;
    &lt;Directory &quot;/Applications/XAMPP/htdocs&quot;&gt;
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Order Allow,Deny
        Allow From All
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre>
<p>This step is necessary to ensure that http://localhost still points at XAMPP&#8217;s <code>htdocs</code> directory once we&#8217;ve created our custom VirtualHosts. Personally I don&#8217;t use the <code>htdocs</code> directory a lot, but occasionally it&#8217;s useful to have somewhere to perform quick tests.</p>
<p>Now you are ready to create your own VirtualHosts. After the default localhost that you just created, add:</p>
<pre class="brush: plain; title: ; notranslate"># My custom host
&lt;VirtualHost *:80&gt;
    ServerName mysite.local
    DocumentRoot &quot;/Users/yourusername/path/to/your/site&quot;
    &lt;Directory &quot;/Users/yourusername/path/to/your/site&quot;&gt;
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride None
        Order Allow,Deny
        Allow From All
    &lt;/Directory&gt;
    ErrorLog &quot;logs/mysite.local-error_log&quot;
&lt;/VirtualHost&gt;</pre>
<p>In the above example you should replace &#8220;mysite.local&#8221; with your own hostname. This can be anything you wish, but make sure you choose a hostname that won&#8217;t conflict with a real domain name. Using a .local extension makes it obvious that the site is hosted locally rather than on a public web server.</p>
<p>The path to your website can point at any folder in your OSX user directory. I store most of my sites inside of <a href="https://www.dropbox.com/">Dropbox</a> so that I can access them on both my home and work machines. If your path includes spaces, make sure you enclose it in quotes, like in my example.</p>
<h3>Edit your hosts file</h3>
<p>Once you&#8217;ve saved your <code>httpd.conf</code> and <code>httpd-vhosts.conf</code> files, the next step is to edit your OSX <a href="http://en.wikipedia.org/wiki/Hosts_(file)">hosts file</a> so it knows how to handle your new <code>ServerName</code>. The hosts file is used by OSX to map hostnames to IP addresses. In this case we want to map your new <code>ServerName</code> to the IP address 127.0.0.1, which is your localhost.</p>
<p>Fire up a Terminal instance, and at the prompt type the following command:</p>
<pre class="brush: bash; title: ; notranslate">sudo nano /etc/hosts</pre>
<p>Enter your OSX password when prompted, and the hosts file will be opened in the <a href="http://en.wikipedia.org/wiki/GNU_nano">nano</a> text editor. You&#8217;ll see that the hosts file already contains some default hostname mappings (e.g. &#8220;127.0.0.1 localhost&#8221;). Use your keyboard&#8217;s arrow keys to navigate to the bottom of the file and add your own mapping:</p>
<pre class="brush: plain; title: ; notranslate"># XAMPP VirtualHost mappings
127.0.0.1 mysite.local</pre>
<p>Save the host file using the key combo <code>control+o</code>, and pressing return when prompted to choose the filename. Close the file using <code>control+x</code>.</p>
<h3>Restart Apache</h3>
<p>So that your changes take effect, restart Apache. This can be done using XAMPP Control, which is found at <code>/Applications/XAMPP/XAMPP Control.app</code>.</p>
<p>Point your browser at http://mysite.local (or whatever ServerName you chose) and you should see your website. However, there&#8217;s a chance that instead you&#8217;ll be faced with a&#8230;</p>
<h3>403 error</h3>
<p>Because Apache runs as the &#8216;nobody&#8217; user by default, it may not have adequate permission to browse your OSX user directory or some of its subdirectories, in which case you&#8217;ll see a 403 &#8216;access forbidden&#8217; error when you try and view your development site. Similarly, you may find that although you can view your dev site, PHP throws errors when you attempt to write files or make directories on the filesystem.</p>
<p>To fix this you can configure Apache to run as your OSX user. Open <code>/Applications/XAMPP/xamppfile/etc/httpd.conf</code> and look for the following lines:</p>
<pre class="brush: plain; title: ; notranslate"># User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User nobody
Group nogroup</pre>
<p>Change <code>User</code> to your OSX username, and save the file:</p>
<pre class="brush: plain; title: ; notranslate">User yourusername</pre>
<p>Restart Apache and you should now be able to navigate your site without any issues, including manipulating files and folders using PHP.</p>
<p>Making the change I&#8217;ve described above carries certain security risks, and if you choose to run Apache as your OSX user then you&#8217;ll need to be quite certain that XAMPP is not accessible from outside your local network. From what I understand, XAMPP&#8217;s built in security features ensure that <a href="http://bravo.newnetenterprises.com/wordpress/xampp/the-basics-of-xampp-security/">this is the case</a> out-of-the-box, and it is straightforward to <a href="http://www.apachefriends.org/en/xampp-macosx.html#873">beef up security</a> for additional piece of mind.</p>
<p>If you&#8217;re not convinced that it&#8217;s safe to let Apache run as your OSX user, another option is to <a href="http://stackoverflow.com/questions/2001881/correct-owner-group-permissions-for-apache-2-site-files-folders-under-mac-os-x">change the permissions</a> of your dev directories so that the &#8216;nobody&#8217; or &#8216;_www&#8217; user can read/write to them.I suspect that I would quickly tire of setting folder permissions, which is why I have opted to take the path of least resistance!</p>
<h3>Conclusion</h3>
<p>Hopefully this post helps someone else to get XAMPP up and running on OSX. I imagine that MAMP Pro streamlines this process somewhat (I know it has a wizard for creating VirtualHosts), but as long as you don&#8217;t mind getting your hands dirty XAMPP is a fantastic way to learn how Apache actually works.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sunset: A syntax highlighting theme for phpDesigner</title>
		<link>http://f6design.com/journal/2010/09/29/sunset-a-syntax-highlighting-theme-for-phpdesigner/</link>
		<comments>http://f6design.com/journal/2010/09/29/sunset-a-syntax-highlighting-theme-for-phpdesigner/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 07:19:24 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Toolbox]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=1057</guid>
		<description><![CDATA[My weapon of choice for code editing is the excellent program phpDesigner, but every so often I like to test drive a different editor to see what I might be missing out on. Recently I spent some time playing with Notepad++, and one feature that jumped out at me was the ability to choose from [...]]]></description>
			<content:encoded><![CDATA[<p>My weapon of choice for code editing is the excellent program <a href="http://www.mpsoftware.dk/">phpDesigner</a>, but every so often I like to test drive a different editor to see what I might be missing out on. Recently I  spent some time playing with <a href="http://notepad-plus-plus.org/">Notepad++</a>, and one feature that jumped out at me was the ability to choose from a large number of pre-installed <a href="http://en.wikipedia.org/wiki/Syntax_highlighting">syntax highlighting</a> themes.</p>
<p>When I switched back to phpDesigner, the default blue-on-white color scheme seemed a tad boring, so I decided it was time to pimp my IDE! Unfortunately user created themes for phpDesigner are thin on the ground, which left me no option but to make my own.</p>
<h4>PHP example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_php.png" alt="Sunset theme for phpDesigner - PHP code" width="450" height="389" /></p>
<h4>HTML example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_html.png" alt="Sunset theme for phpDesigner - HTML markup" width="450" height="164" /></p>
<h4>CSS example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_css.png" alt="Sunset theme for phpDesigner - CSS" width="450" height="224" /></p>
<h4>JavaScript example:</h4>
<p><img src="http://f6design.com/journal/wp-content/uploads/2010/09/sunset_theme_js.png" alt="Sunset theme for phpDesigner - JavaScript code" width="450" height="258" /></p>
<p>I&#8217;ve named my theme Sunset, and it is inspired by the <a href="http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/midnight.html">Midnight theme</a> for <a href="http://alexgorbatchev.com/SyntaxHighlighter/">SyntaxHighlighter</a>. If any phpDesigner fans are looking for a light-on-dark color scheme to spruce up their code editor, perhaps Sunset will fit the bill.</p>
<h3>Download</h3>
<p><a href="http://www.f6design.com/projects/f6-sunset-phpd-theme/f6_sunset_phpd_theme_1.2.rar">Download Sunset theme for phpDesigner</a></p>
<p>Installation and uninstallation instructions are included with the theme. Currently the theme has syntax highlighting colors for the four languages I work with: HTML, CSS, JavaScript and PHP.</p>
<h3>Important</h3>
<p>There is currently a <a href="http://www.facebook.com/topic.php?topic=12989&#038;post=148620&#038;uid=108672675347">bug in phpDesigner</a> that sometimes causes the &#8216;separator&#8217; colors to revert to their defaults (e.g. the color of <code>&lt;?php ?&gt;</code> tags reverts to black). The only sure-fire way to get things back to normal is to open the phpDesigner preferences dialog, and click &#8216;OK&#8217;. You might also try closing all your open documents and restarting the application. Hopefully this bug will be fixed in a future version of phpDesigner.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2010/09/29/sunset-a-syntax-highlighting-theme-for-phpdesigner/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Subversion for web development: Part 3</title>
		<link>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/</link>
		<comments>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 09:48:46 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=975</guid>
		<description><![CDATA[ In the final article of the series I will talk about configuring a local Apache webserver to integrate smoothly with your development working copy, and how to deploy a version controlled website to a live webserver.]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/">first</a> and <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">second</a> parts of this series you learned what version control is, and how to put a place a website under version control using Subversion. In this final article I will talk about configuring a local Apache webserver to integrate smoothly with your development working copy, and how to deploy a version controlled website to a live webserver.</p>
<h3>Working with a local web server</h3>
<p>Except for the very simplest sites, my web projects require PHP and therefore must run on a webserver with PHP installed. For testing purposes I have an Apache webserver installed on my local computer &#8211; I use <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>, which is a free Apache/MySQL/PHP distribution for Linux, Windows, Mac OS X and Solaris.</p>
<p>For each project I create an Apache virtual host, which allows the website to have its own domain root. This is configured in Apache&#8217;s <em>httpd-vhosts.conf</em> file:</p>
<pre><code>&lt;VirtualHost *:80&gt;
    DocumentRoot "D:/jobs/my_project/dev/_svn_working_copy/www"
    ServerName myproject.local
    ServerAlias www.myproject.local
    ErrorLog "logs/error.log"
    CustomLog "logs/access.log" combined
    &lt;Directory "D:/jobs/my_project/dev/_svn_working_copy/www"&gt;
	Options Indexes FollowSymLinks Includes ExecCGI
	AllowOverride All
	Order allow,deny
	Allow from all
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;</code></pre>
<p>The important thing to note here is that the DocumentRoot points at the <em>www</em> directory of my Subversion working copy, not at a sub-directory of my XAMPP installation, as would usually be the case. This allows me to keep the development version of the site in the same location as all my other project files, in this case: <em>D:/jobs/my_project</em>.</p>
<p>The job folder also contains Photoshop mockups, wireframes, image assets and any other files related to the project. Keeping these files all in the one spot makes it easy to backup the project &#8211; I simply burn the entire job folder to disc or an external hard drive.</p>
<h3>Version control is not backup</h3>
<p>While we are on the topic of backup, I think it is important to point out that your should never rely on Subversion alone as a backup solution.</p>
<p>It is tempting to think of a Subversion repository as an alternative to conventional backup strategies, since in many respects a repository seems like the perfect backup: it is stored off site, it is well commented, and it has a history of every change ever made to your project. But by relying on the repository for backup you are putting all of your eggs in one basket. If the repository is ever corrupted you will lose your entire development history! Sure, you still have your local working copy of the site, but the ability to roll back to a previous website state or refer to old code is lost forever.</p>
<p>To guard against this possibility it is important to perform regular exports of your working copy, and archive these copies using your regular backup method. Subversion has an <a href="http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.export.html">export command</a> for this purpose.</p>
<h3>Deploying to a live server</h3>
<p>When it comes time to deploy your website to a production webserver, the simplest approach is to simply upload your working copy via FTP or SFTP. This method should require no major changes from your existing workflow, and has the advantage of working with any webserver. If your site resides on a shared hosting account then this is probably your only option.</p>
<p>There is just one gotcha: Subversion creates a bunch of <em>.svn</em> folders inside the working copy, which it requires to work. They contain sensitive information such as your repository URL, which you probably don&#8217;t want to broadcast to the whole world, so it is important to make sure that these files are omitted from the upload process. Any decent FTP client can be configured to filter out particular files or folders, so make sure to create a filter that ignores <em>.svn</em> directories. I use <a href="http://filezilla-project.org/">Filezilla</a>, which <a href="http://allthingsmarked.com/2009/07/20/avoid-transferring-svn-cvs-folders-in-filezilla/">does the job nicely</a>.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/server_diagram_ftp.jpg" alt="Server diagram - upload via FTP" title="Server diagram - upload via FTP" width="450" height="384"  /></p>
<p>If Subversion is already installed on your production web server (or you are able to install it yourself) and have shell access to the server, then you have another option available to you.</p>
<p>Instead of uploading files to the server from your working copy, you can checkout a working copy of your repository trunk to the production server. When you are ready to publish to the live site you just need to update the server&#8217;s working copy and any modified files and folders will be deleted/renamed/downloaded automatically.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/server_diagram_subversion_on_live_server.jpg" alt="Server diagram - live server is a working copy" title="Server diagram - live server is a working copy" width="450" height="414" /></p>
<p>The advantage of this approach is that it is largely free from human error &#8211; there is no chance you might forget to upload a modified file, or that one developer will accidentally upload an old file over a newer one.</p>
<p>Explaining how to work with Subversion on your production server is beyond the scope of this article (plus, I&#8217;ve never done it before!), but if you dig a little you will find tutorials online.</p>
<p><em><strong>Update 11 March 2010:</strong> A couple of readers have pointed out that the alternative deployment approach mentioned above requires additional steps to hide the .svn directories on your production server. Please read the comments below for further information.</em></p>
<h3>Making friends with Subversion</h3>
<p>As I mentioned at the outset of this series, it took a couple of goes before I had an &#8220;aha!&#8221; moment and realised how Subversion could improve my workflow, but once everything clicked into place I didn&#8217;t look back. Hopefully this article has given you some pointers about integrating version control into your own web development process.</p>
<p>There is plenty of technical detail I haven&#8217;t covered, and for that I recommend checking out the free <a href="http://svnbook.red-bean.com/"><em>Version Control with Subversion</em></a> book, and the excellent <a href="http://tortoisesvn.net/support">TortoiseSVN documentation</a>. If you have any questions about my approach, or suggestions based on your own experiences with Subversion, please leave a comment below.</p>
<p><em>Icons in this article are courtesy of <a href="http://www.visualpharm.com/">Visual Pharm</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Subversion for web development: Part 2</title>
		<link>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/</link>
		<comments>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 09:47:23 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=973</guid>
		<description><![CDATA[In the second article of the series I will give specific detail about establishing a Subversion workflow.]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/">part 1</a> of this series you learned what version control is, and how it can be useful for website development. In this second article I will give specific detail about establishing a Subversion workflow.</p>
<h3>Structuring your repository</h3>
<p>Before you import any data to your Subversion repository you will need some top-level directories to help organise your project. There are no set rules dictating how you approach this, but the <a href="http://svnbook.red-bean.com/en/1.5/svn.tour.importing.html#svn.tour.importing.layout">recommended repository layout</a> is to create <em>trunk</em>, <em>branches</em> and <em>tags</em> directories:</p>
<pre><code>/trunk
/branches
/tags</code></pre>
<p><strong>Trunk:</strong> This is where you store the &#8220;main line&#8221; of development. It is a snapshot of the current state of the project.</p>
<p><strong>Branches:</strong> A &#8220;branch&#8221; is a copy of the project, and allows you to carry out a separate line of development without breaking the trunk. Once you are happy with your changes they can be merged back into the main code base.</p>
<p><strong>Tags:</strong> A &#8220;tag&#8221; is an archival snapshot of the project at a given point in time.</p>
<p>Whether or not you create branches and tags entirely depends on your own approach to version control.</p>
<p>Tags are commonly used in software development to capture a snapshot of a stable release of an application, but are not necessarily applicable to websites, where changes tend to be pushed live as soon as they are made.</p>
<p>Branching is useful when multiple developers are working on the project, but may be a redundant concept for a solo developer. Two scenarios where I can see branching would be useful are during a website redesign, or when adding a major new feature to a site. Development of the live site continues in the trunk whilst the upgrades are carried out in a branch.</p>
<p>Even if you don&#8217;t plan on creating branches or tags I still recommend sticking with this conventional directory naming structure. If another developer ever needs to access your repository the <em>trunk/branches/tags</em> structure will probably be one they are already familiar with, and it also gives you the flexibility to create branches and tags should the need ever arise.</p>
<h3>What files to keep under version control</h3>
<p>The only files I keep under version control are those that are required to compile and deploy the site: the source files, any files that are required on the live web server, and a copy of the site&#8217;s database.</p>
<p>For a typical website I create two additional folders inside the trunk:</p>
<pre><code>/trunk
    /db
    /www
/branches
/tags</code></pre>
<p>The <em>www</em> directory represents a web server&#8217;s public http directory. This is where most of the project files and folders live. The <em>db</em> directory is where I store a dump of the site&#8217;s MySQL database (more on this in <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">part 3 of this series</a>).</p>
<p>If I was working on a Flash project then I would have additional directories for my Actionscript and FLA source files:</p>
<pre><code>/trunk
    /db
    /www
    /src
    /lib
/branches
/tags</code></pre>
<p>None of these folder names are set in stone, and you should choose a structure that suits your work methodology.</p>
<h3>Creating a working copy</h3>
<p>To begin working with your repository you need to checkout a working copy. To do this, create a folder somewhere on your local computer, and give it a name that makes its purpose obvious. I call mine <em>_svn_working_copy</em>, and create it inside the job folder for the particular project it relates to. For instance, my folder might reside at <em>D:/jobs/my_project/dev/_svn_working_copy</em>.</p>
<p>Right-click on the directory you created, and choose <em>SVN Checkout</em> from TortoiseSVN&#8217;s context menu. In the Checkout dialog that appears, enter the URL of your repository trunk.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/tortoisesvn_checkout_dialog.gif" alt="TortoiseSVN checkout dialog" title="TortoiseSVN checkout dialog" width="450" height="356" /></p>
<p>Once the checkout is complete your working copy should now contain the <em>db</em>, <em>www</em>, and any other directories you created in the trunk.</p>
<p>(You might notice that each directory in your project contains a folder named <em>.svn</em>. TortoiseSVN requires these folders to do its job so make sure not to delete or edit them!)</p>
<p>Now you can start to add files to your project, and edit them as you would usually. Remember that the <em>www</em> directory represents the site&#8217;s root level, so your index file should be stored here, along with any other files and folders required for the site to function.</p>
<p>You might be wondering <em>&#8220;What if I need run my project in my local web server? Shouldn&#8217;t I check out the working copy to my Apache webroot?&#8221;</em>. That&#8217;s what I initially thought too, until I realised that Apache could be configured to read files from any directory on my computer. I&#8217;ll explain how (and why) I do this in <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">part 3 of this series</a>.</p>
<h3>Keeping a database under version control</h3>
<p>If your site relies on a database then you need to keep that under version control too, otherwise you lose synchronisation if you ever need to roll back to a previous website state. But because the database is stored outside of a website’s public html directory it needs special consideration to ensure it is included with Subversion commits.</p>
<p>I mentioned earlier that my SVN trunk includes a directory named <em>db</em>. This is where I place a dump of the site’s MySQL database. In my case this is a manual process: I use PHPMyAdmin to export a .sql file which I copy into my trunk’s <em>db</em> directory, overwriting the previous version.</p>
<p>I suspect it is possible to automate the process of exporting the database from MySQL into the <em>db</em> folder, but for now I&#8217;m happy enough to do it manually. Like the other steps in the version control workflow it quickly becomes second nature.</p>
<h3>Making commits</h3>
<p>When you have finished editing the files in your working copy it is time to commit them to the repository. In TortoiseSVN this is accomplished by right-clicking the folder in which your working copy resides (or any sub-folder or individual file) and choosing <em>SVN Commit</em> from the context menu.</p>
<p>At this point you have the option to add any non-versioned files to the repository, after which any new or modified files are uploaded to your Subversion server and stored in the repository. The next time anyone browses or checks out the trunk they will be able to view your changes.</p>
<h3>Commenting your commits</h3>
<p>It is good practice to accompany each commit with a descriptive message explaining the changes you have made. In a team environment commit log messages are a vital means of communicating with the rest of the team, but they are just as important for the solo developer. Well documented commits help you recall every change you make to your project, when you made it, and why. </p>
<blockquote><p>Trust me, you don’t want to be the dunce, who commits with blank messages, or with meaningless ones like “Fixes”. Your team will hate you. You will hate yourself after a month, when trying to discover what the hell this code does in your brilliant project.<br />
<cite>&ndash;Petyo Ivanov, <a href="http://wildbit.com/blog/2008/11/11/the-importance-of-commit-messages/">The importance of commit messages</a></cite></p></blockquote>
<h3>Commit frequency</h3>
<p>How often you choose to commit changes to the repository is a matter of personal preference. Once a day, twice a day, ten times a day &#8211; it&#8217;s entirely up to you.</p>
<p>I like to make my commits fairly frequently. This makes it easier to review the changes that I&#8217;ve made, and also keeps me focussed on the task at hand: the commit message acts as a goal for the coding session. Also, I get a small glow of satisfaction each time I make it commit, like ticking off an item on a to-do list!</p>
<p>In the final part in this series I will talk about working with a local Apache development server, and deploying a version controlled website to a live webserver.</p>
<p><strong><a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">Read part 3 &raquo;</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion for web development: Part 1</title>
		<link>http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/</link>
		<comments>http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 06:09:35 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=764</guid>
		<description><![CDATA[In this three part series of articles I will explain my approach to using Subversion, the open-source version control software, for web development. For a long time I steered clear of version control, dismissing it as too complex, or something that was only useful for large development teams. I took Subversion for a test drive, [...]]]></description>
			<content:encoded><![CDATA[<p>In this three part series of articles I will explain my approach to using <a href="http://subversion.tigris.org/">Subversion</a>, the open-source version control software, for web development.</p>
<p>For a long time I steered clear of version control, dismissing it as too complex, or something that was only useful for large development teams. I took Subversion for a test drive, but didn&#8217;t really &#8220;get it&#8221;, and decided version control wasn&#8217;t for me.</p>
<p>I changed my tune earlier this year when I was employed to work on a project that was already under version control. I had no choice but to get up to speed with Subversion, and once I got the hang of it I was excited to discover that version control streamlined my entire workflow. I now use Subversion for all of my web projects and consider it an integral part of my development process.</p>
<p>My approach to Subversion is geared towards solo web developers like myself, and is fairly easy to grasp. I won&#8217;t delve too deeply into the inner workings of Subversion and its commands &#8211; this will be more of a conceptual overview of setting up a version control workflow:</p>
<p>Part 1: Getting started with version control<br />
<a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">Part 2: Working with Subversion repositories</a><br />
<a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">Part 3: Servers and deployment</a></p>
<h3>What is version control?</h3>
<p>In a nutshell, version control allows you to track changes made to a file over time, and roll back to a previous state when you mess up. This might not sound too different to the traditional <em>&#8220;save as&#8230;&#8221;</em> technique offered by virtually every software application, but a <a href="http://en.wikipedia.org/wiki/Revision_control">Version Control System</a> offers considerably more functionality than simply appending <em>&#8220;_v01&#8243;</em> or <em>&#8220;_v02&#8243;</em> to your file names. Some of the advantages of a Version Control System are:</p>
<ul>
<li><strong>Roll back.</strong> Jump back in time and revert a file, folder, or even the whole project to a specific historic state. If you make a mistake in your code you can simply revert to the last good version of the file you are working on.</li>
<li><strong>Revision messaging.</strong> File revisions can be accompanied by messages explaining what changes were made, and why. This makes it possible to track the evolution of a project over time.</li>
<li><strong>Branching.</strong> If you need to test out new features in your project without disturbing the main line of development, you can &#8220;branch&#8221; your code and continue development in a separate sandbox. Later, you can merge changes back into the main code base.</li>
<li><strong>Work with a team.</strong> If several people are working on the same project, version control helps to synchronise changes so that one team member doesn&#8217;t accidentally overwrite another&#8217;s work.</li>
<li><strong>Work remotely.</strong> A version controlled project can be accessed from anywhere, any time. This is perfect for geographically remote team members or developers who work from multiple locations.</li>
</ul>
<h3>Why use version control?</h3>
<p>In my pre-Subversion days I relied on an ad-hoc backup system whereby I would periodically create a manual snapshot of the project I was currently working on by copying the entire project source to a new directory. I might make a backup once a day, or perhaps every two days. If the changes were small, I might not make a backup at all.</p>
<p>This approach worked well enough, but left me wide open to data loss. Reverting to a previous project state could be a tedious task, requiring that I backtrack further than was strictly necessary.</p>
<p>I also lacked comprehensive metadata about the changes I was making. I did keep brief notes with each backup, describing the changes I had made since the last snapshot, but these notes provided only &#8220;broad brush strokes&#8221; information about my edits, and lacked detail about which specific files had been modified.</p>
<p>A Version Control System helps to address these problems: snapshots are taken of revisions much more frequently, code changes are easier to document and track, and recovering from coding mistakes is much easier.</p>
<h3>Version control for web development</h3>
<p>When setting up a Version Control System my initial challenge was to find a workflow that worked for me as a solo web developer. Most of the explanations of version control I read were aimed at software programming teams, and it wasn&#8217;t immediately obvious to me how I fitted into the picture. To help me choose a version control approach that suited my own requirements, I began by listing the key components of my web development process:</p>
<ul>
<li>Most of the time I work alone on projects, not as part of a team</li>
<li>I work on projects from the office and from home, using two different computers</li>
<li>During the development phase of a project I work from an Apache web server, hosted on my local computer</li>
<li>Most of my websites rely on a MySQL database</li>
<li>My websites are hosted on a range of web servers, usually in a shared hosting environment, and in many cases I am not free to choose the hosting solution</li>
</ul>
<p>With those considerations in mind, I needed an approach to version control that allowed for:</p>
<ul>
<li>Remote access to the Subversion repository</li>
<li>A working copy of the repository that could be accessed by my local web server</li>
<li>The website&#8217;s database to be under version control along with the source files</li>
<li>A deployment process that would work in a typical shared hosting environment</li>
</ul>
<h3>Creating a Subversion repository</h3>
<p>The first step in working with Subversion is to create a repository. A repository is a store of data, which holds all of your project files, much like a standard file-system. A repository does a lot more than that though:</p>
<blockquote><p>What makes the Subversion repository special is that it <em>remembers every change</em> ever written to it: every change to every file, and even changes to the directory tree itself, such as the addition, deletion, and rearrangement of files and directories.<br />
<cite>&ndash;<a href="http://svnbook.red-bean.com/">Version Control with Subversion</a></cite></p></blockquote>
<p>The simplest way to create a repository is on your local machine, a task that is made extremely easy by <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> (a Subversion client). A local repository is perfect for cutting your teeth with Subversion, but has a major drawback: it can only be accessed from one computer. A remotely hosted repository is a far more powerful and flexible option.</p>
<p>To create a remote Subversion repository you are going to need a web server with Subversion installed. This is not as daunting as it may sound. Many web hosting companies offer Subversion with their plans (I use <a href="http://dreamhost.com/">Dreamhost</a>), or you can choose a Subversion hosting specialists such as <a href="http://unfuddle.com/">Unfuddle</a>, <a href="http://www.springloops.com/">Springloops</a> and <a href="http://beanstalkapp.com/">Beanstalk</a>.</p>
<p>It is important to note that your Subversion repository needn&#8217;t be on the same server as your website. In the development environment I describe in this article there is never any direct communication between the repository and the live web server.</p>
<h3>Choosing a Subversion client</h3>
<p>Once your Subversion repository is up and running, you need a way to access it. A Subversion client allows you to to read data from your repository (&#8220;check out&#8221;, in Subversion parlance), write data to the repository (&#8220;commit&#8221;), and perform other useful actions such as branching, tagging, and merging.</p>
<p>I work in a Windows environment, so <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> was an obvious choice for my Subversion client. TortoiseSVN installs as a Windows shell extension, and all of its functionality is accessed via the Explorer context menu &#8211; in other words, by right-clicking on a file or folder. This approach is very unobtrusive, and soon becomes second nature.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/tortoisesvn_context_menu.jpg" alt="TortoiseSVN context menu" title="TortoiseSVN context menu" width="450" height="541" /></p>
<p>I won&#8217;t go into detail about how to install and use TortoiseSVN. The program is very <a href="http://tortoisesvn.net/support">well documented</a> and there are stacks of <a href="http://www.google.com/search?q=tortoisesvn+tutorial">online tutorials</a> if you get stuck.</p>
<p>In <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">part 2</a> and <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">part 3</a> of this series I will refer to TortoiseSVN when explaining some of my processes. For other Subversion clients the process will be slightly different from what I describe, but the basic principles remain the same. Apple users will find that there are plenty of Subversion clients for the Mac, though I haven&#8217;t used any of them and can&#8217;t make a personal recommendation &#8211; if you have a favourite you can leave a comment below.</p>
<p>In the second part of this series I will explain how I structure my subversion repository, how to create a working copy of your repository, and how to commit changes to the repository.</p>
<p><strong><a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">Read part 2  &raquo;</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Font Squirrel&#8217;s @font-face kit generator</title>
		<link>http://f6design.com/journal/2009/10/18/font-squirrel-font-face-generator/</link>
		<comments>http://f6design.com/journal/2009/10/18/font-squirrel-font-face-generator/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 02:25:29 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[News & Reviews]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=749</guid>
		<description><![CDATA[If you want to create your own @font-face kits, you absolutely must check out Font Squirrel&#8217;s new @font-face generator tool. All you have to do is upload a TrueType or OpenType format font, and the generator spits out a zip file containing: The original typeface for Safari and Firefox 3.5 A WOFF font for Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to create your own <code>@font-face</code> kits, you absolutely must check out Font Squirrel&#8217;s new <a href="http://www.fontsquirrel.com/fontface/generator"><code>@font-face</code> generator tool</a>. All you have to do is upload a TrueType or OpenType format font, and the generator spits out a zip file containing:</p>
<ul>
<li>The original typeface for Safari and Firefox 3.5</li>
<li>A WOFF font for Firefox 3.6+</li>
<li>An SVG font for Opera, Chrome, and iPhone</li>
<li>An EOT font for Internet Explorer</li>
<li>A sample HTML page</li>
<li>A sample CSS stylesheet</li>
</ul>
<p>The generator also features options to reduce file size by subsetting the font, cleanup font outlines, and auto-hint glyphs to improve rendering.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/10/font_squirrel_generator.jpg" alt="Font Squirrel Generator" title="Font Squirrel Generator"  width="450" height="550" class="" /></p>
<p>Sweet!</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/10/18/font-squirrel-font-face-generator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My run-in with the Great Firewall of China</title>
		<link>http://f6design.com/journal/2008/07/06/my-run-in-with-the-great-firewall-of-china/</link>
		<comments>http://f6design.com/journal/2008/07/06/my-run-in-with-the-great-firewall-of-china/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 05:45:24 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2008/07/06/my-run-in-with-the-great-firewall-of-china/</guid>
		<description><![CDATA[Recently I was developing a website for a client whose primary export market is in China. Needless to say I was a little alarmed when my client&#8217;s representatives in China reported that they couldn&#8217;t access their new site. My client has reps in both Shanghai and Beijing, neither of who could see the website, so [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was developing a website for a client whose primary export market is in China. Needless to say I was a little alarmed when my client&#8217;s representatives in China reported that they couldn&#8217;t access their new site.</p>
<p>My client has reps in both Shanghai and Beijing, neither of who could see the website, so I knew it wasn&#8217;t a localized issue. My immediate suspicion was that the infamous &#8220;Great Firewall of China&#8221; was to blame. Thankfully I was able to take a few simple steps to diagnose the problem and get the site up and running.</p>
<h3>What is the Great Firewall of China?</h3>
<p>For anyone who doesn&#8217;t already know, the &#8220;Great Firewall of China&#8221; is the informal name given to the vast <a href="http://en.wikipedia.org/wiki/Internet_censorship_in_the_People%27s_Republic_of_China">Internet censorship apparatus</a> of the Chinese government. Sites considered injurous to the public good are blocked on a massive scale, so that they are innaccessible to Internet users within China.</p>
<h3>How to test if your site is blocked</h3>
<p>For foreign businesses and web designers who need to ensure their website reaches a Chinese audience, there are several tools which test a site&#8217;s availability from servers within China.</p>
<h4>WebSitePulse</h4>
<p>Website monitoring company <a href="http://www.websitepulse.com/help/testtools.china-test.html">WebSitePulse</a> offer a free service to check if a website makes it past the Great Firewall of China. You can test your site using servers in Beijing, Shanghai and Hong Kong. WebSitePulse also do a side by side comparion with servers in the US, Germany or Australia, so you can compare the responses.</p>
<h4>WatchMouse</h4>
<p><a href="http://www.watchmouse.com/en/ping.php">WatchMouse</a> offer a free service which pings your website from a number of servers worldwide, including one in Shanghai. If your website is being blocked, the Shanghai server will report 100% packet loss.</p>
<h3>Why me?</h3>
<p>One of the common methods of censoring a site is by IP blocking. Unfortunately, if the banned site is on a shared web host, all sites that share the same IP address are also blocked. This is what I believe happened in my case.</p>
<h3>The fix</h3>
<p>Luckily there is a simple workaround to sidestep issues with using a shared IP address: buy a static IP address. If your website has a unique IP address then it can&#8217;t be blocked simply because it shares a server with a banned site.</p>
<p>Within an hour of purchasing a static IP adress, my client&#8217;s website could be reached from within China. WebSitePulse and WatchMouse&#8217;s Chinese servers could see the site, and more importantly, my client&#8217;s reps in Shanghai and Beijing could too.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2008/07/06/my-run-in-with-the-great-firewall-of-china/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Opera Mini 4 simulator</title>
		<link>http://f6design.com/journal/2007/07/12/opera-mini-4-simulator/</link>
		<comments>http://f6design.com/journal/2007/07/12/opera-mini-4-simulator/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 22:12:29 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[News & Reviews]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2007/07/12/opera-mini-4-simulator/</guid>
		<description><![CDATA[In a head-to-head battle with the Apple iPhone, Opera recently announced the beta version of their Opera Mini 4 browser. For those not familiar with Opera Mini, it is a very popular free web browser for mobile devices, and works with any modern mobile phone. To help woo consumers Opera are offering a web-based simulator, [...]]]></description>
			<content:encoded><![CDATA[<p>In a head-to-head battle with the Apple iPhone, Opera recently announced the beta version of their <a href="http://www.operamini.com/beta/">Opera Mini 4</a> browser. For those not familiar with Opera Mini, it is a very popular free web browser for mobile devices, and works with any modern mobile phone. To help woo consumers Opera are offering a <a href="http://www.operamini.com/beta/simulator/">web-based simulator</a>, which replicates exactly the functionality of the mobile browser.</p>
<p><img src='http://f6design.com/journal/wp-content/uploads/2007/07/opera4simulator.jpg' alt='Opera Mini 4 simulator' /></p>
<p>This is not only a great way to try Opera Mini 4 before downloading, it&#8217;s also handy for web designers curious to see how their sites hold up on a mobile device. Like previous versions of Mini, Opera Mini 4 processes web pages on the server, and reformats them to fit the screen of your mobile device. This reduces bandwidth consumption dramatically, and makes pages easy to read even on small screens. In what appears to be a nod to the iPhone, this time around the browser combines full screen and zoomed-in views, instead of squeezing an entire page into one long column. The genius of Opera&#8217;s approach is that text is still reformatted to fit your screen width, so multi column layouts will appear as several columns of narrow text that neatly wrap within the browser window.</p>
<p><strike>Unfortunately the Opera team are still working out some kinks which stop the beta installing on my Samsung d900i, so for now I&#8217;m still stuck on Opera Mini 3. But judging by the simulator, the upgrade will be well worth waiting for.</strike> </p>
<p><strong>Update:</strong> I downloaded the latest beta, and it now works on my phone. The only downside &#8211; no RSS reader in the beta, so it looks like I will <em>still</em> be stuck with Opera Mini 3 until the final release of version 4&#8230; Sigh.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2007/07/12/opera-mini-4-simulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Choosing a web host</title>
		<link>http://f6design.com/journal/2007/06/30/choosing-a-web-host/</link>
		<comments>http://f6design.com/journal/2007/06/30/choosing-a-web-host/#comments</comments>
		<pubDate>Sun, 01 Jul 2007 05:04:29 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/2007/06/30/choosing-a-web-host/</guid>
		<description><![CDATA[Web designers love to talk about our craft, but one topic we seldom touch on is web hosting. Perhaps that&#8217;s because hosting belongs to the realm of networking and hardware, whereas web design is a discipline primarily concerned with software and scripting. Be that as it may, web hosting can have a big impact on [...]]]></description>
			<content:encoded><![CDATA[<p>Web designers love to talk about our craft, but one topic we seldom touch on is web hosting. Perhaps that&#8217;s because hosting belongs to the realm of networking and hardware, whereas web design is a discipline primarily concerned with software and scripting. Be that as it may, web hosting can have a big impact on the success of a design: a site&#8217;s markup, CSS and images might be optimized for lightning fast loading speeds, but it will make little difference if the web server is lagging.</p>
<p>When I bought my first web hosting account back in 1999 I had no idea what I wanted from a hosting company. I went with a recommendation from a more experienced colleague, and wound up with a fairly pricey &#8211; although fast &#8211; shared hosting account. At the time I don&#8217;t think I even considered basic criteria such as disk allocation, bandwidth allowance or server-side scripting support. As it turned out the host was running the Cold Fusion programming language, which even in 1999 must have been extremely unusual!</p>
<p>In those happy-go-lucky days clients placed few technological demands on their web designer, beyond the simple requirement of getting a website online. For a newbie like myself that was about the extent of my abilities anyway, and as long as a web host gave me FTP access I was happy. But as the medium has matured so have the needs of both clients and designers, and today I am much more careful to select a hosting package that suits my requirements.</p>
<h3>Hosting platforms</h3>
<p>Most web hosting plans fall into one of two categories, determined by which operating system they run: Windows or Linux. This in turn dictates the programming languages, databases, and software packages available to a designer. For this reason, the choice of platform is a fundamental one when deciding on a hosting solution.</p>
<p>The most prevalent web server configuration is is known as a <a href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)">LAMP</a> stack, comprising the Linux operating system, Apache web server, PHP programming language, and MySQL for database management. Linux hosting plans also often offer support for the Ruby and Perl programming languages. The fact these are all open source software solutions means that Linux hosting tends to be cheaper than Windows.</p>
<p>With about <a href="http://news.netcraft.com/archives/web_server_survey.html">32% of the server market</a>, Microsoft&#8217;s Internet Information Server (IIS) running on Windows is also an extremely popular hosting solution. IIS is usually coupled with the ASP.NET programming framework and MS SQL database management. Windows servers often offer PHP and MySQL support too, which makes them a flexible &#8211; albeit more expensive &#8211; option.</p>
<p>I&#8217;m not going to argue the comparative merits of Windows and Linux hosting, suffice to say that familiarity with a platform is usually the deciding factor. Pingdom did and interesting <a href="http://royal.pingdom.com/?p=95">survey</a> of seven of the most popular sites on the Internet to see what server configuration they were running on, and found that the decision to use a particular technology was usually motivated by familiarity. It makes sense &#8211; we are much more likely to choose technologies that suit our skill set rather than the other way around.</p>
<h3>Shared vs dedicated hosting</h3>
<p>Regardless of the software platform you settle on, you will also need to decide between a shared and dedicated server environment.</p>
<p>A shared hosting plan is where a large number of websites are located on a single server box, and share the computer&#8217;s resources. The hosting company takes care of server maintenance, software installation, backups, and bandwidth management, which makes shared hosting a painless affair. In addition to simplicity, a big advantage of shared hosting is the price. Because the web server is shared between many customers the cost per business is lower.</p>
<p>But there is a downside to hosting numerous sites on a single machine. If a neighboring site experiences extreme traffic demand, other sites on the server are likely to slow down too. You are also limited to whatever server configuration your hosting company decides is best. For instance most web hosts don&#8217;t give shared hosting customers access to their domain&#8217;s PHP ini (configuration) file.</p>
<p>If you don&#8217;t like to share then you&#8217;ll want a dedicated hosting account, with your very own web server at the hosting company&#8217;s data center. Your server will still be managed to a degree by the hosting provider, who will typically take care of data backups and performance monitoring. Scalability is the single biggest advantage of dedicated hosting, and because the server&#8217;s resources are reserved solely for your use dedicated hosting is perfect for high traffic websites. For a web design firm a dedicated server can also be used to house a number of client websites, allowing you to balance the server&#8217;s resources to suit the requirements of each site.</p>
<p>A third option is co-location, in which you provide your own server machine, and plug it into a service provider&#8217;s Internet pipeline. This gives you total control over your server, but isn&#8217;t an option you will want to pursue unless you are skilled in server administration and hardware configuration.</p>
<h3>Server-side programming</h3>
<p>One thing to be wary of when choosing a hosting package is to make sure the server, programming, and database management software are configured in a way that suits your requirements. Lets take PHP as an example.</p>
<p>In version 5 and earlier PHP offered a <a href="http://us2.php.net/features.safe-mode">&#8216;safe mode&#8217;</a>, designed to limit the possibility of malicious PHP code being executed, and protect servers from hackers. Nice as that may sound, safe mode also severely limits web developers from performing even straightforward tasks such as uploading files to their server via PHP. Some hosts install PHP with safe mode turned off, while others such as Dreamhost and Media Temple offer a way to effectively <a href="http://kb.mediatemple.net/article.php?id=080">disable safe mode</a> on a per-site basis. Unfortunately, most hosts have no such option, which means many popular PHP scripts will not run on their servers without some serious tinkering.</p>
<p>Similarly, the speed with which hosting companies update their software installations can differ quite significantly. For instance, if you are developing in PHP 5 then obviously you will need a host that has PHP 5 installed, whereas a large number of hosts still only offer PHP 4. Most web hosts will specify somewhere on their company website what software versions they run. If they don&#8217;t, make sure to ask.</p>
<h3>Disk and data allowances</h3>
<p>Exponential increases in hard disk space have meant that even the cheapest web hosting plans now offer ample file storage. Gone are the days of 10Mb hosting plans, so hosting video and other disk hungry files is no longer a major drama. Still, it is worth paying attention to the storage limits imposed by your web host, especially if you plan on hosting multiple websites under a single account.</p>
<p>As well as dictating the amount of disk space your site(s) can utilize, web hosts set a data transfer limit. This is a measure of how much data can be transferred between your web server and the Internet each month &#8211; in other words, how much your visitors can download before you are penalized. Traffic allowances vary greatly from one host to the next, so it is important to estimate your requirements accurately and choose a plan that meets them.</p>
<p>One hosting company I have used in the past states on their website that a 2Gb monthly traffic allowance should be sufficient for most small or medium business websites. Having designed a number of sites for small businesses I can say that this is not the case, and even a moderately successful site can easily exceed that limit.</p>
<p>If you think you may exceed the bandwidth limit set by your host, it is important to check the rate at which they charge for excess traffic &#8211; sometimes excess data charges can be exorbitant.</p>
<h3>Control panel</h3>
<p>Smaller hosting firms often require that you contact their support staff any time you need a change made to your account. When even something as simple as setting up an email autoresponder requires a phone call, it can be extremely frustrating. Thankfully most hosts offer a web-based control panel that allows you to customize almost every aspect of your account. Some larger hosts offer a comprehensive custom built control panel, but most opt for a generic panel such as the popular <a href="http://cpanel.net/index.html">cPanel</a> or <a href="http://www.swsoft.com/en/products/plesk/">Plesk</a>.</p>
<p>When considering a host it is worth considering the control panel you will be using, as a good panel will make website maintenance simpler and more pleasurable.</p>
<h3>Reseller hosting</h3>
<p>Reselling hosting to your clients not only saves you having to purchase new hosting account for each client, it can turn a tidy profit. Reselling involves purchasing one hosting account, then subdividing it into multiple sub-accounts, one per client. This allows you to set your own pricing structure, and sell hosting to your clients at more than its original value.</p>
<p>In practice, any hosting plan that allows multiple domains can be resold, but many web hosts offer accounts that are purpose built for reselling. These reseller packages mask the identity of the hosting company, so it appears to your clients as if you are the host.</p>
<h3>Local vs offshore hosting</h3>
<p>Unless your website&#8217;s primary audience is in the US, choosing to host on a web server located in your own country may offer significant speed and reliability benefits. The downside to local hosting (by which I mean non-US hosting) is that it tends to cost more. Most of the large scale hosting companies (Go Daddy, Dreamhost, Media Temple etc) are based in the US, and economies of scale mean that local operations cannot compete with them on price alone. But there are compelling advantages to local hosting, even despite the fact it is more expensive.</p>
<p>The primary reason for choosing local hosting is speed. It&#8217;s a simple matter of geography: the further your end-user is from your host&#8217;s data center, the longer the traffic is going to take to reach them. I live in Australia, where hosting on locally based servers generally costs more, but is considered vastly more desirable due to the speed boost when serving pages to an Australian audience.</p>
<p>Another advantage of local hosting is that server maintenance is timed to coincide with off-peak traffic in your time zone. Any sensible web host will perform scheduled server maintenance during the wee hours of the morning, when web traffic is at its lowest. But what may be middle of the night in Texas or LA is the middle of our working day in Australia, meaning routine maintenance can kill my client&#8217;s email access and take their website offline.</p>
<p>For those readers who are based in the US, the local/offshore distinction is irrelevant as you already get the best of both worlds: low cost hosting in the same country as your primary audience.</p>
<h3>Reliability and performance</h3>
<p>While cost is inevitably a consideration when choosing a web host, it is dangerous to make a decision based on price alone, as cheap hosting often comes at the expense of server reliability and performance. A common measure of reliability is uptime, the percentage of time that a web host&#8217;s computers are up and running. A website needs to be available around the clock, and every moment offline equates to lost visitors and income, so choosing a host with a high uptime is critical. Most hosts promise 99.9% uptime, but don&#8217;t take their word for it. Check with a host to see if they records of their outages, or ask one of their customers for their anecdotal experiences.</p>
<p>Many hosts also have redundant servers, waiting to kick into action if the primary servers go down. Ideally, redundant servers will be housed in a separate data center to the host&#8217;s primary servers, so that in the case of a power outage or natural disaster they will be unaffected.</p>
<p>Another critical measurement is the speed of a host&#8217;s servers. This is influenced by many factors, including their network infrastructure, connection to the Internet, and whether they <a href="http://en.wikipedia.org/wiki/Overselling">oversell</a> their hosting plans. A host will usually offer information about their network and data center on their company website, but overselling &#8211; cramming too many websites on a single shared server to maximize profits &#8211; is harder to detect. In most cases overselling has no ill-effect, since few customers will ever use their full bandwidth and disk allowances, but it is still something to be aware of.</p>
<p>To test the response time of a host, you can ping a site that is hosted with them. In Windows you can do this by opening a command prompt, and typing <code>ping domain</code>, for example <code>ping google.com</code>. This will tell you how long data takes on average to reach your computer from the website. This is a useful way to compare the speed of two different webhosts.</p>
<h3>Conclusion</h3>
<p>Choosing a web host isn&#8217;t as easy as typing &#8216;web host&#8217; into Google and clicking on the first search result, but provided you do your research it&#8217;s not hard to find a service that suits your needs. I hope that this article has made you aware of a few of the pitfalls that await the unwary.</p>
<p>Although I have mentioned a couple of web hosting firms and software solutions by name, that&#8217;s not because I think they are the best around, but rather they illustrate a point I was making. There are a vast number of hosting companies out there, and obviously I have personal experience with only a fraction of them. During the article I also talked in greater detail about Linux/PHP hosting environments than other alternatives. That&#8217;s because I am most familiar with LAMP servers, not because I think they are somehow better.</p>
<p>If you have your own web hosting experiences or tips to share, please leave a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2007/06/30/choosing-a-web-host/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

