Previous Thread
Next Thread
Print Thread
Rate Thread
Sally #204843 07/08/2000 12:14 AM
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
I've been using templates in various programs for well over a year, and I'm glad to see that this is happening here. This program was a real bear to modify, and each release rquired the same mods over and over. Templates are a way of keeping the look/feel of a site but still upgrading the back end code.

One thought.

Many of the templates are very short, but they still require an I/O operation.

What about creating a "template file" for most of the short code.

This would create one I/O operation per script run, at the expense of a little memory. Most of the templates are showing up as 1K, which means you could probably realize a significant advantage by creating a HASH of template entries, then defining each entry inside a single TEMPLATES.TPL file.

While there is some thought to keeping each template in a single file, so one edit won't screw up all the other templates, there is also a significant advantage to having one file, with all the various templates defined, then each variable fleshed out.

For ultimate compatibility, if a HASH entry is NULL, then the program would look for the file on disk.

This would work for user-defined profiles as well, since which TEMPLATES.TPL file is opened could be defined by the user profile.

This would also allow one more level of abstraction. Lets say you are developing a community site. If the template parser _only_ recognized a certain set of tags and HTML commands, then a user could create their own "configuration file" and change the look of the program to suit their own tastes or needs.

Templates are an exciting programming tool, and once you start to play with them, you start to wonder how you did with out them :)

Because the TEMPLATE.TPL file would essentially be a very large "static" or "constant" definition file, it could probably be set up as a '.pm' file, and pre-loaded into apache/mod_perl so there would only be ONE instance of the program code, and no I/O operation except on start up.

The mind keeps wandering... doesn't it??



Sponsored Links
Entire Thread
Subject Posted By Posted
Template Experiment Rick 06/08/2000 10:23 PM
Re: Template Experiment The Team 06/09/2000 5:31 AM
Re: Template Experiment Muhammad 06/09/2000 3:18 PM
Re: Template Experiment Rick 06/09/2000 3:25 PM
Re: Template Experiment Rick 06/09/2000 3:26 PM
Re: Template Experiment The Team 06/09/2000 3:44 PM
Re: Template Experiment Rick 06/09/2000 3:53 PM
Re: Template Experiment Muhammad 06/09/2000 5:43 PM
Re: Template Experiment Eileen 06/09/2000 6:52 PM
Re: Template Experiment seb_ncuk 06/11/2000 4:10 AM
Re: Template Experiment a33 06/11/2000 7:16 AM
Re: Template Experiment seb_ncuk 06/11/2000 7:36 AM
Re: Template Experiment Rick 06/11/2000 4:55 PM
Re: Template Experiment Rick 06/11/2000 5:00 PM
Re: Template Experiment seb_ncuk 06/11/2000 5:01 PM
Re: Template Experiment Rick 06/11/2000 5:16 PM
Re: Template Experiment seb_ncuk 06/11/2000 5:36 PM
Re: Template Experiment The Team 06/11/2000 5:53 PM
Re: Template Experiment a33 06/12/2000 3:18 AM
Re: Template Experiment Eileen 06/18/2000 12:25 AM
Re: Template Experiment Sharif 06/18/2000 2:33 PM
Re: Template Experiment Rick 06/19/2000 3:09 PM
Re: Template Experiment Rick 06/20/2000 4:39 PM
Re: Template Experiment Sharif 06/21/2000 11:45 PM
Re: Template Experiment The Team 06/22/2000 4:50 PM
Re: Template Experiment Rick 06/26/2000 8:42 PM
Re: Template Experiment Eileen 06/27/2000 2:44 AM
Re: Template Experiment Sharif 06/27/2000 1:05 PM
Re: Template Experiment The Team 06/30/2000 12:36 AM
Re: Template Experiment Gerrit 06/30/2000 10:03 AM
Re: Template Experiment Rick 06/30/2000 2:40 PM
Re: Template Experiment Rick 06/30/2000 2:43 PM
Re: Template Experiment The Team 07/08/2000 7:14 AM
Local install? Eileen 07/14/2000 8:10 PM
Re: Local install? Rick 07/14/2000 8:41 PM
Re: Local install? Eileen 07/15/2000 12:24 AM
Re: Local install? Eileen 07/15/2000 2:42 AM
Re: Template Experiment Eileen 07/19/2000 6:55 PM
Re: Template Experiment The Team 07/20/2000 4:01 PM
Re: Template Experiment Rick 07/20/2000 4:58 PM
Re: Template Experiment Eileen 07/20/2000 5:56 PM
Re: Template Experiment Rick 07/20/2000 6:23 PM
Re: Template Experiment Eileen 07/20/2000 6:43 PM
Re: Template Experiment Rick 07/20/2000 6:48 PM
Re: Template Experiment Eileen 07/20/2000 7:03 PM
Re: Template Experiment The Team 07/21/2000 6:22 AM
Re: Template Experiment Eileen 07/21/2000 8:23 AM
Re: Template Experiment Rick 07/21/2000 3:19 PM
Re: Template Experiment The Team 07/23/2000 5:44 PM
Re: Template Experiment Eileen 07/23/2000 6:32 PM
Re: Template Experiment The Team 07/23/2000 7:00 PM
Re: Template Experiment Eileen 07/23/2000 8:37 PM
Re: Template Experiment The Team 07/24/2000 3:36 AM
Re: Template Experiment Rick 07/24/2000 6:53 PM
Re: Template Experiment Rick 07/26/2000 4:12 PM
Re: Template Experiment The Team 07/27/2000 5:55 PM
Re: Template Experiment Eileen 07/27/2000 6:22 PM
Re: Template Experiment Rick 07/27/2000 7:03 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)