Welcome Guest, Not a member yet? Register   Sign In
template engine?
#10

I am not a designer, but I got to hate writing PHP-views. :-) Although PHP is thought as a template language, as such it is a failure, I think.

Here is what I can say:

1. A specialized template language is needed, nevertheless how designers feel comfortable with PHP. Even, it could be partially portable outside PHP-systems.

2. CodeIgniter's policy about escaping has changed, escaping should be at output. A template engine with enabled by default HTML-escaping would give comfort in this situation. Otherwise it is not certain how carefully view's PHP code would be written. Built-in escaping for other contexts as HTML-attributes, JavaScript, etc. could be handy too.

3. A sophisticated template engine adds more value to programming than just arrangement relationships between programmers and designers. Seek for block-support, blocks could be defined in an abstract way and placed and moved wherever you like in your master template, a concrete controller can fill them with the concrete information.

A good template engine will allow you to clear your controllers from any visual design aspects - this is not achieved by me yet, due to maintaining BC, but it is achievable.

4. The CI3 built-in parser is quite minimalistic, it does not add significant value in comparison with the pure PHP-views. Better don't waste your time with it. Carefully pick up a third-party template engine and integrate it within your application.
Reply


Messages In This Thread
template engine? - by winers1290 - 05-25-2016, 06:33 PM
RE: template engine? - by skunkbad - 05-25-2016, 06:54 PM
RE: template engine? - by winers1290 - 05-26-2016, 02:58 PM
RE: template engine? - by InsiteFX - 05-27-2016, 03:31 AM
RE: template engine? - by winers1290 - 05-28-2016, 03:07 AM
RE: template engine? - by cartalot - 05-27-2016, 12:55 PM
RE: template engine? - by Paradinight - 05-28-2016, 08:22 AM
RE: template engine? - by cartalot - 05-28-2016, 12:21 PM
RE: template engine? - by marksman - 06-14-2016, 08:06 AM
RE: template engine? - by ivantcholakov - 06-14-2016, 10:37 AM
RE: template engine? - by PaulD - 06-14-2016, 12:37 PM
RE: template engine? - by ivantcholakov - 06-15-2016, 04:17 AM
RE: template engine? - by spjonez - 06-15-2016, 05:31 AM
RE: template engine? - by prezire - 06-15-2016, 05:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB