By: dDo
Date: 2005-03-15
Time: 01:38
|
Performance compared to Smarty, i18n and Auto-AuthenticationI am evaluating to use TinyButStrong or Smarty for an important project, performance compared to Smarty? support for i18n? TinyButStrong is appropiate for big projects?
Auto Authentication? during several years I have developed sites with a Java template engine, templates and actions could need authentication to accede to them, example:
If the user had not authenticated itself was automatically directed to the login page. And after login was OK, automatically continue with template required previously. New feature? Thanks! |
||
By: Outer
Date: 2005-03-15
Time: 06:08
|
Re: Performance compared to Smarty, i18n and Auto-Authenticationyes, I would also like to know the performance compared to Smarty and Ect.
I am developing a CMS based on a game, and I need to decide whether to use Smarty, PHP Fast Template, or TinyButStrong Thx :) |
||
By: Skrol29
Date: 2005-03-15
Time: 15:29
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationHello,
Performance: --------------- Some benches I just made are saying that Smarty is about 22% faster that TinyButStrong. (But take this with care because I'm not a Smarty developper). The benches are between Smarty 2.6.7 (last version) and TBS 2.02b (which is 0.5% faster than TBS 2.01). The benches consist in one Html template displaying 1,000 rows with alternated colours. Rows come from a Php array stored in a file. Each row has 4 named fields, one is a string, one is a date displayed using a format. The two benches use the same chrono function and they include only data merging, not the class instantiation. I made 16 successive executions for each solution, and compute the average on the 12 last measures. Smarty: 1.197 sec (= - 22.7%) TBS: 1.549 sec (I can give the source of the benches for those who want to) FastTemplate: ----------------- This Template Engine is know to not be fast. I didn't made benches but a TBS user did so for TBS version 1.57 and they confirmed this. i18n (internationalization): ------------------------------ TinyButStrong gives several useful features to make easily Multilanguage applications. - The MergeField() method enables you to merge a group of fields using a custom user function which is able to get field’s parameters and sub-names. - You can also define a known Html charset that will be used to merge data. If you wan to use an unsupported charset, you can define a custom user function instead. - You can use parameter 'local' to change the date/Number format displaying, another issue is to merge the formats first, and then the data. Auto Authentication: ---------------------- I made exactly the same feature as yours for one of my applications. now I re-use it often. It consists in one function that can do PASSIVE authentication (reading cookies), LOGIN or LOGOUT. I'm shared about providing such a feature in a Template Engine. Maybe is should be an add-in. But TBS doesn’t support this feature for now. |
||
By: Skrol29
Date: 2005-03-15
Time: 16:16
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationI just restarted the same benchs and TBS comes faster than Smarty.
This is very strange, and I noticed that Smarty produce irregular time executions while TBS is quite regular. Smarty: 1.730 TBS: 1.541 (= - 10.9%) Maybe I omitted something in Smarty but my code is very simple:
|
||
By: Skrol29
Date: 2005-03-16
Time: 01:16
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationTinyButStrong for big projects:
---------------------------------- TinyButStrong is the only Template Engine that can have WYSIWYG templates, and this is very precious when you have a full project with big number of pages or many people taking part. It's also the only Template Engine that I know which doesn't need programming in the Html side. The way it deals with databases or data sources is fast and enables you to merge using only one line of code. Those features really make applications much more simple to code and to maintain. In those considerations, TBS is the best for important projects. Performances are good but Smarty stay faster ; TBS doesn't produce compiled templates neither. Some TBS features that make the Html side easier to build can slow down performances when used with big data (especially 'selected' and conditional blocks into merged blocks), but you can do the same from the Php side with better performances. TBS can work with site having a heavy number of users, but this need some optimization consideration in your way of using it. |
||
By: RwD
Date: 2005-03-16
Time: 14:39
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationIndeed, authentication has nothing to do with a template engine as authentication is between client and server no matter what the layout is.
I wrote a authentication script a while ago. Skrol, would you be interested in exchanging the scripts, see what the other did, if it can be improved and if it indeed is secure?? |
||
By: Skrol29
Date: 2005-03-16
Time: 17:48
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationHello,
Here is my function. It uses two SQL functions m_Sql_Record() and m_Sql_Execute() that I can provide if you need so, but they simply do what they seems. Here are the function, and an example of use just after:
Example:
|
||
By: RwD
Date: 2005-03-17
Time: 11:49
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationI'm not posting mine online. I'll send it to you next week.
|
||
By: ClausVB
Date: 2005-03-26
Time: 21:41
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationQuote: "TinyButStrong is the only Template Engine that can have WYSIWYG templates, (...)"
That is not entirly correct, vlibTemplate is able to use WYSIWYG templates, too. See for yourself: http://lamp.clausvb.de/examples/tmpl/multiple_pages_kelvin.htm http://lamp.clausvb.de/examples/multiple_pages_kelvin.php However ... your template engine has more features. Regards, Claus |
||
By: Skrol29
Date: 2005-03-27
Time: 13:38
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationHi Clause,
vlibTemplate is Wysiwyg for fields (data items) but not for block definition. It has blocks with the same special chars as Html, so they are not visible in preview mode. |
||
By: ClausVB
Date: 2005-03-27
Time: 13:59
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationIf you mean something like that
It's just my favourite to see only the variables not the structure like TMPL_IF or TMPL_LOOP. I testet your class, great peace of work. I think I will use it for one of my projects to compare vLIB with TBS. Regards, Claus |
||
By: Skrol29
Date: 2005-03-27
Time: 14:26
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationOk, but this block definition syntax is not allways visible.
How do you define a block on the row of an Html table for example?
|
||
By: digitallysmooth
Date: 2005-08-17
Time: 09:17
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationI dropped the above example into dreamweaver MX 2004 and found that the table showed up and the tags did not which is the expected result.
I am reading through all these threads to get an idea about TBS and figured I'd test this out just to see what happens. Looks like both work (TBS and vlibTemplate). |
||
By: Skrol29
Date: 2005-08-18
Time: 18:51
|
Re: Performance compared to Smarty, i18n and Auto-AuthenticationHi,
This is not the expecting result when we talk about Wysiwyg Coding because you cannot edit this template snippet in the visual mode (of Dreamweaver). You have to edit the source code. Also, the table seems to be something valid in the visual mode (of dreamweaver), but it not let you know what are the bounds of the block. You cannot even guess that there is a block. (But I must admit that some TBS blocks connot be guessed is some cases). In both FireFox and Internet Exlorer, you will have the two tags displayed before the table. Wich is not valid anymore. |