Yii Framework Forum: Tiny But Strong (TBS) template engine extension for Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Tiny But Strong (TBS) template engine extension for Yii Rate Topic: -----

Poll: Tiny But Strong (TBS) template engine extension for Yii (12 member(s) have cast votes)

Do you want a TBS extension for Yii developed?

  1. Yes (9 votes [75.00%] - View)

    Percentage of vote: 75.00%

  2. No (0 votes [0.00%])

    Percentage of vote: 0.00%

  3. I use Smarty (0 votes [0.00%])

    Percentage of vote: 0.00%

  4. I don't know TBS (3 votes [25.00%] - View)

    Percentage of vote: 25.00%

  5. Not interested in TBS (0 votes [0.00%])

    Percentage of vote: 0.00%

Vote Guests cannot vote

#1 User is offline   Marco A Ortega 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 08-June 12

Posted 08 June 2012 - 01:12 PM

I'm used to use TBS (TinyButStrong) template engine for web development.

Now that I'm interested on using Yii for agile web development, I see it does not support TBS. I've looked for an extension to support it and didn't find anything.

So I'll develop an extension to support it.

Let me know if any of you are interested on using it.
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 08 June 2012 - 02:34 PM

I am curious:
What makes this TBS thing worth looking into?
What makes it different from other templating engines?

If you want to create an extension, do look at the other templating extensions for Yii. :)
"Less noise - more signal"
0

#3 User is offline   Marco A Ortega 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 08-June 12

Posted 08 June 2012 - 03:17 PM

View Postjacmoe, on 08 June 2012 - 02:34 PM, said:

I am curious:
What makes this TBS thing worth looking into?
What makes it different from other templating engines?

If you want to create an extension, do look at the other templating extensions for Yii. :)


What I like about tbs is that the syntax is more clear and elegant than Smarty and since it does not uses curly braces you can easily put vars inside javascript code without the need of the {literal} {/literal} block.

Also to render an array (or a query result) you can use blocks, very easy and simple, no need to use a loop statement in your template. You can also use sub-blocks, a powerful feature.

Something useful are magnets, to create html tags in a condensed way.

Another nice feature is the use of ope in conjunction with max in order to nicely limit the length of the displayed text.

It also has some nice plugins:

by_page and nav_bar: for pagination
cache_system: caching
HTML: select items inside options tags in conjunction with block
OpenTBS: is a PHP tool that easily merges both OpenOffice and Ms Office documents. In fact it can merge any XML or Text file saved in a zip container.
Aggregate: Provides aggregate calulations when a block is merged. It does Sum, Min, Max, Avg, Count, Accumulation and Changes.
Excel: Makes TBS enables to merge Microsoft Excel Worksheets.

(Since this is my first post I'm not allowed to post links... I tailored this reply with url references but too bad I can't post them...)
1

#4 User is offline   Marco A Ortega 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 08-June 12

Posted 08 June 2012 - 03:37 PM

Ok I finished creating the extension but I'm not able to post it into the Yii repository, because I'm "too new" to do that.

So I'll just share it here.
1

#5 User is offline   5starboiler 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 24-July 13

Posted 24 July 2013 - 08:05 PM

Marco,

Looks like you didn't post the extension. We are looking for the same thing. To build on top of what you already explained about TBS is that it separates your html code from your php code. It is a nightmare to mix the two. It would make Yii a true mvc if they incorporated it. Model - View - Controller. This would clean up the view side.

Please post your extension if you can.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users