Categories > TinyButStrong general >

HTML::Template -> TBS

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ksmloh
Date: 2006-05-18
Time: 16:03

HTML::Template -> TBS

TBS is a very efficient template engine but the learning curve is a bit steep.
I have been using html::template for quite awhile and finds switching to TBS hard. Anyone can share how to switch to TBS from html::template.
Please provide other examples of how situations found in html::template can be converted to TBS style.

Eg.
<TMPL_LOOP MYLOOP>
<TMPL_VAR MYLOOP_CTR>
</TMPL_LOOP>
By: Skrol29
Date: 2006-05-18
Time: 16:20

Re: HTML::Template -> TBS

Hi,

I cannot help you on this since I don't know other template systems enough for a migration.

TBS hasn't the same approach/philosophy than other template systems.
And that what is making it simpler.
-> It does not affect a value to a tag.
-> It merges data immediately, instead of all at the end.
-> It hasn't got programming syntax in the Design part (HTML).


By: TomH
Date: 2006-05-19
Time: 02:30

Re: HTML::Template -> TBS

Assuming you know some basic PHP... ;-) you just need to do it an easier way.

To shorten the learning curve - just go <a href="http://www.tinybutstrong.com/examples.php" target="_blank">HERE</a>

Start with the first example at the top of the column marked "Choose an Example"

Then select each option in the "Display:" selector -- one at a time -- to see exactly how to (1) load the classes and specify the template, (2) set the data sources, (3) merge the data to the blocks, and last (4) compose the template blocks.

Then repeat that procedure for each of the examples in succession.

It might take all of 90 minutes to learn how to use TBS -- if you follow this approach -- but I doubt it. The more PHP you know the shorter the learning curve.

Then go back to any of you 'old way' applications -- primarily the php coding -- and migrate them using the qapproaches in the relecvat example.

You'll find that there is nothing you need to do for any application that isn't covered in one of the examples, or isn't expanded upon in this forum.

If you're still having trouble learning to use TBS -- it is not the TBS that's the problem, more likely need to hone your PHP skills.

For integrated database handler class use ezSQL from JVMultimedia --  TBS has a db plugin that makes ezSQL native inside TBS -- very powerful addition for simplifying serious database driven apps.

HTH,