UserCore Way Back
Usercore.com in the Way Back Machine. I think I still like my site design 6 years ago better than now. I’ve got this really cool design but it’s a bunch of css and somewhat complex. I haven’t found several hours yet to decipher it and pair it down a bit. It looks like yellow for a little while longer.
Update your zip code list!
Our washing machine is busted. After a bit of reading on both laundry repair and a refresher on how to use a multimeter, I’ve figured out that we need a new part. Off to the Sears website to see if part 3356465 is in stock at my local repair center. Where’s my local repair center? Oh cool, Sears is just asking for my zip and is going to do a proximity search. The zip code in my area officially changed with the post office 2 years ago now. The post office stopped delivering mail for my old zip about a year ago. And still, Sears isn’t aware that my zip code even exists.
I’m sure that when the site was developed, a zip code table was hooked up and promptly forgotten about. You’d be surprised how often this happens. I’d say still about a 3rd of the time my zip code doesn’t exist. A year ago that was half or more. So in my rough estimation, half of sites that use zip code lookups don’t update their database except once a year. And a third don’t update it at all. More likely I bet the large majority of sites don’t have a zip code refresh in the plans at all and just end up doing it when enough people complain.
Update your zips, it’s annoying your customers right now.
This site has some fair prices for zip code lists and offers several formats.
Using Subversion Part 2 – Auto Publish a Subversion commit
Subversion comes prebuilt with a system of “hooks”. Basically for most actions you would perform with a subversion repository you can also hook another program up to that action. For example you can tell subversion to also update a site locally on each commit.
The first step in this process is to make sure that your website as it exists on your dev server has been checked out from subversion and that permissions and ownership is set as you want it (that part’s up to you and outside the scope of this post). Let’s say I was working on the google site that was held in my repository in the “site” directory, I’d do something like:
svn checkout file:///home/google/repository/site/trunk/ webroot/
Now that a fresh checkout exists in the webroot, we’ll set things up to do an automatic subversion “update” on each commit.
From the subversion FAQ’s I found this handy chunk of C code.
#include
#include
#include
int main(void)
{
execl("/usr/bin/svn", "svn", "update", "/path/to/site/webroot/",
(const char *) NULL);
return(EXIT_FAILURE);
}
The FAQ basically says that you take this chunk of code, add your own webroot path and compile it. If you’re like me and you compile C code once every year, or perhaps never, here’s the specifics on a Linux box. I use the gcc compiler and save the file as “update_site.c”
gcc update_site.c -o update_site
Not too complicated.
Now to preserve file permissions on your site properly, make sure that the owner of the website can execute this program from the svn hook but changing the mode of the compiled program to add the s switch.
chmod +s update_site
The last step is to tell subversion that it should run this update_site program after each commit. In your repository navigate to the hooks directory on the file system. Open up the file called post-commit.tmpl. There’s a couple example lines at the bottom of mine that execute python scripts for mailing and logging the commit, I just comment those out by putting a # in from of the lines and then on the last line of the file add the full path to the new update_site script. Like: /full/path/to/update_site
When you’re done, copy or move this post-commit.tmpl template to just post-commit and make sure that the webserver user can execute it.
With this process, you’re pretending that the webroot is the working directory for a subversion user. This means that the .svn directories normally in your working directory will now be present in the webroot as well. In case you have any passwords mixed in with you’re code, disable browsing of those directories in Apache. Thankfully this isn’t often an issue with ColdFusion datasources but it still doesn’t hurt to be safe.
Add the following to your apache httpd.conf file:
# Disallow browsing of Subversion working copy administrative dirs.
Order deny,allow
Deny from all
Using Subversion Part 1 – Build Subversion Repository with Apache htaccess authentication
One of my responsibilities at Aslan is the Linux SysAdmin. I’ve decided to replace my job with several tiny robots and take on the title of Linux Architect instead. One of the main things to manage is a subversion repository for each project we work on. Rather than keep documentation around for me to manually follow a set of steps for each new repo, I’m using the Bourne shell to write a script that will backup the existing site, create a repository, and make a login and password to use when accessing the repository though a local svn client.
Part 2 will show how to have a site automatically publish itself to the dev server on each commit.
For now, here’s some code for Part 1:
#!/bin/sh
echo "creating svn repository and moving files ..."
tar zcvf htdocs.tgz htdocs &&
svnadmin create repository &&
mkdir site &&
mkdir site/trunk &&
mv htdocs/* site/trunk/ &&
rm -rf htdocs &&
ln -s site/trunk htdocs &&
svn import site file://$PWD/repository/site -m "initial import" &&
echo "Who owns this directory?"
read owner
echo using ... $owner
chown -R $owner:$owner * &&
chown -R apache repository &&
# make apache hook for subversion
APACHESVN=/etc/httpd/conf.d/subv-$owner.conf
touch $APACHESVN
echo "" >> $APACHESVN
echo "DAV svn" >> $APACHESVN
echo "SVNPathAuthz off" >> $APACHESVN
echo "SVNPath $PWD/repository" >> $APACHESVN
echo "SSLRequireSSL" >> $APACHESVN
echo "AuthType Basic" >> $APACHESVN
echo "AuthName \"$owner\"" >> $APACHESVN
echo "AuthUserFile $PWD/subv-auth" >> $APACHESVN
echo "Require valid-user" >> $APACHESVN
echo "" >> $APACHESVN
echo "Supply a username for accessing the svn repository"
read svnuser
echo "thanks, how about a password"
read svnpass
echo "I'm using $svnuser and $svnpass"
htpasswd -bc $PWD/svn-auth $svnuser $svnpass &&
/etc/init.d/httpd stop &&
/etc/init.d/httpd start &&
echo "all done"
Standardizing web forms
I think all web forms should look the same. What’s the goal of a web form? Its goal should be to collect information from the user. Whenever possible, we should get things to the point where users don’t need to think about what steps they need to take to perform a task. So why should we as architects, designers and developers ever attempt to reinvent the form. It would be great for us all to settle on a form library.
It looks like there’s a whole movement devoted to design standards like this, Microformats.
Specifically, I really like the direction of Uni-Form. The forms look fluid, error handling is clear and graceful, it’s clear what field you’re on. I love it.
I’m looking to use this library for all form development. Maybe this is worth building a CFC to extend the
RoundCube – Ajax Webmail Client
The RoundCube webmail project does look pretty slick. The developers look to have a solid roadmap lined up and a good, conservative set of features coming up. I’d signed up for the dev list and am considering helping out in some capacity.
Update 6/12/07: I’ve been using Roundcube inhouse for the past couple of weeks now. It’s awesome. I think this is the best webmail client out there. Others have more features but not more functionality. Roundcube does exactly what I need it to do.
Atmail – Webmail Client and optional MTA
I’m currently testing out Atmail from CalaCode, located right here in good ol’ Chicago.
The install process is painless, but so far I’m not seeing huge improvements over something like RoundCube. I’m just comparing webmail clients here. Roundcube is quite basic right now and actually that’s nice. Something like Horde is very robust but most clients look at that and get a little overwhelmed.
Search Engine Ranking Factors
I just came across this cool article from the SEOmoz folks who interviewed several well known SEO’s, asking them to weight the various SEO best practices in use today. I also have personal confirmation from a good buddy of mine, responsible for millions in online revenue that this info is on the level. I’m considering signing up for the paid service for more articles and tools. If I do, I’ll post any interesting thoughts.
Speaking of SEO, nichelaunch.com is a friend’s directory service. It will be worth the effort to get your name out there.
Scorpio thoughts from cf.Objective conference
I’m at the cf.Objective conference now. Ben Forta is about to give a talk about the newest release of ColdFusion codenamed Scorpio. The CF Product Manager, Jason Delmore has given several talks about the new features of CF8. It seems like ColdFusion is about to catch up with php
Seriously though, the new image manipulation features sound very useful. As well, the inclusion of the FCKEditor into text form fields is going to be sweet. CF8 should be a great platform for building flexible, custom content management systems.
As well, the new file i/o functions, inclusion of sftp support and some of the other stuff I use often as a Linux geek are going to be handy. As I move further away from coding into management, ColdFusion seems like a solid direction to take for my coding needs.
Ben’s into his talk now. Let’s see if there’s anything groundbreaking …
Cool … Ben is announcing features of CF that involve integration into the IDE CFEclipse plugin.
New CF + Eclipse features:
1. CF / Ajax Application Wizard. Ben is demoing this right now. Very slick. This is similar to the Flex wizard. So far looks like a rich feature set. And … woah, the ability to debug, in realtime, right within the Ajax client. Hmm, this is idiot proof.
2. New Eclipse based ColdFusion debugger. This will include step through debugging, access to variables and the ability to do breakpoints. Heh heh, Jason McKinney whom I work with at Aslan Interactive just leaned to me and mentioned how this is going to make FusionDebug useless (the FusionDebug guys are here and just raffled away a couple licenses).
Flex Data Services (fighting data clobbering):
This is slick, Ben is demoing how a Flex Data Services is maintaining the relationship of between the client and the state of the data theyre looking at. In his example, two users are editing the same product data. As one changes the price of a product, the other is notified right away that the data they’re looking at has been updated and there is now a conflict with the data they have on their screen and the updated data. This second user now has options on updating or ignoring. As well there looks to be some heavy performance boosts along with ease of installation. The CF8 installer will ask if you want to install LCDS (Life Cycle Data Services … new name), and that’s pretty much it.
When?
Sounds like this will all be coming out in the summer or early fall. Adobe Max 2007 is going to be in Chicago (my home) at the end of September. I assume this is going to be all out by then.
UserCore is back online
I’m back and logging. And sure enough, after letting the domain expire and it falling under new ownership, I’ve got usercore.com back. Time to continue where I left off back in 2000.
Design? Well I’ll get to it some day. A designer is the one thing I am not. So please be nice. Thanks to Ray Camden for the yellow
Recent Comments