HeydonWorks front-end Web Design Blog Posts

27/01/09 01:44:25 PMThe Importance of Correct Code (next)

Error-free code makes it easier for Search Engines to crawl your siteIf you run a popular website which has been around for a while you can get away with nasty, error-filled code. At the time of writing, amazon.co.uk’s homepage has over 2000 errors which is more errors than elements to contain errors in most of the pages I have coded.

If you’re smart you’ll get your site designed properly in the first place because then it will be easier to manage and redevelop. Nevertheless, for the time being you’re okay.

Why? Because the popularity of your site and the age of your domain will have a positive impact on your search rankings by themselves, ensuring you attract evermore visitors. Congratulations! You’re stuck with an out-of-date website but business is good.

However, for newer small websites, correct code is third only to keyword research and semantic markup in gaining favour with the search engines; error-free code makes it easier for search engines to crawl your site and locate the keywords and phrases in which you’ve invested.

comments »

27/01/09 01:35:12 PMDeath to WYSIWYGs (next)

Giving the user more options does NOT make things easierFor those who don’t already know, a WYSIWYG is a widget designed to assist web content management. There are many available but all tend to emulate MS Word by giving the user numerous text editing and media insertion options.

For anyone who hasn’t had to use one I’m sure they sound pretty handy. They are not. They are heinous. Just for starters, there are the bugs. Here are some of the bugs I have experienced using a fully-featured FCKEditor (read:FuckEditor):

* Moving an imported image from one part of the ‘post’ to another changed the file path to an incorrect location
* Deleting text in the preview mode did not remove tags in the code
* Elements disappeared intermittently or refused to be selected
* The backspace key reloaded the page so I lost all my work
* It didn’t work in Safari whatsoever

And to think that this was a bit of kit designed to help me input content! It’s true that there are better WYSIWYGs than FuckEditor available but they are all designed based on the false premise that GIVING THE USER MORE OPTIONS MAKES CONTENT MANAGEMENT EASIER.

What’s wrong with giving the user a simple text input for a heading and a textarea for the body copy then applying the correct tags (heading and paragragh tags respectively) to the submission when it is outputted? Add a bit of PHP to replace the carriage returns with break tags and you’ve got all the formatting you need. If the user wants to add links then it’s not beyond anyone just to insert the mark-up straight into the input. You can give them an example to get them started.

Not only have you removed the temptation to apply font styles that destroy the look of the site but also you’ve forced the user to think of the content semantically. The output is simple (WYSIWYG output is necessarily full of embedded tags and inline styles) and search engine friendly.

There: Better and quicker.

comments »