8 comments
Comment from: Sylvestre [Visitor]
Sylvestre

Well, your argument is true for Smarty but I don’t think it is a reason by itself for not using this template system…
Moreover, in many cases, you can use the caching system of smarty which makes this problem disapearing…

11/25/05 @ 04:45
Comment from: Achim [Visitor]
Achim

I think the time a page needs to be genrated usually can be neglected compared to the time the page spends “in the net” between the server and the browser. If it is not a very complicated processing I think the user waiting for a response will see no difference between a page which created the view at last and a page which creates the few “on the fly".
If the server slows down so much, that there is a significant difference between those two ways to create a page it would be perhaps better to think about upsizing the server. You say: “The global processing time will be approximately the same” - so in this case the user definitly HAS to wait. And in my opinion it does not make such a great difference, if he gets the bits of information everytime they are created or at the end - if the global processing time is too long, then it doesn’t matter in what way the data is send to the user. You then should consider about the whole application architecture, the server environment and the database connection, not about some psychological tricks for displaying data. Just my opinion.

Achim.

12/12/05 @ 21:10
Comment from: Tali Me Banana [Visitor]
Tali Me Banana

Well,

It doesn’t seem like Francois has even used Smarty.

I’ve been using Smarty for the past 4 years and I can tell you that it most certainly does not slow down steps a and b. Run your own benchmarks and try it. I’ve compared a decent sized script with and without templates and got results so close to each other that even time itself could not discern the difference.

To top it off, add caching on there and you can do so much more than you could without Smarty. I recently took a very complex SQL query (on good hardware) and turned it from a 3.5 second execution time to a 0.2 second run time with Smarty and caching.

You’d be hard pressed to convince me Smarty slows things down after having such extensive experience with it.

Oh ya, tried implementing APC cache with b2evo and it breaks. Better get that fixed before APC goes into the core of 6!

02/03/06 @ 08:56
Comment from: loconet [Visitor]
loconet

I agree with Smarty having its problems but I’m not sure why you are associating MVC with Smarty. Smarty is not an MVC implementation. Smarty is just a templating engine. MVC (Model-View-Controller) is a design pattern which may or may not use Smarty in the case of php. MVC is a higher level of abstraction which although may use a templating engine as part of its view function, is much more than just “templating". So to say that MVC templating is inefficient is just inacurate.

03/09/06 @ 18:55
Comment from: [Member]

OKay I need to clarify a few things.

I am not ranting at MVC, I am ranting at poor MVC implementations. And Smarty is a poor implementation to me.

Also I am not claiming Smarty slows down steps a & b. I am claiming that if a & b are already long, then Smarty makes it just look worse by not sending any output before the end of b, whereas not using smarty would allow to send output much earlier.

Finally, cacheing is cool but it won’t help much as soon as you have somehting that’s a little more than dull website updated once every… day? …but something more like a user customized dynamically updated application: you just can’t cache effectively something that changes every few pageviews.

03/09/06 @ 20:46
Comment from: Brian [Visitor]
Brian

First of all…

Absolutely nothing prevents you from doing:

$smarty->display(’header.tpl’)

at the top of your php script and then continuing on with the rest of the logic.

Second of all…

If there is a 2 second delay between the time your visitors see the header and the rest of the page, many users will perceive this to actually be SLOWER compared to: clicking a link, seeing the status bar of their browser show “Connecting to site…” and then 2 seconds later the page draws instantly.

Indeed, by not sending them anything until the entire page is ready, at least they still have the last page to look at and occupy their mind, instead of a banner and set of links they’ve already seen before and a large blank space underneath it, taunting them.

Plus, with the first way they KNOW your site takes 2 seconds to render one page, whereas with the latter method they may simply attribute the 2 second load time to a network connectivity issue that could be anywhere between their connection and yours.

07/03/06 @ 23:45
Comment from: David [Visitor]
David

I consider that smarty has everything PHP / MVC developer might dream about. If there are things that you people don’t like in it, there is a way to make a plug-in. However, since smarty supports {php}{/php} in its tpl files as I think there is no need for that. When I have to do something that Smarty doesn’t support, I do write php code in template files, I can even globalize php class variables, {php}global $auth; .. . {/php}

01/24/07 @ 20:54
Comment from: Skrol29 [Visitor]
Skrol29

Just to let know that not all template systems works like that.
TBS (TinyButStrong) let you merge the parts of your template step by step. Your steps in your order. The MVC model (or other) makes no problem like this.

By the way, TBS is alos the only template engine to enables WYSIWYG templates.

02/28/07 @ 23:05


Form is loading...