Code Samples

Domain Specific Language ('Sharefyre')
I was recently given permission to make a project I've been working on open source under the GPL license.

The goal of this project was to convert EmeraldCoast.com from PHP into an XML based language specific to the site to make it easier for non-developers to make changes, so that a common object on the site could easily be reused.

For example, rather than needing all of the code typically required for a tabbed box, javascript, html etc. Someone could put in this and have a tab box with two tabs, plus the content, including all of the Javascript needed to generate the box.

To do this, output buffering was turned on in a file prepended using an .htaccess. Another file was appended that would capture the output.

The file that captured the output would send the entirety of the HTML/XML to a class that would go through and find each occurence of a module. It worked as a communicator class, sending the proper nodes to handlers of each module, which would themselves spit out what should replace the XML, repeating as necessary until all modules had been taken care of. To find the modules, I created 2 other classes to parse the XML, one encompassed the whole document, and another was used for singular nodes. The functionality of them was based off of Javascript, so that someone creating new modules would be hopefully familiar with the syntax.

Sample Syntax:

Emerald CMS
This, an earlier project than the one above, although related, was a project to build a CMS to be used regionwide. It was built on top of Mozilla's XUL-Runner, using XUL and Javascript.

The project called for a way to pull from every one of Florida Freedom's Newspapers article databases, and display them in an editable and transferrable format, so that if one paper wanted to transfer over an article (or a category) from another paper, they could do so quickly and easily.

Another goal of the project was to standardize the way articles were put online and formatted throughout the region. My role was building something similar to phpMyAdmin in XUL and building an XUL WYSIWYG editor. An early version of the WYSIWYG editor can be seen here

Unfortunately, this project was never finished. Our corporate headquarters ended up releasing their own CMS which was implemented nationwide, taking away the need for this program.

Categories

© Matthew Minix 2008