• Home
  • Blog
  • Portfolio
  • Links
  • Contact

I Present Purple Fusion!

May 24, 2007

This is the name of the new site backend I've been working on. Now, for anybody who's been paying attention I haven't written a web engine since Tetra 2. The last time I worked on it was sometime back in '05 I believe. Back then I was extremely proud of my little creation but I look back on it and think to myself "that is one bloated piece of crap". It really was. Over 2500 lines of code. In comparison my new engine is only one or two hundred lines of code and almost as powerful (or it will be).

From a design standpoint Purple Fusion is way different from Tetra. Tetra was built around an object-oriented core. From an interface standpoint this was very clean. However, it did lend to some slowdown and made adding new modules cumbersome at best. It also limited what you could do with a module (to a degree). The new engine completely throws objects out the window (almost, the main class is PurpleFusion and that's the only one) and goes for a scriptable approach. Each page is it's own seperate page script that makes calls for getting data, displaying templates, etc. This makes creating new pages incredible quick and eliminates redundant code. Here's the script for the front page:


<page title="Home">
<template:page_head>
<db:entries limit="15" sort="entry_date" order="desc">
<loop:entries>
<dblink:category_name table="categories" link="category_id">
<field:entry_date type="date" format="m-d-Y">
<field:entry_body type="standard">
<process:data>
<template:entry>
<end:loop>
<template:page_foot>
<end:page>


As you can see it borrows from SGML's tag structure. Because of the tag structure it's very human readable and makes for quick prototyping. I'm incredibly pleased with the way it's going right now and hopefully I'll have it running this site in a couple of weeks. Now that I think about it I could even speed things up by generating a cached version of the source code and just include that instead of parsing the page all the time. Yeah, this rocks.

Tags: web programming
0 Comments
 
-10

Post Comment

 

Latest Entries

  • I've been killed!
  • Building a Web-based Media Player - Part 1
  • We bring you... dxprog media!
  • From the Orlando Anime Festival
  • Speed Cubing
  • Awesome Video of Errata
  • Up next on dxprog.com
  • Mograph - now with more 3D
  • Fun with old computers
  • Returning to my Roots

Archives

  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • June 2003
  • May 2003
  • April 2003
 
Copyright © 2005-2008 Matt Hackmann
All Rights Reserved