Skip to content

Case study: Drakeshead, from a 2007 ASP site to ebitex

The ebitex team
A four-generation pedigree drawn as a tree of cards, the sire line in blue and the dam line in magenta.

Drakeshead is a Labrador kennel. Its website had been running since 2007: classic ASP, a MySQL database on shared hosting, and an admin area where the kennel typed in everything the site showed. That included stud dogs, litters for sale, a photo gallery, and one thing most small-business sites do not have, which is a pedigree database.

This is how that site moved onto ebitex, and the two parts of it worth writing about. The first is litters, which now come from the breeders themselves, through a form, with no account. The second is the pedigree archive: about 3,400 dogs whose parents are other dogs, and which is now a typed graph the platform checks, rather than rows that happen to point at each other.

The new site is a static React app. It reads everything from ebitex Content through the delivery SDK and has no application server of its own.

The old Drakeshead home page: a narrow centred column on a sepia woodland background, a small photograph of the kennel’s owners with four Labradors, and several paragraphs of plain text about the kennel’s history, with a row of text links across the top.The new Drakeshead home page: a full-width photograph of a black Labrador retrieving a pheasant from water, the headline “Fifty years of Labradors bred to work”, a badge reading “Three litters available now”, and buttons to meet the stud dogs or see available puppies.
The home page, then and now. Drag the handle, or focus it and use the arrow keys.

Editing runs through Content's Composer. Its live preview overlay renders the real www.drakeshead.co.uk homepage inline while a draft is being edited, with the field or Component behind each part of the page pinned and clickable:

What we found

Two pedigree systems, in one database, with no link between them.

The first was a real relational table: each dog with a sire and a dam pointing at other rows, and a printable certificate that walked four generations of them. The second was a table of seven rows, one for each stud dog, holding three generations of ancestors as hand-typed text. The public stud pages read the second one, so the better data never reached them.

The relational table was also far bigger than anyone expected. It had 3,376 rows, against an estimate of two or three hundred, because it held every ancestor anyone had ever typed in. 2,865 of those rows are somebody’s parent. Only 511 are not.

Litters worked the way they do at most kennels. A breeder who had used one of the stud dogs rang up, and the kennel typed the details into the admin area: the sire picked from a list, and everything about the mother written out as free text.

Those old adverts were deliberately not carried over. They held the surnames, towns and personal mobile numbers of members of the public, collected for a different purpose on a different site. Current litters are entered fresh, by the kennel or by the breeders themselves.

Part one: litters from people who have no account

The goal was to let a breeder list their own litter without making them a user, and without anything a stranger sends reaching the site just because they sent it.

The form

The puppies page has a Submit a litter button. It opens an ebitex Form in a dialog, embedded with one script tag. There is no sign-in. It is an ordinary form, built in Forms like any other, and its submissions are stored in Forms like any other.

The litter form as a breeder sees it. It says up front that the telephone number is published and that nothing appears until the kennel has checked it.

The proposal

The form has a submission handler that offers each submission to Content as a proposal against the litter Contract. A proposal is not a Component. It is not published, it does not count toward any content limit, and rejecting one deletes nothing.

The same form has a second handler, which emails the kennel through SendGrid. Every submission therefore does two things at once: it lands in the review queue, and somebody at the kennel hears about it.

A proposal is always reviewed. The review workflow is found by walking up from the folder the proposal is filed in, and if there is no workflow to find, the proposal is refused. "Nobody set up a workflow" can never quietly mean "nobody has to look at it".

The API key the handler uses can do one thing, which is offer proposals. It cannot read content, and it cannot write it. If it ever leaked, the most anyone could do with it is add to a queue that a person reads.

Matching, and what is deliberately left out

Each form field is matched to a Contract field by name. A value that matches is used to prefill the reviewer’s form. A value that does not match is still kept, and the reviewer sees it in an as received panel beside the form.

That second behaviour does real work here. The breeder’s own name and email address match nothing, on purpose. The reviewer can see them, and they can never reach the published listing, because there is no field for them to land in. The breeder’s phone number does match, because the whole point of a listing is that a buyer can ring.

Two things a form cannot fill in, and the design leans on both. The litter’s sire is a reference to a dog in the archive, constrained to male dogs, and a form value is only text. So the form asks for the sire by name and the reviewer picks the dog, which to a reviewer is more useful than an id would be. The mother’s health results arrive as received, and the reviewer copies them into her record.

A resubmission of the same form submission cannot create a second proposal, because intake is keyed on the submission. That makes a manual retry safe.

Approval makes a draft, and publishing lists it

Approving a proposal creates a draft litter Component. It goes through the same path a person creating one would: the Contract’s validation, the folder’s rules and the plan’s limits all apply. It is still not public.

Nobody keeps a list of litters anywhere. The puppies page asks Content for every published litter when it loads, and each stud page counts its own litters the same way. Publishing a litter lists it, and unpublishing takes it down. There is nothing else to remember to edit.

A hand-kept list of litters goes stale the day a litter sells. A list worked out from what is published cannot.

Part two: 3,400 dogs as data, not prose

The model

An abstract pedigree-dog Contract holds what every record shares: name, colour, registration, health results and titles. Two concrete Contracts, dog and bitch, inherit from it. There is no sex field at all. The Contract is the sex, so a second copy of that fact can never disagree with the first.

sire is a reference that accepts only a dog, and dam only a bitch. The platform refuses a bitch as a sire when the record is saved, instead of trusting whoever is typing.

We checked the data against that rule before relying on it. 1,056 different dogs appear as a sire and every one is male. 1,809 appear as a dam and every one is female. It needed zero corrections, because the old editor filtered its parent dropdowns by sex. The model writes down a rule the data had quietly obeyed since 2007. We also found no cycles anywhere, which confirmed it is a genuine family tree, and the deepest line goes back sixteen generations.

Titles are records of their own, each with a rank, so a dog’s titles sort in the order the kennel ranks them. The old system allowed one title per dog.

What we left loose, on purpose

Constraining a field is a decision to throw away whatever does not fit, so we only did it where the data was ready.

  • Health results stayed free text. The genetic eye test alone was recorded in 115 different spellings of about four real results, and those same strings are the only record anywhere of nine other conditions. A tidy four-option list would have deleted all of it.
  • Identity comes from the old database’s own key, never from the name. 94 names repeat once you tidy the punctuation.
  • Ten rows turned out to be ten saves of one dog, so 3,376 rows became 3,367 dogs.
  • 38 parent links pointed at dogs that no longer existed. A reference to a missing record is refused, which is the point, so those links were dropped and written into an import manifest rather than guessed at.

Importing a graph

A dog can only reference parents that already exist, so the import writes the titles first, then the oldest ancestors, then one generation band at a time. The archive has seventeen of those bands. Within a band, writes run in parallel. The whole archive, 3,385 Components including the titles, went in through the Content Management API in about thirteen minutes.

Running the import again creates no new versions, which means a final snapshot on the day of the switch can simply be applied again.

One oddity is worth knowing if you build something like this. The model refers to itself: the abstract Contract constrains its own references to its own children. So the Contracts are applied in two passes, first without the constraints and then with them.

One record, every view

Before the move, the same dog could be typed into three places. Now each dog is one record, and everything that shows it is a way of reading that record.

The stud dog page draws a four-generation pedigree by asking Content to resolve references to a set depth, so the whole tree arrives in one request. The printable certificate, thirty ancestors across four generations, is one request against the same record. Delivery puts a cap on how much one response can expand. Real pedigrees are patchy, though, with most dogs having only a few known ancestors, so a full certificate uses a small part of that budget.

The old stud dog page’s pedigree for Drakeshead Flycatcher: a three-generation table of hand-typed red capital text, with titles, health results and punctuation typed into each cell by hand.The new stud dog page’s pedigree for the same dog, headed “Four generations”: sire and dam, four grandparents, eight great-grandparents and sixteen great-great-grandparents in columns, each a card read from that dog’s archive record, with sire and dam lines colour-coded.
The same dog’s pedigree: three generations typed into a table, against four read from the archive.

Every name on a pedigree links to that dog’s own record. A dog that appears in forty pedigrees is one entry, not forty copies of its name.

Searching it: streams

The archive page is a stream: a saved query defined in Content, with the filters it accepts declared up front. It draws from the abstract pedigree-dog Contract, so it covers dogs and bitches together, and it declares five filters:

FilterWhat it answers
Full textAny word in the record, from its name down to its health results
ColourA facet, with its count worked out by the server
SexA filter on the Contract, since that is what sex is here
SireEvery dog this dog fathered, in one query
DamEvery dog this bitch mothered, in one query

One stream query: the matches, the sex counts beside them, and each record’s parents as links.

The last two matter most. They answer "who did this dog produce?" by looking at the parent references directly, instead of walking the family tree backwards. That is the direction this archive is rich in: five records in six are somebody’s parent.

The sex filter is worth a second look. Because sex is the Contract here, it is a filter that narrows the stream by Contract. So choosing "bitches" keeps every other filter working, the colour facet included, and one query still answers "how many of each".

Before and after

BeforeAfter
Pedigree data3,376 rows in two unconnected systems3,367 dogs in one archive
Stud page pedigreesThree generations, typed by handFour generations, read from the archive
Who enters a litterThe kennel, after a phone callThe breeder, reviewed by the kennel
"A sire must be male"Enforced by a dropdownEnforced by the Contract
Listing and delisting a litterEditing the pagePublishing and unpublishing it

If your site looks like this

Most small organizations have a database like this one, kept in an admin area, holding the data that actually matters to them. If yours does, three things from this move are worth taking with you.

Write down the rule your data already follows. It is cheap to enforce a rule that has always held, and what it gets you is certainty.

Leave loose what is not ready to be tight. A field you constrain too early loses information permanently, and a free-text field can always be tightened later.

Let strangers contribute to a queue, not to the site. A proposal gives people with no account a real way in, and leaves the decision to publish with somebody who is accountable for it.