BeerDB

This project is very new and in very early development. This site is currently a placeholder for useful information and an anchor for any discussion about the project while it materializes. Direct questions and comments to < jcole at thend dot org >

Discussion

There are lots of recipe databases, but no ingredient databases (known to me).

The basic goal of this project is to be a repository of beer brewing ingredients. We're talking generally about fermentables, hops, water and yeast. The idea grew out of a discussion on the homebrew talk forum (see links below). In the end, we hope to have an appliation where users can search and select ingredients in a "shopping cart" style interface. During the "checkout" process, the user can select their brewing software, and the app will spit out BeerXML or whatever format the user's software needs. At some point, user submissions for ingredients will grow the database. Imagine everybody submitting their water profiles. Could be cool!

I'm starting to settle on a split model with a backend that's generic enough to be used by any application directly (think about browsing and importing ingredients directly in your brewing software). The current implementaiton is built this way and the web client uses the same backend that any other software would.

Updates

20100412: Need to pick this up again. Update is because a spammer offered to backorder beerdb.net for me. I paid GoDaddy $19 to do it instead. Thanks spammer!

20091228: Decided to put the whole app on one page. Got some stylistic stuff to deal with, but the functionality is really coming together. Quick todo:

20091223: Basic searching is working! The search result display is created by taking the generic XML output from the database and applying XSL. This is a nice proof of concept. I've also got 90% of the XSL written for outputting to BrewTarget. I shopped around (heh) for shopping cart software, and I didn't find anything that looked cleanly adaptable to this project, so I think I'm going to end up doing it from scratch. I've got some neat ideas for it though... I'm really starting to get comfortable with AJAX. Probably no more work until after Christmas.

20091222: Finally getting back to this. After playing a bit with w3cschool's XSLT Tryit Editor, it seems fairly straightforward to take MySQL's extremely generic XML output and translate it to the appropriate BeerXML variant. XSLT snippet that does exactly that:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
  <h2>My CD Collection</h2>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th>ID</th>
        <th>IP</th>
        <th>Port</th>
        <th>Description</th>
      </tr>
      <xsl:for-each select="resultset/row">
      <tr>
        <td><xsl:value-of select="field[@name='ont_id']"/></td>
        <td><xsl:value-of select="field[@name='ip']"/></td>
        <td><xsl:value-of select="field[@name='port']"/></td>
        <td><xsl:value-of select="field[@name='description']"/></td>
      </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

Example only... this is translating to XHTML and the source document had nothing to do with beer, it was just a handy database.

The "shopping cart" style frontend can even use it's own transforms. When the user "checks out", the XSL for their software will be applied to the output.

Next goal is to import the current databases I have available into MySQL. In order to implement the "shopping cart", all objects will need unique IDs. The BeerXML spec is missing this entirely, but the output transforms will strip them. I think I'm going to add an 'origin' field as well to distinguish sources.

Future next steps will be to design a transform for BrewTarget and start hacking on the web UI.

On a personal note, hacking XML is turing out to be kinda fun!

Links

BeerDB Stuff

Discussion

BeerXML Stuff

Brewing Software