Notes Information Apocalypse

Entity Relational Diagrams in HTML

This is a prototype of a language modelling tool, created for the purpose of helping designers, information architects, and developers collaborate better. If you want to check it out, and have access to a PHP server and a MySQL database, download the prototype and follow the instructions to set up.

Most people who've seen it so far have asked me "why didn't you just use XML?". The straight answer is that I actually was using XML when I started experimenting with code generation. I had a whole custom model syntax going, which was doing everything that the current prototype does. Eventually I started wondering whether it was possible to replicate the declarative markup using HTML lists, and it didn't take long to get a demonstration up and running from which there was no turning back! It may not be a huge improvement from vanilla XML in terms of semantics, but for me, the advantages of the in-browser interface make HTML vastly more worthwhile, at least in the short term.

The builder will parse a correctly labelled definition list into a data structure which is used to generate a set of MySQL tables. A second pass then queries against each table and uses the reflected field types to generate PHP and HTML code to interact with the database and handle CRUD operations. By splitting the build process into these two separate passes it will be possible in future to decouple the code generation from the actual model definition, meaning that the tool could be used to map to existing databases as well as generate new ones.

This is a tenative first step on the road to developing a web based visual modelling tool - something in between the idea of a language workbench for PHP, and a single page application development environment.