PHP Classes

How to Implement a PHP Template Engine that Can Work with JavaScript and Python - Grammar Template package blog

Recommend this page to a friend!
  All package blogs All package blogs   Grammar Template Grammar Template   Blog Grammar Template package blog   RSS 1.0 feed RSS 2.0 feed   Blog How to Implement a PH...  
  Post a comment Post a comment   See comments See comments (1)   Trackbacks (0)  

Author:

Package: Grammar Template

Template engines are very useful to separate programming logic from presentation logic.

Some applications may need to generate the same presentation from templates either on the server side with a language like PHP, or with on the browser side language like JavaScript.

The package implements a template engine that works in multiple languages including PHP and JavaScript.

This way developers can use this package PHP and JavaScript versions to render the same site presentation using the same template files.




Loaded Article

About the Grammar Template Package

The package Grammar Template is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Template engine in PHP and other languages

Here follows in more detail what it does:

This package implements a template engine that can work in PHP and in other languages.

It can parse a given template string that can be processed by the engine to expand to the processed output.

The engine can take parameters that define regular variables or array of variables to replace in the template placeholders, optional blocks, and nested blocks.

The package provides an implementation of the same template engine in PHP, Python and JavaScript that can work with regular browser side JavaScript code, or Node.js or XPCOM Javascript.

Conclusion

The Grammar Template can be downloaded from download page or be installed using the PHP Composer tool following instructions in the Composer install instructions page.

This package was considered notable for implementing its benefits in a way that is worth noticing.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package as well nice prizes.

One nice prize that many PHP developers want and you may like is the PHP elePHPant mascot plush.




You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

1. The grammar makes the difference - Nikos M. (2020-10-19 08:13)
The grammar makes the difference... - 0 replies
Read the whole comment and replies



  Post a comment Post a comment   See comments See comments (1)   Trackbacks (0)  
  All package blogs All package blogs   Grammar Template Grammar Template   Blog Grammar Template package blog   RSS 1.0 feed RSS 2.0 feed   Blog How to Implement a PH...