On Thursday 26 June 2003 17:39, Sam Varshavchik wrote:
> Jesse Guardiani writes:
> > What are your thoughts on me expanding those tags to full
> > variable names for readability purposes?
>
> I don't think so.  Investing time into this excersize will not yield any
> visible benefits.


That depends. I've actually been thinking about making a lot of
changes to the general way we parse templates. Changing all
tags from one character tags to multicharacter tags will allow
the tags to be self commenting and page specific. Bare with me
here. It's hard to put all of this into words.

Currently, we have a LOT of HTML code embedded in the C source.
This is a template designer's nightmare. Certain simple changes require
a patch to the C source to work. It's 'Not a Good Thing'.

What I'd really like to do is move towards a system where all page
specific code is handled at the very top of the page, possibly by inserting
a tag similar(but unique for each page) to this:

[#init_page_x#]

Whatever code is called from the 'init_page_x' tag would then do all
initial processing required to build all appropriate display stuff (like
generate the list of emails for the folder.html page, sync the cache,
etc) and store the results in some sort of data structure. init_page_x
would NOT execute any printf statements.

Then, as do_output_form_loop() works it's way down the page it will
encounter tags like this:

[#display_email_table#]

[#display_Next_Page_icon#]

etc...

Each of the 'display_...' tags would translate to a simple function in
do_output_form_loop() that would simply print the necessary data
stored in the data structure created by 'init_page_x'.

This way the template designers gain maximum flexibility (because
we can break each display element into it's own display_ tag rather
than lumping multiple display items together in one tag), and adding
new functionality will likely become a bit easier on the programmer
because processing will occur in a standardized, per-page manner.

We would also achieve a better separation of code and content.

Does that make sense? Let me know if I need to clarify anything.


-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net



Reply via email to