ispCP - Board - Support
Convert pTemplates into Smarty Templates - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: Convert pTemplates into Smarty Templates (/thread-11726.html)

Pages: 1 2 3 4 5


RE: Convert pTemplates into Smarty Templates - Obi_Wan - 11-03-2010 09:31 PM

Many people also criticise the performance Smarty gives you however I think since Smarty 3 the performance has improved very much.


RE: Convert pTemplates into Smarty Templates - kassah - 11-04-2010 12:42 AM

Never had a performance problem with Smarty, thankfully. I'm a big fan of <?= $var ?>, of course you probobly should be doing <?= htmlentities($var) ?>, also the addition to PHP of <? if (1==1): ?>Stuff<? endif; ?> has greatly simplified.

The trick with any language is to reduce complexity, and yes, keeping business logic and view logic separate can be a challenge regardless. I've found while trying to make a theme with pTemplate, is that so much view logic is coded into the core because pTemplate isn't able to handle it.

Either way, Smarty conversion is already done! Props to the people who did that. It's a major step forward from pTemplate =).


RE: Convert pTemplates into Smarty Templates - Obi_Wan - 11-04-2010 12:53 AM

(11-04-2010 12:42 AM)kassah Wrote:  Never had a performance problem with Smarty, thankfully. I'm a big fan of <?= $var ?>, of course you probobly should be doing <?= htmlentities($var) ?>, also the addition to PHP of <? if (1==1): ?>Stuff<? endif; ?> has greatly simplified.

It is probably just a question of philosophy or PHP religion. Everybody believes in something else Smile


RE: Convert pTemplates into Smarty Templates - kassah - 11-04-2010 01:02 AM

Bingo!
Unless you're at work... in which case it's whatever your boss tells you is best (assuming he cares).


RE: Convert pTemplates into Smarty Templates - zpin - 11-04-2010 07:28 AM

(11-04-2010 12:42 AM)kassah Wrote:  Never had a performance problem with Smarty, thankfully. I'm a big fan of <?= $var ?>, of course you probobly should be doing <?= htmlentities($var) ?>, also the addition to PHP of <? if (1==1): ?>Stuff<? endif; ?> has greatly simplified.

Unfortunately "<?" and "<?=" can't be used because they are deprecated now so the shortest form is "<? echo".

(11-04-2010 12:42 AM)kassah Wrote:  Either way, Smarty conversion is already done! Props to the people who did that. It's a major step forward from pTemplate =).
Thx Smile It was high time for this change. I can not imagine changing the theme with the current templates.


RE: Convert pTemplates into Smarty Templates - kassah - 11-04-2010 09:24 AM

Actually, that's a rumor that has been persisted that the PHP devs have been trying to kill for some time. The most recent messages on the dev list that I could find, which is where everyone else seems to be getting their news of depreciation (see ref).

Keep in mind PHP6 is far from final spec wise, they haven't even had an alpha yet. And their are ton of business guys upstairs at Zend that have deals with the like of IBM that are not about to let <?= go away. Cool

Ref: 2010-03-11 - Re: [PHP-DEV] PHP6: status of short_open_tag and asp_tags


RE: Convert pTemplates into Smarty Templates - zpin - 11-04-2010 10:01 AM

Heh, it seems you're right. Works for me Smile

Another one: Re: [PHP-DEV] Throwing an E_DEPRECATED for short_open_tag


RE: Convert pTemplates into Smarty Templates - Obi_Wan - 11-04-2010 03:16 PM

Who knows if PHP 6 will actually come in our lifetime.