template engine thoughts

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
User avatar
bassul
Posts: 11
Joined: Sun Jun 25, 2006 12:39 am
Contact:

Re: template engine thoughts

Post by bassul »

a security hole developers in the code maintained by the 3rd party.. who get the blame?? Who gets the bad press?? I will let you answer...
Well, I have sometimes this problem with girls, what if they say no? What would people say :) ?
Seriously now, the developers can always choose what they want and like to do best. It's a free world, but I think the greater risk is taken by not relying on other people's previous work (these people have already hit their head hard against these problems). What I really hope is that developers just sit, relax and analyze these facts, nothing more. Of course, they could say "no, we do it our own way", and that would be fine, maybe not so great for the phpBB community in the long term, but that's life.

And now let's really discuss the arguments:
phpBB developers have to (re)learn and strip down/personalize Smarty repeatedly to take advantage of the focused development

Good point, however my suggestion to use a "stripped Smarty" was targeting mainly the "bloated code" argument. Let's see where we get.
Stripped smarty:
If 'bloated code' were really a problem, one could remove some of the functionality by simply cutting some of the functions, that's clearly an easier job than maintaining your own template compiler. Smarty had 7 minor releases in 2005/2006. The benefits for phpBB team ? maybe not so great, less work, less headaches. The benefits for the community? The same that adodb lite is bringing to adodb.
Plain smarty:
I do believe that plain usage of Smarty would be OK in the long term. It brings the least headaches and, when phpBB discovers it needs another feature not yet implemented, it'll probably be there. (I have to observe here that conditionals were introduced in Olympus and the need for other such extensions might just come to surface, probably in the same way as these needs came to surface to the smarty guys).
Cheers,
Tudor

User avatar
bassul
Posts: 11
Joined: Sun Jun 25, 2006 12:39 am
Contact:

Re: template engine thoughts

Post by bassul »

Oh and for the community, using plain Smarty into phpBB would actually strengthen Smarty and the other way around, because phpBB is widely deployed and attacked.
I think for disadvantages we can keep:
  • mainly the bigger codebase (not really a problem with an optimizer, which bigger sites use anyway), and
  • the possible problems of relying on a third party library (updates, blame)
Cheers,
Tudor

SamG
Registered User
Posts: 1241
Joined: Fri Aug 31, 2001 6:35 pm

Re: template engine thoughts

Post by SamG »

Just for the sake of discussion, then, I take it that if the developers themselves are comfortable with the time and energy needed to maintain and develop phpBB's template engine, there is no clear advantage to Smarty? In other words, there's no concrete evidence that phpBB suffers a limitation, vulnerability, or other disadvantage by not using Smarty -- is that correct? In the case of smaller sites where an optimizer might not be readily available, Smarty out of the box might be a performance liability -- is that correct?

By asking these questions I'm not trying to just dismiss out of hand the idea of Smarty in phpBB. But I am curious about this notion that the real reason behind not using Smarty in one form or another is an NIH mentality. If there are clear, demonstrable technical benefits to Smarty as is, then the NIH mentality argument gains strength. If it comes down to a developer call (that is, phpBB suffers no technical penalty by continuing to use a phpBB-developed template engine and gains no appreciable technical advantage by using Smarty in a lean form), then the NIH mentality argument suffers loss.

User avatar
bassul
Posts: 11
Joined: Sun Jun 25, 2006 12:39 am
Contact:

Re: template engine thoughts

Post by bassul »

There can be no evidence at this point that not using Smarty brings more security concerns into phpBB, only time will tell.
The only thing is I was trying to show with my tests is that both solutions really do have the same functionality as far as phpBB is concerned and have similar results although somewhat in favour of phpBB because of smaller codebase.

As far as NIH mentality is concerned, I do believe the code has evolved from an in-house templating system with limited functionality, so there was maybe no point in having this discussion let's say, two years ago. But now I have seen some bits of code from PHPLib and Smarty, the enhancing of the syntax, and these all show that the templating system is growing in functionality.

Sometimes you focus on the solution with the tools in your hand, because you're there, and you have them with you. But sometimes it's better to just go home, pick up a better tool and don't lose the time. I personally had a lot of times when I discovered that using an already-available library, though more dificult at first glance, would speed up my work considerably. And many times when I realised that only after reaching gradually all the stages the guys that designed the library had reached already. Personally I'm not trying to prove that phpBB developers suffer from a NIH syndrome, I just want to make sure they see all the tools that are available to them. My personal interest? - to use a stable forum.
Cheers,
Tudor

SamG
Registered User
Posts: 1241
Joined: Fri Aug 31, 2001 6:35 pm

Re: template engine thoughts

Post by SamG »

bassul wrote: I just want to make sure they see all the tools that are available to them.
And, that, I think, is entirely worthwhile. It may be that at some point the in-house development effort behind the phpBB template engine will need rethinking, and discussing alternatives and their potential benefits here hurts nobody, so far as I can see. :)

User avatar
bassul
Posts: 11
Joined: Sun Jun 25, 2006 12:39 am
Contact:

Re: template engine thoughts

Post by bassul »

Acyd Burn wrote:
I really do not know why you are even discussing this, since we will not change the template engine.

that taken from here.
I'ts pretty clear templating will not change too soon, but I agree, looking at all the facts is better for everybody in the long term.
Cheers,
Tudor

SamG
Registered User
Posts: 1241
Joined: Fri Aug 31, 2001 6:35 pm

Re: template engine thoughts

Post by SamG »

Well, I think there's a difference between saying something like, "I did a little testing and benchmarking and have some thoughts that I just wanted to put out there," and something like, "The developers apparently have a [fill in the blank] mentality else they'd change." Harping on the team members accomplishes little, but since dhn was open to hearing what you had learned, it shows something of a willingness to listen even in the case of something that's not going to change any time soon.

Drexion
Registered User
Posts: 57
Joined: Mon Sep 01, 2003 5:52 am

Re: template engine thoughts

Post by Drexion »

Bassul you have not listed any solid evidence as to why switching to Smarty would be better. Those 'advantages' you listed on your earlier front page post of Smarty are not advantages over phpBB's current system at all, they are merely neutral statements which hold no weight to either side.

I probably see more issues arising out of switching to another third party system rather then it is now. Unless there is some very clear and distinct advantage of another system, discussing this is a waste of time. phpBB's current template engine is overly sufficient, capable, and highly suitable for forum software.

There is no need to change, and I dont see any solid advantage anywhere whatsoever of Smarty, which is heavy enough to even make the devs think about changing to something else.

User avatar
bassul
Posts: 11
Joined: Sun Jun 25, 2006 12:39 am
Contact:

Re: template engine thoughts

Post by bassul »

Bassul you have not listed any solid evidence as to why switching to Smarty would be better. Those 'advantages' you listed on your earlier front page post of Smarty are not advantages over phpBB's current system at all, they are merely neutral statements which hold no weight to either side.

I agree with you, there is no reason at the moment to enhance or change the current template system, and it will not be changed. What I do say are speculations about the future, based on experience and common sense, not hard evidence. The tests I made do show, that the two solutions have overlapping functionality, mostly Smarty does everything that phpBB does at (realistically) the same speed.

Now I can speculate that phpBB will need to enhance its template system, as normal part of every project's development, that means:
  • additional coding needed for evolved features
  • it will follow even more of the paths already taken by Smarty
  • while Smarty is already there, tested, stable and Drupal grade
  • there is actually at the moment one advantage of Smarty I forgot about, caching of content, which of course can be re-implemented anytime py the phpBB guys, they have clearly done a very good job so far
Anyway, I'm clearly Smarty-biased, but if the team even has a small discussion about the code of the next generation phpBB templating, that means my effort was worthwile.
Cheers,
Tudor

Cap'n Refsmmat
Registered User
Posts: 219
Joined: Tue Jan 25, 2005 11:31 pm

Re: template engine thoughts

Post by Cap'n Refsmmat »

bassul wrote: there is actually at the moment one advantage of Smarty I forgot about, caching of content, which of course can be re-implemented anytime py the phpBB guys, they have clearly done a very good job so far

phpBB caches templates as well.

Post Reply