Re: How to model searchable properties of an entity

From: Laconic2 <laconic2_at_comcast.net>
Date: Tue, 17 Aug 2004 10:16:10 -0400
Message-ID: <PN2dnbV0d9g1j7_cRVn-rw_at_comcast.com>


"pstnotpd" <schoenmakers_at_tpd.tno.nl> wrote in message news:cft046$627$1_at_voyager.news.surf.net...
> Laconic2 wrote:

> > I'm not sure exactly what you mean by a template. I've used the term
myself
> > in home grown tools I've built to improve my productivity when the
client's
> > clock is running. But you may mean something completely different.
> I do

Let's see if we can sort out what we each mean by "template". There must be some overlap. Neither you nor I came to this term in a vacuum.

When I built a "template processor" for myself, here's what I was faced with:

I wanted a tool that I could use to expand a template into a series of texts, based on a list of "actual values". The template consisted of "fixed text" and "formal parameters" with a way to tell them apart.
The expander would simply read the template once for each entry in the list of actual values. The output of this pass would contain the fixed text, and the actual values from the list entry instead of the formal parameters.

Turned out to be easy to implement in a language that was lass than a true programming language, but available at all the sites I visited.

The process is a little like a mail merge process, although I learned it from people who used it for defining macros in assembly language. The expansion of the macros ended up doing something like what you get out a mail merge, except that it operated on code rather than on a form letter.

Turns out to be spectacularly useful, in the right hands. Since I was building it for myself, I made no attempt to make it "idiot proof". Turns out to be very easy to make data lists from the output of SQL statements, and pretty easy to make templates by abstracting a repetitive process.

Thing is, that in this tool, I freely and knowingly blended data and meta data in ways that, I claim, are not good to do with publicly shared data. However this blending was carefully "encapsulated" inside my tool. By the time the output was deliverable, it was in a form that could easily be explained.

Perhaps you could tell me a little more what you mean by a "template". Received on Tue Aug 17 2004 - 16:16:10 CEST

Original text of this message