Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

What do the compiled templates do?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
ThermoDust
Smarty Regular


Joined: 10 Sep 2003
Posts: 38

PostPosted: Thu Nov 06, 2003 6:59 am    Post subject: What do the compiled templates do? Reply with quote

What do the compiled templates do? Like, are the important or what?
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Nov 06, 2003 7:46 am    Post subject: Reply with quote

Hi ThermoDust.

Most template systems operate at runtime--when a template is requested, it is read at the time of the request and the required replacements are searched for, calculated and performed. All consequent requests for the template generate the same overhead.

In contrast, Smarty treats the template as a source file written using Smarty's syntax. When a template is requested, Smarty reads the template and creates a new PHP script--the compiled template--which directly performs all of the replacements (and actions) required by the source template file. The newly created compiled php script is then used to satisfy the template request--Smarty simply includes (runs) it. The small compilation overhead is overshadowed by the fact that all future requests for the template are directly served by the already compiled PHP script. By default, Smarty detects template changes, automatically recompiling the associated PHP script for you.

IMHO, the compiled templates are a very big part of the 'smarts' of Smarty--one of its defining features and a corner stone of its operation Smile
Back to top
View user's profile Send private message
ThermoDust
Smarty Regular


Joined: 10 Sep 2003
Posts: 38

PostPosted: Thu Nov 06, 2003 8:38 am    Post subject: Reply with quote

In the complied templates, what if like a member section is there. Can people access these compiled templates?
Back to top
View user's profile Send private message
mystrymaster
Smarty Rookie


Joined: 31 Oct 2003
Posts: 17

PostPosted: Thu Nov 06, 2003 12:16 pm    Post subject: Reply with quote

I would imagine they would be able to acceess these but have you seen the structure?

The folder nameing convention is like %%321hg3bknkmllgfd897


or somethign like that

I would give someone credit if they can figure that out for a specific page Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP