Shaun Mccran

My digital playground

02
M
A
R
2010

Changing the 404 template handler in IIS

You could use a 404 ColdFusion template to handle missing templates, or the onmissingtemplate Application CFC function. Luckily I have a client with half a dozen sites all on the same server, with nothing else on it, so it makes more sense to do this in Internet Information Services.

404 templates are a handy way of masking any site errors or missing templates. Not only are they a cosmetic fix to nasty display errors but they can also seriously help your server security.

[ More ]

22
J
A
N
2010

Strict or Transitional DTD type validation, worth hacking just to pass?

An area of web development that I previously had little exposure to was WCAG validation. This is the industry standard for Accessibility coding for web platforms. For version two (V2) of the WCAG there are three standards, A, AA and triple A (AAA). Each represents different levels of Accessible compatibility.

What this also does is validate against the W3C doctype standards. This is where my problems arose. The main aim of the doctype standard is to clearly define a separation layer between content and behaviour. In practical terms this equates to best practices such as having an external .CSS files rather than inline styling, and declaring the language types for scripting, such as JavaScript etc.

Using a free online tool, http://www.totalvalidator.com/ you can check if your site is W3C and WCAG complaint. It will base the validation on the doctype declared in your html. There are three types of DTD declaration for html 4.01.

view plain print about
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
3<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4
5<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/frameset.dtd">

You can read more about Doctypes here: http://www.w3schools.com/tags/tag_DOCTYPE.asp

The main difference between these is that the frameset DTD will accept frameset as valid html, whereas the others will not. Also the Strict DTD imposes a very tight restriction of what is accepted as valid in comparison to the Transitional DTD. One is a Strict adherance to the standard, whereas the other shows that you are Transitioning from old code into the new.

The site http://24ways.org/2005/transitional-vs-strict-markup goes into more detail about what the exact differences are, what I am going to discuss is the option of creating functional hacks, merely to pass validation.

One of the deprecated attributes in Strict validation is the target attribute.

view plain print about
1<a href=http://www.mywebsite.com target=_blank>Follow this link to go to my website</a>

We are all familiar with this attribute, but when you examine it you find that it is actually a declaration of behaviour. We are forcing the user into a specific action. IE open a new window. As a best practice guideline whenever we have a link on a site that exits that site, we open a new window. The only work around for this is creating a specific JavaScript function to open a new window, as this will not be marked as invalid. This seems overkill, just to pass validation.

So I am left with the dilemma that if I want my sites to pass Strict DTD validation I must create a JavaScript hack, or compromise the functionality. I'd like to pass the validation, but I view the functionality as key to a site, so it's an easy decision for me.

15
J
A
N
2010

Top 5 remote working applications

With the UK currently stumbling to a halt due to snow I've been working from home. I like working from home, it has many advantages like the time saved in commuting, and the fact that you usually know your own hardware/software setup better than works.

One thing it has highlighted is that as a software developer your actual location is now totally irrelevant. Even for team based projects you do not all have to be in the same physical location. Our physical and online worlds have become so enmeshed that is it now common place to be able to work productively from anywhere.

So with that in mind I thought I'd do a quick round up of my favourite remote working applications. Some are more "best practices" with recommendations if I've been using a specific product. Warning: all recommendations may contain nuts.

1. Online Code / Asset Source Control

Having your code in an online repository is an absolute life saver. Not only does this contribute towards a "Business continuity" plan for regular working, but it means you can get to it from anywhere. We should all be using source control anyway, but having it online means that it's much more easily maintained and you are not moving code around on USB keys.

I use an application called Beanstalk. www.beanstalkapp.com. They have worked well for me so far, and the basic account is free.

2. Virtualisation

The Virtual PC software market has moved on considerably in the last few years. To the point now where there are free versions of virtualisation software that allows you to create virtual pc's inside your actual physical pc. I use this at work and at home for a few reasons. Firstly I don't even have a physical development server anymore, it is a virtual windows 2003 server, and secondly this is great for setting up specific testing environments. Need a windows XP running Internet Explorer 6? Create a new virtual image and install XP, it is far more reliable than multiple IE's or other Internet Explorer emulation software.

I use VM ware server 2.0, its totally free (Virtual pc's operating system licences aren't so be careful) you can get it here: http://www.vmware.com/products/server/

3. Instant messaging / Skype

Communication in any team is important, especially so if you are working remotely. If no-one can contact you then appearances may be that you aren't working at all, which is bad news. I use Skype http://www.skype.com/intl/en-gb/ which can be used for chat and messaging.

The obvious benefits are that it is free, and means you can have team discussions online. More recently I've encountered several companies that actually use Skype as their main communications tool. They don't even have desktop phones anymore.

4. FTP clients / File synchronisation utilities

Ideally you can still provide any of your in-office functionality at your remote location. So being able to implement change releases is essential. I use a combination of Filezilla http://filezilla-project.org/ which is a free FTP client, and Beyond Compare http://www.scootersoftware.com/ which is a file comparison tool. Ideally I'd like to learn ANT, but just haven't got round to it yet.

5. Online file storage

Services like DropBox https://www.dropbox.com/ are invaluable for the online storage of files. We always have online briefs, and Photoshop designs flying around the place, so storing them in one central online location is an ideal way of ensuring that you always have the latest version. It also avoids the problem of not having the project spec, and not being able to work.

I personally use Google Docs for this http://www.google.com/docs I've found it to be a very flexible easily maintained way of storing pretty much any format of document.

20
N
O
V
2009

Exploring the variations in email UN subscription methods

If you are anything like me, everyday you are smothered in a stack of emails from various companies all delivering html formatted, image heavy flyers persuading you to buy whatever dead horse they are flogging. I know it is my own fault, after all I signed up to them in the first place, I've only got myself to blame. As I find myself checking (and deleting) these email on an Android mobile device now it has become hassle-some. So I set out to unsubscribe from the majority of them, which is where the inspiration for this article came from.

In a short period of time I have unsubscribed from around a dozen different email newsletters, and because of this the differences in the methods used to accomplish this have become glaringly obvious. I was very surprised at the variations in the methods used, some are very user friendly, and others are very much not. I won't name the companies involved.

Case one:

By far the easiest user interaction, this is a simple link from an email that provides you with a screen confirming your UN subscription. No prompt is required from the user, you are simply unsubscribed. All the data is passed seamlessly behind the scenes.

Case two:

Almost the same as above except that you are taken to a screen where you have to commit an action. You are presented with a screen displaying your email address, and prompted to click a button to confirm the UN subscribe action. This may be a handy safety net to step errors from the casual clicker.

Case three:

Clicking on the link from an email takes you to a generic page with a form on it. They have not transferred any form of token from the email so you are prompted to enter the email address you want to UN subscribe. Entering your email address takes you to a screen confirming your action. This additional step is unnecessary, and doesn't add any value at all.

Case four:

In this scenario we are passed to a page where we have to login. The subscription details are attached to an account application, and as such your credentials need to be verified. Based on passing an encrypted token from the email a user could easily be logged in automatically. Actually requiring a username and password adds an additional level of complexity. Once I logged in I then had to navigate to the subscription settings and choose to unsubscribe with a form similar to the ones mentioned above.

Case five:

In the most convoluted example I have come across so far I actually had to create an account. I arrived at the UN subscribe page and found that to subscribe did not require an account, but to change my subscription options did! This was a very strange scenario, requiring a user to create an account to stop emails. Once you have created an account the subscription options were managed through a form like the ones mention above.

Conclusions

I think the thing to keep in mind with functionality like this is the balance between usability and the business objectives. An obvious point to note is that businesses do not want their users to UN subscribe to their emails. This is their user base and they do not want to lose it. Still it is worth considering just how you interact with your customers, even when providing functionality you do not want them to use.

After all you can always just 'Mark as Spam'.

_UNKNOWNTRANSLATION_ /