Tuesday, 31 August 2010

HTML 5

I am currently in the long and drawn-out process of developing a new website. The project is not yet ready for announcement, but prototyping work and coding is well advanced. As usual, the design of the website is proving problematic for this non-designer.

However, the coding of the underlying technology is going swimmingly. It has been years since I have done any database (SQL) work - britishwalks.org is firmly based around flat files generated by a Perl backend. Yet the SQL work has proved to be both enjoyable and interesting, leaving me free to ponder other questions.

HTML (Hyper Text Markup Language) is the underlying technology that defines how a webpage looks and feels to the end-user. Development of the HTML standard has evolved rather slowly over the years,with some dead ends along the way. W3C is the group of experts in charge of specifying the HTML standards.

W3C wants agreement from all interested parties before a technology is standardised. Foremost among these interested parties are the browser developers who need to update their browsers to cope with the new standards. The companies behind these browsers - especially Microsoft, Google and Apple - have their own visions for the future of the Web, and want to bend the specifications towards their visions and business plans. For this reason, they often introduce conflicting versions of new features before they appear in the standard. This compounds arguments between them over the shape and future direction of the technology.

The new version of HTML, HTML 5, is progressing well, and is now a draft standard.It includes new features such as drag-and-drop, video playback, offline storage, 2-D drawing and many others.

There are some problems. For example, take one new feature of HTML 5: the video tag. The final aim for this it to allow embedded video, in a similar style to YouTube. Currently this can only be done via a plugin (a non-standard extension that runs within a browser). Unfortunately some developers want to use one system to encode the video, others another. The lack of agreement has led to the HTML 5 standard having a video tag, but no standardised underlying video system. It is a farcical situation that will not benefit users of the web.

The browser developers are all in a race to implement all the features of HTML 5 as quickly as possible. The latest versions of Internet Explorer, Google Chrome, Firefox and Apple Safari all implement at least part of the standard and are in a race against each other to develop the rest. Sites such as HTML5Test allow you to see which parts of the standard your browser supports.

HTML 5 is going to change the way the web works (although, hopefully, not visibly to the end-users). This has led me to wonder whether my new website should use these new features. On the positive side I shall learn a great deal about these new web technologies, and future-proof my website. On the downside, it might not be fully accessible to users of old web browsers such as the long-lived Internet Explorer 6.

As one small example, my britishwalks website has maps that show walks that I have done in various counties. These maps are generated using a technology called Scalable Vector Graphics (SVG), but as few browsers supported SVG, the website converts these to images for display. SVG should be supported in all major browsers soon, but HTML 5 introduces a new element, canvas, which could well do the job. Using SVG or Canvas instead of images will enhance the user experience in several ways - for instance, using SVG the user could zoom in to see more detail, or click on the image to access a particular walk.

It will be some time before I have to make a decision - I have a great deal of other work to do before then, in addition to pulling together the mass of data needed for the website. By that time the features I want to use may be much more common in browsers, removing that problem.

It is an interesting conundrum. I can achieve all of my aims by using the old HTML 4.01 standard, but only by jumping through various hoops. Time will tell which way I jump.

Monday, 2 August 2010

Sherlock

The BBC broadcast the second in the promising Sherlock series last night. The story of 'The Blind Banker' - involving murder and smuggled artefacts - was obviously based on the Sherlock Holmes book, "The sign of the Four".

First, the positives: the series so far has been very good. True, it has been updated to take place in contemporary instead of Victorian London, but the writers have given more than a quick nod to the original material. The first episode was excellent, with the introduction of Holmes and Watson deftly handled.

Whilst good, last night's episode was slightly disappointing. There were a few unnecessary get-out-of-jail free cards; for instance a struggling Watson knocks an automated crossbow that is aimed at his girlfriend, making the bolt miss her and hit the man who is fighting Holmes. Such a shot has to be a million to one, and was lazy writing.

The biggest problem, however, was Sarah, Watson's love interest. Although ably-played by Zoe Telford, the character's actions made little sense. First of all, some background. In 'The Sign of the Four', Arthur Conan Doyle introduces Miss Morstan, who later becomes Watson's wife. Therefore there has to be an assumption that Watson and Sarah will become an item in later stories.

In this adaptation, they meet as Watson applies for a job as a locum in a surgery run by Sarah. She hires him, but he falls asleep during a surgery, causing a queue of patients to build up. A normal reaction would be for her to reprimand him; instead she takes over his patients and does not seem to mind. Shortly after, she agrees to go out on a date with him. Her reactions were nonsensical and made her seem unprofessional.

It would have been easy for he plot-line to have been more deftly handled. For instance, she could have noticed that Watson was tired, but that he worked diligently through his line of patients. As a thank you, she invites him out. With a small change you have improved Watson's character (he is a diligent worker) and hers (her actions make sense).

Whilst on their date at a Chinese circus, Holmes gets attacked. Watson runs to his aid, as does Sarah. I would really wonder whether any woman would run up into a fight with two people she hardly knew - she had only just met Sherlock that evening. More likely that she would stand back or call the police. Again, it was sloppy writing - there needed to be a reason for her to risk her own safety by going to their aid.

This sort of thing happens all the time in TV dramas, but it stood out in last night's episode due to the brilliance of the rest of the plot. These are, however, minor foibles in what could well become a classic retelling of familiar tales.