Redbus Tour

In: General

21 Jul 2005

Yesterday Andrew Gearing (AGCC), took me on a tour of London Meridian Gate DC. You cannot go anywhere without a PAC security card access and it was very noisy on the datacenters floors. Anyway was very interesting to see, thanks Andrew:)

Security

  • Very Early Smoke Detection Apparatus (VESDA) installed
  • Smoke detection system
  • FM2000 fire suppression system
  • CCTV system covering all entrances/exits and main areas
  • 24-hour video recording
  • Full perimeter alarm
  • PAC security card access system
  • Visual verification of all persons entering the data floor

Character Encoding

In: General

15 Jul 2005

Yesterday I had a nightmare with some very unusual character encoding issues. This only occurred in internet explorer, however the text of the page was static, the charset for the page was:

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

and also the http header for the charset was set to UTF-8. Halfway through the body of the content ie did not recognise a character skipping the next few characters and cutting off half of a strong tag. eg “etcetc…strong>” where as the source was “etcetc…</strong>”. I haven’t found the particular cause at present, however overwriting the file with a previous version overcome this problem. Will be curious to know if anyone else has come across any peculiar results such as the above.

A very quick thing I learnt yesterday as well..
When using a hyperlink to a pdf file you can search the document by suffixing a hash.

.pdf#search='query'

Ensure the query is within quotes.

A particular interesting project, as I have been doing a little research into this topic and recently retrieved the specifications for ETSI.

The BBC TV-Anytime Java API is for parsing, manipulating and creating TV-Anytime metadata. It is currently released under LGPL

TV-Anytime is an open standard for metadata describing TV and radio programmes that is designed to support Personal Video Recoders (PVRs), programme guides and related technologies. The TV Anytime Forum is an association of organisations which seeks to develop specifications to enable audio-visual and other services based on mass-market high volume digital storage. For further information go to www.tv-anytime.org. The TV-Anytime specifications are published by ETSI as the TS 102 822 series and are available at the ETSI web site (http://www.etsi.org/)

BBC R&D White Paper WHP060
TV Anytime

  • CPAN modules
    These are projects we have released the following distributions to CPAN (Comprehensive Perl Archive Network)
  • Apache Modules
    These are modules extending the capabilities of mod_include type functionality.
  • Dirac
    Dirac is a state of the art video codec that provides general-purpose video compression and decompression tools. It is cross-platform and written in ANSI standard C++.
  • Media Lounge
    A C++ application, based on the “Crystal Space 3D” game engine SDK. It displays an interactive, shared virtual world, in which the content author can embed audio and video sequences
  • TV-Anytime Java API
    The BBC TV-Anytime Java API is for parsing, manipulating and creating TV-Anytime metadata.
  • Kamaelia
    Kamaelia is designed as a testbed for network experimentation using a component architecture designed to simplify creation and testing of new protocols for large scale media delivery systems.
  • Media Dispatch
    A reference implementation of the Pro-MPEG Media Dispatch Group’s Media Dispatch Protocol.
  • MXF File Test Engine
    Provides a system that allows various tests to be performed on MXF files
  • Video Shot Change Detector
    A simple DirectShow video shot change detector filter, suitable for a wide variety of applications.

Also don’t forgett to go backstage.
And other R&D Projects.

Odd XSL Bug

In: General

11 Jul 2005

Today I found an odd bug in MSXML.

<!--
  <xsl:comment> -----BEGIN call-template name="article" EMPTY PathID----- </xsl:comment>
-->

msxml3.dll error '80004005'

The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.

"C:\DOMAINS\HOSTELHOST.COM\WWWROOT\CLIENT\DK\EYEWITNESS\../includes/src/default.asp, line 43"

Getting back into ASP

In: General

10 Jul 2005

I recently wrote a very quick CMS in ASP in two days and seeing as I haven’t touched ASP in a number of years and have forgotten alot of very minor things, such as language constructs. I have re-learnt some slightly odd methods to what i’ve been using recently with complex forms for example passing collections over from web forms. E.g.
Trying to pass over an array as I usually would use something along the lines of…

<input type="text" name="InputArray[id]" />

I spent most of that time trying to figure out how to loop through a Request.Form Collection to extract the name of collection submitted across. What I didn’t realise at the time was that you don’t need the brackets and the collection name is the parameter you submit across.

<input type="text" name="InputArray" />
Sample

Request.Form("AssociateDataKey").Count
For i=0 To Request.Form("AssociateDataKey")
Response.Write Request.Form("AssociateDataKey")(i)
Next

This is using a Natural Form Field Array, however you can suffix a number (Artificial Form Field Array) and loop through the collection to check whether it exists. This makes me question how you pass multi-dimensional arrays across with ASP?


<input type="text" name="InputArray[0][1]" />
<input type="text" name="InputArray[1][0]" />

Top Ten ASP Tips – Know the differences between Natural and Artificial form field arrays.

With regard to the simple CMS, it’s actually designed to be very flexible, supporting structured & unstructured data, as the information output will be for flash. The CMS adapts to the design of the database, with roughly seven queries you can extract all the information from the database that you could possibly require. As I mentioned the CMS analyses the datatypes displays HTML form fields according to them datatypes. Disables, enables forms based on the fieldname etc and updates joined tables. Whilst the only aspect of the CMS that really needs tweaking is the SQL SELECT fieldnames & the WHERE clause, I will most likely Map this back to XML as a form of MetaData and because the design directly relates to a physical sitemap, even in its present state the marketing guys can understand it.:D

This will run
www.vh1la-media.com
www.mtvla-media.com

Off The Shelf CMS

In: General

29 Jun 2005

Whilst writing custom Content Management Systems, its quite surprising, how the various rules that I implement from WorkFlow to Logic, actually make many Content Management Systems available Off The Shelf useless. Most predominantly Presentation Logic is a critical factor in most if not all open source CMS’s making them unviable solutions.

A very simple example.

  • If user input contains HTML elements and attributes except ‘p, b, br, i, u, a’.
  • Strip repeated HTML elements.
  • If word length is greater than a specified amount break apart, if not HTML element or last element closed.
    • If contains non-breakable term such as a brand precede to break apart before term
    • If contains punctuation such as ‘-’ or ‘\’ or ‘/’ break terms apart, if slash add white space padding…
    • If non breakable highlight before publishing

Displaying peoples names for example in a very limited space, is a difficult task when you have to comply with consistency and keep them on one line. E.g. (Removed real names for privacy)

12345678 123456789012345
12345 12345 1234567890123

When you look at some simple rules like this and have strict designs, this is where most Off The Shelf CMS’s fall short. Control and flexibility is an awkward combination, as the more control you encompass the more complex it becomes to maintain.

WTVML

In: General

29 Jun 2005

Lately I’ve been looking into a new topic.

There are a couple of different services of which can get quite easily mixed up. Firstly “WTVML is a markup language that provides a content authoring format for interactive television service applications based on Internet standards.” and also “Sky Active, which is an interactive entertainment channel that is a cross between a television channel and a magazine”.

The possiblities of SkyActive & SkyInteractive are not quite clear as yet, however finding the time todo further research & development into the above is holding me back at present. However it would be nice to hear back from others who have had the time to look into or are currently developing for either of the above.

For more information take a look at (skyinteractive.com / skyactive.tv)

Schemas:
http://waptv.com/xsd/v6/wtvml_6.0.xsd
DTD:
http://waptv.com/DTD/wtvml_1.0.dtd

More References

Web Standards

In: General

27 Mar 2005

After pitching for the Museum of London it has brought to light the hypocritical nature of businesses and web standards. Why claim under false pretences that your site abides to web-standards? I find this fundamentally scrutinizing when it states “The Museum is not be liable for any loss, damage or inconvenience arising from your use of, or reliance on, the website”. What is the purpose of a website if it inconveniences users? Three seconds later the browser is closed and the purpose of the site is detrimental to itself.

After attending the Royal National Institute For The Blind (RNIB) it has made me realise, how intricately designs ultimately hinder end-users performance. Balancing a graphically innovative site is a very tedious task and is difficult to cater every audience. Looks like I am going to have to do more research… Standards are pushing things in the right direction; however it’s down to common sense, although aspects as highlighted by RNIB, were not quite as apparent.

I have implemented a object model, which should be extensible enough to implement different providers for managing IIS.

Method Description

  • Get Retrieves a value for a named property from the object.
  • GetDataPaths Retrieves the paths to all locations of a metabase property subordinate to a specified starting path.
  • GetEx Retrieves a value or values for a named single-valued or multivalued property of the object.
  • GetInfo Reloads the object with property values that exist in the metabase.
  • GetPropertyAttribObj Retrieves an object that contains the property’s attributes. This object can then be used to etrieve individual attributes of ADSI properties.
  • Put Sets the value for a named property of an object.
  • PutEx Sets the value or values for a named single-valued or multivalued property of the object.
  • SetInfo Writes the object property values to the metabase.

This was writen quite some time ago, however I will publish it as it simple works.

<?php

/**

* @package IIS

* @version $Id: IIS.php,v 0.1 2004/05/28 11:51:28 Andrew M. Johnstone Exp $

* @Copyright © 2003-2004 Andrew M. Johnstone (andrew@ajohnstone.com)

*/
class IIS { // extends COM { // extending Com dies()…

/**

* COM Object Parameters

* @var array

* @access public

*/

public $param=array(
‘Provider’ => ‘IIS’,

‘MachineName’ => null, // . or localhost or computername

‘ObjectPath’ => null
);

/**

* COM Object

* @var object

* @access public

*/

public $Com=null;
public function

__construct($command=null, $MachineName=‘localhost’, $ObjectPath=‘’) {

if (!isset($this->param[‘MachineName’])) $this->param[‘MachineName’]=$MachineName;
if (!isset(

$this->param[‘ObjectPath’])) $this->param[‘ObjectPath’]=$ObjectPath;

switch($command) {
case

‘Start’ : $this->StartServer();    break;

case ‘Continue’ : $this->ContinueServer(); break;
case

‘Pause’ : $this->PauseServer();    break;

case ‘Stop’ : $this->StopServer();     break;
}

try {

$this->Com = new Com(“{$this->param[Provider]}://{$this->param[MachineName]}{$this->param[ObjectPath]}”);

} catch (com_exception $e) {
die(

“TERMINATED:: n”. print_r($e));

} catch (Exception $e) {

die(“TERMINATED:: n”. print_r($e));
}

}

public function

__destruct() { unset($this->Com); }

public function __call($_callee) {
try {

switch(

$_callee) {

case ‘Start’ : return $this->Com->Start();

case ‘Continue’ : return $this->Com->Continue();
case

‘Pause’ : return $this->Com->Pause();

case ‘Stop’ : return $this->Com->Stop();
}

} catch (

exception $e) { var_dump($e); }

}

/**

* Display IIS Structure

* @var object
* @var int

* @access public

*/

public function DisplayTree($Obj, $Level) { //Recursive

if ( ($Obj->Class == “IIsWebServer”) Or ($Obj->Class == “IIsFtpServer”)) {
print

“{$Obj->Name} - {$Obj->ServerComment}n”;

} else {

print “{$Obj->Name}n”;

}

foreach ($Obj as $CurrentObj) $this->DisplayTree($CurrentObj, $Level+1);
}

/**

* @WakeUp & Think;)

*

*/

public function DisplayNode($MachineName=‘localhost’, $ObjectPath=null) {
$this->param[‘ObjectPath’]=$ObjectPath;

$this->param[‘MachineName’]=$MachineName;
switch(

$this->Com->Class) {

case “IIsComputer” :

return array(

‘MemoryCacheSize’=>$this->Com->MemoryCacheSize,
‘MaxBandwidth’=>$this->Com->MaxBandWidth

);

case “IIsWebVirtualDir” :

return array(

‘Path’=>$this->Com->path,
‘Defaultdocument’=>$this->Com->DefaultDoc,

‘UNCUserName’=>$this->Com->UNCUserName,
‘Directorybrowsing’=>$this->Com->EnableDirBrowsing,

‘ReadAccess’=>$this->Com->AccessRead,
‘WriteAccess’=>$this->Com->AccessWrite,

);

case “IIsFtpVirtualDir” :

return array(
‘Path’=>$this->Com->path,

‘UNCUserName’=>$this->Com->UNCUserName,
‘ReadAccess’=>$this->Com->AccessRead,

‘WriteAccess’=>$this->Com->AccessWrite,
);

case

“IIsWebService” :

return array(

‘DirectoryBrowsing’=>$this->Com->EnableDirBrowsing,
‘DefaultDocument’=>$this->Com->DefaultDoc,

‘ScriptAccess’=>$this->Com->AccessScript,
‘ExecuteAccess’=>$this->Com->AccessExecute

);

case “IIsFtpService” :

return array(

‘EnablePortAttack’=>$this->Com->EnablePortAttack,
‘LowerCaseFiles’=>$this->Com->LowerCaseFiles

);

case “IIsWebServer” :

return array(

‘1stBinding’=>$this->Com->ServerBindings(0,0),
‘State’=>$this->ServerState($this->Com->ServerState),

‘KeyType’=>$this->Com->KeyType
);

case “IIsFtpServer” :

return array(

‘State’=>$this->ServerState($this->Com->ServerState),
‘GreetingMessage’=>$this->Com->GreetingMessage,

‘ExitMessage’=>$this->Com->ExitMessage,
‘MaxClients Message’=>$this->Com->MaxClientsMessage,

‘AnonymousOnly’=>$this->Com->AnonymousOnly,
);

case (

“IIsWebService” or “IIsFTPService” or ‘IIsWebServer’ or ‘IIsFTPServer’) :

return array(

‘ServerComment’=>$this->Com->ServerComment,
‘AnonymousUserName’=>$this->Com->AnonymousUserName,

‘DefaultLogonDomain’=>$this->Com->DefaultLogonDomain,
‘MaxConnections’=>$this->Com->MaxConnections,

‘ConnectionTimeout’=>$this->Com->ConnectionTimeout,
‘ReadAccess’=>$this->Com->AccessRead,

‘WriteAccess’=>$this->Com->AccessWrite,
‘Log’=>$this->Com->DontLog,

);

}

}

/**
* Strut

* @var int

* @access public

* @return string

*/

public function ServerState($StateVal) {

switch ($StateVal) {
case

1 : return ‘Starting’;

case 2 : return ‘Started’;

case 3 : return ‘Stopping’;
case

4 : return ‘Stopped’;

case 5 : return ‘Pausing’;

case 6 : return ‘Paused’;
case

7 : return ‘Continuing’;

default: return ‘Unknown!’;

}

}

/**

* Backups Located at %systemroot%system32inetsrvMetaBack
* @var (bool)$Force (Overwrite)

*/

public function backupMetaBase($Name=null, $Version=-1, $Force=0) {
$Name=(!isset($Name))? ‘Created - Backup ‘.time () : ‘Custom Backup - ‘. $Name;

$this->param[‘ObjectPath’]=null;
$this->param[‘MachineName’]=‘localhost’;

//parent::__construct();

try {

$this->Com->Backup($Name, $Version, $Force);
} catch (

com_exception $e) {

print_r($e);

}

}

/**

* Backups Located at %systemroot%system32inetsrvMetaBack
*/

public function restoreMetaBase($Name=null, $Version=-2) {

$Flag=0;
$this->param[‘ObjectPath’]=null;

$this->param[‘MachineName’]=‘localhost’;
//parent::__construct();

try {

// NOTE:  ** All IIS services will be stopped by this method, then restarted!

$this->Com->Restore($Name, $Version, $Flag);; // NOTE: for restoration, Flag MUST be 0
} catch (com_exception $e) {

print_r($e);

}

}

}

class IISWeb extends IIS {
public function

__construct() { }

public function FindWeb($MachineName=‘localhost’, $WebName=null) {

$this->param[‘ObjectPath’]=‘’;///W3svc
$this->param[‘MachineName’]=$MachineName;

parent::__construct();

//View Scope

foreach ($this->Com as $obj) echo $obj->Name . “n”;
/**

* print $this->Com->W3svc->1;

*

* —

*

* $this->Com->IISADMIN
* $this->Com->Logging

* $this->Com->W3SVC

* $this->Com->MimeMap

* $this->Com->MSFTPSVC

* $this->Com->SmtpSvc

* $this->Com->EventManager

*/

}

public function mkWebDir() {} // @Stub

public function rmWebDir() {} // @Stub
public function chAccess() { /* OBJ->Put */ } // @Stub

}

/***************** *****************/

$IIS = new IIS();
//$IIS->Start();

//$IIS->Stop();

//$IIS->Pause();

//$IIS->Continue();

//print_r( $IIS->DisplayNode() );

$IISWeb = new IISWeb();
//$IISWeb->FindWeb();

//$IISWeb->DisplayTree(new Com("IIS://localhost"), 0);

$IIS->backupMetaBase();

?>

About this blog

I have been a developer for roughly 10 years and have worked with an extensive range of technologies. Whilst working for relatively small companies, I have worked with all aspects of the development life cycle, which has given me a broad and in-depth experience.