How the mungenetengine works


The database

There are three basic tables in the MySQL database. One contains content, and referenced by mcid. The second contains any binary content (images, PDFs) and is referenced by an miid The final contains sections referenced by msid, which are a mechanism for organising and classifying content and images.

Around these three tables live some utility tables that contain basic logging information (a simple page count per fragment) and caching. Each page, when first rendered, is cached to a separate table. This enables faster response on the second and subsequent hits. To ensure that only current pages are cached, there is a simple cachetree implemented such that when a change or deletion to a record is made, the cache is pruned. (the page cache is presently disabled)

These sections provide the underlying hierachical structure of the site. This structure is tightly bound to the navigation through the site. As this is in the database, it is very easy to change the underlying navigation structure without changing how individual pieces of content are referenced. Usually, the structure is defined as a folder hierachy on the server. As soon as you start moving the folders around, the references from one piece of content to another breaks – forcing a mass update of the site. External search engines that may have the links stored in their database get 404 style errors. In the mungenetengine, each content, image and section is referenced individually without relationship to its place in the navigation structure.

Each fragment of content or image belongs to a section. These sections are the hierarchy behind the site – so each section can belong to another section, and a particular section can have multiple child-sections. A section can only have one parent. As you move to another section or page within another section, the mungenetengine (renamed to mne.php) can generate a navigation fragment; which is a template driven hierarchy containing links to the parent section, sibling content pages or sections, and any children.

In fact, each content entry is just a fragment of html. A whole page may actually comprise of other referenced contents elements, each inserted into the final html that you seen in the browser. The process of building one page from another is a process called templating. Its not as simple as one page referencing another; this process is recursive – one page refers to another until the final page is built. The concept here is to only enter data only once into the database. Each content can insert other fragments (or images) into the html output.

There are different types of content fragments. For instance, one is an external link – these contents are resolved, and wrapped into an HREF style link.

Images are in fact binary objects. They are wrapped into the final html – except they refer back to the mungenetengine – which grabs the images out of the database and serves them up. html fragments that are generated automatically add the width/height, alts and hrefs normally associated with images – if they are in the database. PDFs and other non-image content can be linked to so the user can download them, or embedded into the HTML fragment.

SWF and SVG can also be stored in the database. When rendering out these elements, the engine generates object embed tags. The width and height are not read from either format as yet. Whilst it is possible to read the ‘twips’ from a SWF, it seems overly complex to do – just yet

The engine can also generate what are known as breadcrumbs (next and previous links) — this is easy as the structure and relationship between objects are known and map to the navigation

PHP, the server side scripting language, munges the data together from the MySQL database and serves it up. As at early February 2003 this code is about 1870 lines long. I am testing this on WindowsXP and transferring it here to a Linux box for production. I really only have a choice of three server side scripting systems (PHP, Perl or Python). Learning PHP has been a great experience.

The next stage is to transfer the experience here into using a better language that has more object orientation. I have chosen Python as the langauge to accomplish this task. How long this takes, only time will tell!

Pilgrimages to New Zealand

[942] Nick at the info booth at Kare Kare.
Nick at the info booth at Kare Kare.

[943] Kare Kare - North Bluff and stream
Kare Kare – North Bluff and stream

[944] Kare Kare - North Bluff
Kare Kare – North Bluff

[945] Kare Kare - the hills behind
Kare Kare – the hills behind

[946] Southern Bluff, Kare Kare, NZ
Southern Bluff, Kare Kare, NZ

[947] Nick in front of city centre map, Te Awamutu, New Zealand.  Just to prove I've been there!
Nick in front of city centre map, Te Awamutu, New Zealand. Just to prove I’ve been there!

[948] Rose gardens, Te Awamutu, New Zealand
Rose gardens, Te Awamutu, New Zealand

[949] Rose gardens, Te Awamutu, New Zealand
Rose gardens, Te Awamutu, New Zealand

[950] Rose Gardens, Te Awamutu, NZ
Rose Gardens, Te Awamutu, NZ

[953] Photo of a painting by Phil Judd. A portion of this was on the Split Enz 'Mental Notes' album. Displayed in Te Papa Museum, Wellington, NZ. November 1998.
Photo of a painting by Phil Judd. A portion of this was on the Split Enz ‘Mental Notes’ album. Displayed in Te Papa Museum, Wellington, NZ. November 1998.

[954] Sorry about the out-of-focus. Split Enz costumes displayed in Te Papa Museum, Wellington, NZ. November 1998.
Sorry about the out-of-focus. Split Enz costumes displayed in Te Papa Museum, Wellington, NZ. November 1998.

[1020] North Bluff, Kare Kare, NZ. May 2000.  I love this image.
North Bluff, Kare Kare, NZ. May 2000. I love this image.

[1021] Southern Hills, Kare Kare, NZ. May 2000
Southern Hills, Kare Kare, NZ. May 2000

[1022] Kare Kare, NZ. May 2000
Kare Kare, NZ. May 2000

[1023] kare-kare-hills.jpg

[1024] Looking at Kare Kare from the Southern exit road.  Has to be the best photo I have ever taken. May 2000.
Looking at Kare Kare from the Southern exit road. Has to be the best photo I have ever taken. May 2000.

[1025] Beach, Kare Kare NZ. Looking South-South West. May 2000
Beach, Kare Kare NZ. Looking South-South West. May 2000

[1026] Nick on jetty, Bay of Islands, May 2000.
Nick on jetty, Bay of Islands, May 2000.

[1047] Piha, NZ.  Looking toward south beach.
Piha, NZ. Looking toward south beach.

[1048] Piha, NZ. North beach.  Used on Mungenet. May 2000
Piha, NZ. North beach. Used on Mungenet. May 2000

[1050] Lion rock, mid-Piha, NZ. May 2000
Lion rock, mid-Piha, NZ. May 2000

[1062] Nick at Kare Kare, NZ, May 2000. Photo taken by Victor Guerrero
Nick at Kare Kare, NZ, May 2000. Photo taken by Victor Guerrero

[2030] Piha, Panorama; 10th March 2005

Presentations

PacPrint 2001: Acrobat in a PDF Workflow
Presentation given at PacPrint 2001

AODC March 2001: Acrobat Future Directions
Presented at the AODC conference, Canberra, early 2001.

Acrobat 5.0 Launch: Business Indepth Presentation
From the SEAsia Roadshow, April 2001. Looking at Acrobat indepth for business use.

Acrobat 5.0 Launch: Business Introduction Presenta
From the SEAsia Roadshow, April 2001. An introduction to Acrobat for business use.

Acrobat 5.0 Launch: Prepress Indepth
From the SEAsia Roadshow, April 2001. Looking at Acrobat indepth for prepress use.

Acrobat 5.0 Launch: Prepress Intro
From the SEAsia Roadshow, April 2001. An introduction to Acrobat for prepress use.

PacPrint 2001: Acrobat 5.0
The presentation I gave on the Adobe stand at PacPrint, Melbourne May 2001.

PDF Intensive
PDF Intensive

Openpublish: SVG Tutorial
Presentation used in the half day SVG tutorial given at OpenPublish, July 2001 in Sydney.

XML Asia Pacific 2001: SVG Presentation
SVG Presentation given at XML Asia Pacific, Sydney, November 2001.

Adobe, eBooks & DRM
Quick presentation slides given 15/5/2002 in Sydney. The talk was better than the slides.

gasaa prepress july 2002.pdf

Scripting+XML=Productivity

GASAA PDF for Print, Oct Nov 2002 Jan 2003
Presentation for the October/November 2002 & January 2003 PDF for Print workshop

Plenty O Acronyms, Open Publish 2003

Premiere 6.x, Premiere Pro

Adobe Premiere Pro

Better Titles with Premiere
Nick Hodge
How to create Titles in Premiere 6.0

Faster Editing with Premiere
Nick Hodge
How to tune up your productivity in Premiere

Picture-in-Picture
Nick Hodge
How to create a picture in a picture (or overlay video) with Premiere 6.0

Premiere, PowerPoint and Piha
Nick Hodge
Using Premiere to make video for Powerpoint

Reversing Footage in Premiere 6.0
Nick Hodge
How to reverse a clip in Premiere 6.0

Stop-motion Frames
Nick Hodge
How to create stop-motion (aka strobing) frames with Premiere 6.0

Using Effects in Premiere
Nick Hodge
How to use Video Effects in Premiere 6.0

Video to the Web
Nick Hodge
Slides and web URLs from the February 2001 Premiere 6.0 Roadshow

Adobe PDF & Acrobat

3DAP (PDF Guidelines for Magazine Advertising Delivery)

Acrobat 5.0 Javascript Training Modules
Adobe Systems
Learn how to write Javascript for Adobe Acrobat 5.0

Acrobat Reader 5.1 (Windows and Mac)

Latest version of the Reader for all platforms.

Adobe Acrobat Reader and Forms Data without Custom CGI
Nick Hodge
How to use the common CGI, Formmail, and Acrobat Forms

Configuring Byte Serving on Web Servers
Adobe Systems
an oft-requested piece of technical info. Here is the obscure file on the Adobe web site!

GASAA: Graphics Arts PDF Usage Survey, 2002

Learning Centre: Introduction to Acrobat JavaScript

PlanetPDF Description on ADBC in Adobe PDF Forms

MacOS Acrobat 5.0.5 Updater

Updater from Acrobat 5.0 MacOS to 5.0.5 MacOS. Size 14.7Mb. Posted 20-Dec-2001

Making Compact PDFs Using Acrobat Distiller
Nick Hodge
How to create small Adobe PDFs for web delivery

MediaBox, BleedBox and TrimBox info in Adobe Acrobat 6
Cari Jansen
When creating PDFs that are PDF/X compliant it is a requirement that the MediaBox, TrimBox and BleedBox are properly defined in the PDF. Acrobat 6’s Crop command is a handy tool to reference the various box sizes.

PANPASpecs (PDF Guidelines for Newspaper Advertising Delivery)

PDF Forms and Javascript
Nick Hodge
How to create forms in Acrobat, and save the data to a web server or database.

PDFExperts on Microsoft Publisher/PDF Workflows

PDFExperts detail how to get CMYK from an RGB Publishing application via PDF

PDFs for Onscreen Presentations
Nick Hodge
Short synopsis of creating PDFs for on screen presentations

PlanetPDF on ADBC in Adobe PDF Forms

PlanetPDF Description on ADBC in Adobe PDF Forms

QuarkXpress, PDF, Trapping and Overprint
Nick Hodge
Quark doesn’t produce good composite Postscript for the Distiller – and this can impact overprint preview in Acrobat 5.0

Using Adobe PDF for Prepress

Links and Tools for Acrobat in a Prepress environment

Windows Acrobat 5.0.5 Updater

Updater from Acrobat 5.0 MacOS to 5.0.5 MacOS. Size 8.9Mb. Posted 5-Dec-2001

Of Historical Interest Only…

GoLive 5.0

Photoshop Image Farming
Nick Hodge
How to create a rendition of a Photoshop file once

Livemotion 1.0

Creating Animations
Nick Hodge

Export Settings

Animation

Adding Behaviours

Wiring Rollovers

Photoshop 6.0

Imageready Rollovers

Creating Rollovers in ImageReady 3.0

Weighted Optimisation
Nick Hodge
How to use Weighted Optimisation of JPEGs and GIFs in Photoshop 6.0

Fairfax: Apple Technologies Used

Golden Master

Switch Canary

The Fairfax Experience