OpenSource For You - - HOW TO -

One of the im­por­tant con­cepts of the tem­plate en­gine is pre­com­pi­la­tion. Ba­si­cally, all tem­plate en­gines use some regular ex­pres­sions to re­place the tags with data. Since regular ex­pres­sions are very costly in terms of pro­cess­ing, the tem­plates are con­verted to func­tions and th­ese func­tions can be used many times with less pro­cess­ing power. This is called pre­com­pi­la­tion.

We can see this pre­com­piled tem­plate (func­tion) by us­ing Fire­bug (see Fig­ure 4).

The fol­low­ing func­tion is cre­ated by us­ing Un­der­score for the tem­plate ‘Hello MBA stu­dents’.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.