Welcome Guest, Not a member yet? Register   Sign In
Better Template Engine
#7

Some of "us" are cowboys, working on our own, and pure PHP might be preferable.

Others of us, however, work in multi-disciplinary teams, where "we" do the coding; a graphic designer does images, styling and layout; and a "web developer" does the HTML and Javascript. In such an environment, having something like
<p>Hello {firstname}! Thank you for your purchase of {quantity} tickets for {event}</p>
is preferable to non-programmers than something like
<p>Hello <?php echo $firstname ?>! Thank you for your purchase of <?php echo $order->total_quantity($ticket_number) ?> tickets for <?php echo $event?></p>

Everyone has different needs, and there is no single solution for all.

FWIW, one of my "golden rules" is "no PHP in a view" ... I feel it results in a better "separation of concern", which is one of the reasons to use an MVC design pattern.
Reply


Messages In This Thread
Better Template Engine - by Tux - 03-03-2015, 12:48 AM
RE: Better Template Engine - by tapan.thapa - 03-03-2015, 12:58 AM
RE: Better Template Engine - by tapan.thapa - 03-03-2015, 01:09 AM
RE: Better Template Engine - by spjonez - 03-03-2015, 08:14 PM
RE: Better Template Engine - by sv3tli0 - 03-04-2015, 02:46 AM
RE: Better Template Engine - by Maximw - 03-04-2015, 04:38 PM
RE: Better Template Engine - by ciadmin - 03-04-2015, 05:26 PM
RE: Better Template Engine - by mwhitney - 03-05-2015, 10:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB