[plug] Data Abstraction

Onno Benschop onno at itmaze.com.au
Wed Dec 17 14:35:43 WST 2003


Hi all,

As there are a few programmers on this list, I thought I'd ask about a
problem I've been attempting to tackle for the past 12 hours.

I have items, descriptors and blobs.

An item contains one or more descriptors.
A descriptor refers to one blob.
A blob may be referred to by one or more descriptors.

I'm trying to write portable code that can deal with this.

To make things more interesting, some of the data in a descriptor,
namely the name of the blob, is used in the item.

This data construct is used to save a javascript roll-over image map.
Thus, the HTML is stored in the item, the name of the images in the
descriptors and the actual images as blobs.

If you're still here, now for the problem...

When I create a map, I don't know yet if the blobs can be stored, nor do
I know what name they'll get until I store them. Thus I cannot generate
the HTML for the roll-over until I've stored the blob.

I don't want to store the blob directly, I need to do it via the
descriptors, because they contain the actual information about each blob
and their relationship to the item.

I'm using PHP, and I know I can do this with classes and methods, but
I'm a procedural programmer and unless someone explains how easy it is,
I'll stick with what I know - for the moment.

Apart from naming (I'm not particularly happy with the term descriptor),
can anyone make some statements to help me think outside the box.

Normally I'd go into the tea-room and hang around for an hour asking all
manner of visitors, but being on my own in Kangaroo Valley sort of
precludes that :-)

Any comments?


Onno Benschop 

Connected via Optus B3 at S34°43'17" - E150°34'56" (Kangaroo Valley, NSW)
-- 
()/)/)()        ..ASCII for Onno.. 
|>>?            ..EBCDIC for Onno.. 
--- -. -. ---   ..Morse for Onno.. 

Proudly supported by Skipper Trucks, Highway1, Concept AV, Sony Central, Dalcon
ITmaze - ABN: 56 178 057 063 - ph: 04 1219 8888 - onno at itmaze dot com dot au




More information about the plug mailing list