Current time: 11-25-2024, 04:03 PM Hello There, Guest! (LoginRegister)


Post Reply 
Convert pTemplates into Smarty Templates
Author Message
Obi_Wan Offline
Junior Member
*****
Dev Team

Posts: 64
Joined: Sep 2007
Reputation: 0
Post: #41
RE: Convert pTemplates into Smarty Templates
Many people also criticise the performance Smarty gives you however I think since Smarty 3 the performance has improved very much.
11-03-2010 09:31 PM
Find all posts by this user Quote this message in a reply
kassah Offline
Junior Member
*

Posts: 46
Joined: Oct 2010
Reputation: 1
Post: #42
RE: Convert pTemplates into Smarty Templates
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 =).
11-04-2010 12:42 AM
Find all posts by this user Quote this message in a reply
Obi_Wan Offline
Junior Member
*****
Dev Team

Posts: 64
Joined: Sep 2007
Reputation: 0
Post: #43
RE: Convert pTemplates into Smarty Templates
(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
11-04-2010 12:53 AM
Find all posts by this user Quote this message in a reply
kassah Offline
Junior Member
*

Posts: 46
Joined: Oct 2010
Reputation: 1
Post: #44
RE: Convert pTemplates into Smarty Templates
Bingo!
Unless you're at work... in which case it's whatever your boss tells you is best (assuming he cares).
(This post was last modified: 11-04-2010 01:04 AM by kassah.)
11-04-2010 01:02 AM
Find all posts by this user Quote this message in a reply
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #45
RE: Convert pTemplates into Smarty Templates
(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.
(This post was last modified: 11-04-2010 07:28 AM by zpin.)
11-04-2010 07:28 AM
Find all posts by this user Quote this message in a reply
kassah Offline
Junior Member
*

Posts: 46
Joined: Oct 2010
Reputation: 1
Post: #46
RE: Convert pTemplates into Smarty Templates
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
11-04-2010 09:24 AM
Find all posts by this user Quote this message in a reply
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #47
RE: Convert pTemplates into Smarty Templates
Heh, it seems you're right. Works for me Smile

Another one: Re: [PHP-DEV] Throwing an E_DEPRECATED for short_open_tag
11-04-2010 10:01 AM
Find all posts by this user Quote this message in a reply
Obi_Wan Offline
Junior Member
*****
Dev Team

Posts: 64
Joined: Sep 2007
Reputation: 0
Post: #48
RE: Convert pTemplates into Smarty Templates
Who knows if PHP 6 will actually come in our lifetime.
11-04-2010 03:16 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)