Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2012-05-23 19:25:40

Sajuuk
Member
Registered: 2010-04-17
Posts: 36

Templates System

I find it quite strange that this software has no templates system. Making a pile of core edits to use plugins will make upgrading extremely difficult, so a templates system would allow for the system to easily upgrade to the next version without problems smile

Offline

#2 2012-05-23 19:27:32

Mark
Member
From: Southport, Uk
Registered: 2008-05-03
Posts: 489

Re: Templates System

Offline

#3 2012-05-23 19:29:03

Sajuuk
Member
Registered: 2010-04-17
Posts: 36

Re: Templates System

That's good. smile

Offline

#4 2012-05-23 19:34:23

Newman
Member
Registered: 2011-11-05
Posts: 344

Re: Templates System

Template system will slam performance like a turtle trying to eat cake for breakfast.

Last edited by Newman (2012-05-23 19:34:30)

Offline

#5 2012-05-23 19:49:59

Paul
Developer
From: Wales, UK
Registered: 2008-04-27
Posts: 1,653

Re: Templates System

Newman wrote:

Template system will slam performance like a turtle trying to eat cake for breakfast.

Not true.  I tested templating FluxBB 1.4 using a simple template class and there was no measurable difference in either page generation time or memory use.  Any hit templating would have caused was offset by merging and simplifying header.php and footer.php plus eliminating a whole raft of str_replace calls.


The only thing worse than finding a bug is knowing I created it in the first place.

Offline

#6 2012-05-23 19:51:07

Newman
Member
Registered: 2011-11-05
Posts: 344

Re: Templates System

Paul wrote:
Newman wrote:

Template system will slam performance like a turtle trying to eat cake for breakfast.

Not true.  I tested templating FluxBB 1.4 using a simple template class and there was no measurable difference in either page generation time or memory use.  Any hit templating would have caused was offset by merging and simplifying header.php and footer.php plus eliminating a whole raft of str_replace calls.


Well my statement still stands if this is true:

I have also tested plain PHP templates. So, here is the updated table:

Library    Time (sec)    Memory (Kb)
Plain PHP    2.4    114
Twig    3    383
PHPTAL    3.8    598
Dwoo    6.9    1,645
Smarty 2    12.9    610*
Smarty 3    14.9    799*
Calypso    34.3    614
eZ Templates    53    2,783

Off
http://fabien.potencier.org/article/35/ … -follow-up

Isn't that where you're doing the template system on Twig? tongue

almost 2 1/2 more ememory and 0.60 seconds more? @_@.....

Last edited by Newman (2012-05-23 19:55:12)

Offline

#7 2012-05-23 19:57:43

Paul
Developer
From: Wales, UK
Registered: 2008-04-27
Posts: 1,653

Re: Templates System

It was just a bog standard templating class, assign variables from the page controllers as an array, include the template in a buffer where it gets merged with the variables and then spit out the page.


The only thing worse than finding a bug is knowing I created it in the first place.

Offline

#8 2012-05-23 20:01:42

Newman
Member
Registered: 2011-11-05
Posts: 344

Re: Templates System

Paul wrote:

It was just a bog standard templating class, assign variables from the page controllers as an array, include the template in a buffer where it gets merged with the variables and then spit out the page.


How long have you guys been working on this template system?   (As you can tell im not really into template's, but I do believe is will hit performance hard) It's just extra work for php to process, it all adds up.


Wouldn't having a basic simple forum software require that no templating  should be used?  Why add the template system? To make it easier to edit "HTML" Pages? To edit pages through the AdminCP? Again, I see no valid point, but that's just me.

Offline

#9 2012-05-23 20:04:51

Mark
Member
From: Southport, Uk
Registered: 2008-05-03
Posts: 489

Re: Templates System

Newman wrote:

(As you can tell im not really into template's, but I do believe is will hit performance hard) It's just extra work for php to process, it all adds up.

Same as all the modifications people keep asking for? All adds up.

Offline

#10 2012-05-23 20:06:01

Newman
Member
Registered: 2011-11-05
Posts: 344

Re: Templates System

Mark wrote:
Newman wrote:

(As you can tell im not really into template's, but I do believe is will hit performance hard) It's just extra work for php to process, it all adds up.

Same as all the modifications people keep asking for? All adds up.

Are you talking about the PM system? How does that add to anything? If it's essential then it's fine.  Templating system is not Essential so it adds up.  See where Im going?

Offline

#11 2012-05-23 20:09:20

Sajuuk
Member
Registered: 2010-04-17
Posts: 36

Re: Templates System

Newman wrote:

Templating system is not Essential so it adds up.  See where Im going?

Yes it is. If you want to succeed at a forum software, a template system is an absolute must. If you want people to come here and design themes, it's absolutely necessary. Why would someone want to design themes for FluxBB right now when they can't change the default layout without making a ton of core edits ?

Before you make such a random assumption that it's not essential, do your research. Every single forum software needs templating if they want to attract developers. It also provides a quick and simple way to change the feel of your forum.

It's one thing to put too many features in a software, but this is taking it to the extreme with hardly ANY features. FluxBB won't succeed or become better known until the developers put more features in that will attract users.

Last edited by Sajuuk (2012-05-23 20:11:17)

Offline

#12 2012-05-23 20:15:27

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,047
Website

Re: Templates System

That's why there'll be a template system in v2.0.
It will be very simple and performant. As said above, it is very useful for developing themes, but also a very good technique to separate logic from presentation.

And as we're getting off-topic again, I'll close this topic now.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

Board footer

Powered by FluxBB 1.5.8