Moving time

Posted on July 9th, 2008 in My World

I’m updating my hosting solution, so down time shouldn’t be a surprise while records, services and blog tools get moved. Also, if sending email results in no response, please retry, since the moving may impact mail and availability (mine that is).

Design Update - digitalself-redesign v2.0

Posted on May 10th, 2008 in My World

Following up on a new and improved work method based around local servers and git, I sat down to put theory to practice and began working on an improved theme for this blog.

The new workflow really allows me to pay attention to detail, enabling a trial and error methodology without fearing breakage, on code or design. The new theme really feels more polished, at least to me, when comparing to the old design. I can now post images that actually blend in to the post content, or enable tags and categories that provide useful information.

The theme is still entirely original with the exception to the icons that are designed and distributed for free by Go Squared Ltd. I really like their simple iconsets.

Comments are very much appreciated. I still think the site needs some bling. What say you ?

Web Development - Improved Ubuntu Workflow

Posted on May 4th, 2008 in Code, Linux, Ubuntu

Following my previous post on Web Development Workflow, I decided to be done with my procrastination and setup a local workflow, which keeps me location independent and autonomous.

The work flow is simple: Develop and test locally, deploy remotely. I’m currently applying this towards the development of an improved theme for my blog, which is basically this one, plus minor adjustments.

My setup is an Apache 2 webserver, with PHP and mySQL. On top of this I enable user dirs for the webserver, and deploy a local wordpress, which in fact runs a backup database from my production site.

First , install apache2,php and mysql support:

sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server

Now enable user directories support (things like localhost/~jonhdoe which actually live in /home/johndoe/public_html) and create the public_html folder:

sudo a2enmod userdir
mkdir $HOME/public_html

Another twist, since this is my main workstation and I don’t want an apache+mysql setup running all the time, is to remove all of the startup scripts from the default boot runlevels:

sudo update-rc.d -f mysql remove
sudo update-rc.d -f apache2 remove

I then run a script to start my environment when I want to code some web bits:

#!/bin/bash

/etc/init.d/apache2 start
/etc/init.d/mysql start

Don’t forget to make the script executable:

chmod +x bin/start-web-dev.sh

After all this I just installing web apps locally. In my case I just install Wordpress by uncompressing it into public_html, creating a DataBase using phpmyadmin, and running the install. After that I went to my production wordpress exported the DB, and imported it on the local wordpress. And I’m done.

As a finally twist I created a git repository of my theme, so i just modify+commit+push, and pull on the main website. Since I can push only when I need or can, this setup is really working for me.

Any further enhancements are welcome, so feel free to drop some suggestions to improve on this.

Web Development Workflow

Posted on April 21st, 2008 in Code, Linux, My World

Lately I’ve been working on some web projects, nothing major, one of which is the template for this blog. One thing that always bugs me is the workflow for web development. What is the best workflow for such projects, that require server side testing ?

How to develop a Wordpress theme without major hassle ? Or a php website for that matter ?

Option 1

Deploy a local http server, and test it as you code it on your local machine.

Downsides

  • Requires deployment of local http server and mysql server and wordpress/custom stuff.

Upsides

  • Fast code/test/fix cycle.
  • If you screw up, just reinstall or star over.
  • Does not bother visitor on production sites.

Option 2

Code directly on the server. Through ssh.

Downsides

  • Remote work is usually slugish.
  • Requires exporting the X windows for minimal usefulness.
  • Too much work to get into a usable state.
  • Direct work on the database/project/software.

Upsides

  • Direct work on the database/project/software.
  • Already deployed server/php/mysql/wordpress whatever software.

But I recently found a third option that seems viable.

Option 3

Mount the remote working directory through sshfs.

Downsides

  • Remote work can be slugish.
  • Direct work on the database/project/software.

Upsides

  • Direct work on the database/project/software.
  • Simple deployment. Just mount the damn thing and be on your way.
  • Take advantage of your desktop/development environment.

This is the latest and greatest solution so far. But this still doesn’t sound like perfect, because if I want to code a wordpress theme/template I have to enable it and work on my production website, which hinders both development and visitors.

Has anyone got a great solution for this ? A great workflow ? Or am I just being lazy and should install everything locally ?