Subscribe to RSS Subscribe to Comments

Alan Blaine Whitney

Subversion for PHP Websites

Lately I have been using svn with a few various PHP websites that I maintain.  In short, here is what I have found out.

Once you get used to typing svn commit and svn update, it’s addicting.  That is a very slick way to go about dev.  I have used it update live websites with svn update, to do development from various places (tele-commute days versus at work).

Here are some things that I don’t like about it.  Inital imports and checkouts take forever, there is no tar like thing to transfer just one file.  Can really take a while sometimes.  This is my biggest problem.  My second thing, is that php websites always have some files you can’t track in the repo, like config files, template caches, or other tmp files, so you also have to remember to svn delete them.

Good reads this morning

This morning I have read some awesome blog posts, just figured I would share.

Less is better
David Heinemeier Hansson, from 37 Signals, creator of Ruby on Rails, over usability guy.  Very good read about web application development.  Really enjoyed him talking about specs and functionality scope on the top of page two.

Small business owners are community managers
Connie Bensen often writes about community managers.  In this post, she covers why small business owners are more or less, community managers.  I liked the graphic.

underperforming
This is something that I don’t do much, but analyst traffic to see how to do things better.  This was a great article describing how to view stuff like google analytics.

Microsoft

Microsoft just called me.  They wanted to conduct some survey and they were willing to pay $25.  I just didn’t have the time, plus something just felt wrong about it.

Api’s and Feeds

In this era of the web, you need to have feeds and API’s.  At the very very least, something like an RSS feed.  If you have aggregated content, or updates, you need an RSS feed.

Since everybody has so much going, blogs, twitter, facebook, delicious, digg, youtube, flickr, etc, etc, API’s are so helpful in allowing people to use your service in the most automated way.

JQuery Validation

If you already use jquery for your javascript framework.  May I recommend jquery validate.  Simply put, the just javascript form validator I have ever used, and I have used a few.  This is one is a real winner.  It’s one line of js, and you put stuff like class=’required’ or class=’required email’ inside of your input tags.  That’s it.

Development

Been working on a project for a while and it got me thinking about some project flow.  I use cakephp, yui, and jquery frameworks to help speed up development.  In general this makes projects go quicker, at least initally.

Once the broad strokes is done, development slows.  And this is to be excepted, when somebody builds a house, the framing goes really quick, but the finishing takes a long time.

When you get to the end that seems to be when the rush of feedback happens.  Feedback from the people that you are building the application for that is.  Sometimes the feedback is dumb, sometimes not, sometimes it means redo parts of the application.  Lots of wisdom applies here from the “eat your own dogfood” thinking or the “build for yourself” people.

Success often is in the details though.  Lately I have been thinking about just ignoring the details until close to the end, then really focus on them.  So far, I think this is a good idea.

JQuery and Speed

I use jquery a fair amount.  Overall I am very pleased.   I use the full effects and ui suite.  Both UI and JQuery offer a minified version of their libraries.  Which is great, but sometimes I like to have the source to look at, so I often download the developer versions of this libraries.  So to use them, I would have to use the non-minified versions and would have to make many more http requests then needed and now on top of that, include any of my own javascript code.

This could make things very slow.  To work around this, I wrote a bash script, that is executable in Linux and uses the wonderfully simply jsmin program.  I place all of the files that comes with jquery ui (along with thickbox) in the /js/ folder along with this bash script.

#!/bin/bash

gcc -o jsmin ./jsmin.c

cat jquery-1.2.6.js | ./jsmin > main.js

cat effects.core.js | ./jsmin >> main.js

cat effects.blind.js | ./jsmin >> main.js
cat effects.bounce.js | ./jsmin >> main.js
cat effects.clip.js | ./jsmin >> main.js
cat effects.drop.js | ./jsmin >> main.js
cat effects.explode.js | ./jsmin >> main.js
cat effects.fold.js | ./jsmin >> main.js
cat effects.highlight.js | ./jsmin >> main.js
cat effects.pulsate.js | ./jsmin >> main.js
cat effects.scale.js | ./jsmin >> main.js
cat effects.shake.js | ./jsmin >> main.js
cat effects.slide.js | ./jsmin >> main.js
cat effects.transfer.js | ./jsmin >> main.js

cat ui.core.js | ./jsmin >> main.js

cat ui.accordion.js | ./jsmin >> main.js
cat ui.datepicker.js | ./jsmin >> main.js
cat ui.dialog.js | ./jsmin >> main.js
cat ui.draggable.js | ./jsmin >> main.js
cat ui.droppable.js | ./jsmin >> main.js
cat ui.resizable.js | ./jsmin >> main.js
cat ui.selectable.js | ./jsmin >> main.js
cat ui.slider.js | ./jsmin >> main.js
cat ui.sortable.js | ./jsmin >> main.js
cat ui.tabs.js | ./jsmin >> main.js

cat thickbox.js | ./jsmin >> main.js

cat page.js | ./jsmin >> main.js

The file page.js is my javascript source. Sometimes I add additional files as well.  Here is a download-able demo of this.

Some other speedy libraries that I enjoy to use are CSSTidy and OptiPNG

Intel Motherboard

I bought an intel D201GLY2A from newegg. Just going to share what I had to do to get it working correctly in Ubuntu 8.04. The video had very strange lines, almost like static. Audio didn’t work at all. Those were the two things that needed the attention.

First the video, the SIS are crap

sudo apt-get remove xserver-xorg-video-sis

Now the sound.

sudo vi /etc/modprobe.d/alsa-base

find “options snd-intel8×0 index=-2″ and set it to “=0″

sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa

Now reboot. That worked for me, I have 1280×1024 video with good quality and sound that works fine off the front headphone jack, and is quiet off the back.

Delicious

I find it useful to spend about a half hour to an hour every month reviewing my delicious bookmarks.  I have found some good stuff on the internet in the past, only to forget when I need it.  In my experience, it is a fruitful use of time to search my delicious for cool stuff.

Javascript Frameworks

If you do any web 2.0 style rich internet application stuff, a good JavaScript frameworks is a must. There are two frameworks that I have used a bunch. Prototype with Scriptaculous and jQuery. Before I get to far into this, let me say, I really like both. Both are powerful, both are extremely good libraries.

I started with Scriptaculous (with means prototype as well).  This worked very well.  I was so impressed with the utility methods in prototype and the way ajax calls were wrapped.  Scriptaculous/Prototype has powered many websites that I have put together.

Lately I have been using jQuery.  I have only done one large project with jQuery.  I found jQuery very powerful as well.

So which one is better, well, it depends.  Here are my opinions.  Documentation for all three (prototype, scriptaculous, jQuery) is good.  Prototype and jQuery’s documentation is the best.  Scriptaculous has many more visual effects than jQuery.  jQuery’s selector (“$” function) is way more powerful then prototype’s.  jQuery’s syntax is better, more efficient.  jQuery plugins simply rock.

I would recommend both.  In the future, I will use jQuery.

« Previous PageNext Page »

Based on FluidityTheme Redesigned by Kaushal Sheth Sponsored by Send Flowers