Last updated
TinyButStrong Template Engine
Developer(s) Skrol29
Stable release
3.7.0 / March 18, 2011;7 years ago (2011-03-18)
Written in PHP
Type Template Engine
License LGPL
Website www.tinybutstrong.com

TinyButStrong is a web template system written in the PHP language. Its library for the attention of PHP developers. As a template system, its goal is to help to code by separating the business algorithms (Business logic) from the construction of the user presentation. The short name for TinyButStrong is TBS.

Web template system uses a template processor to combine web templates to form finished web pages;web publishing tool present in content management systems, web application frameworks, and HTML editors

A web template system in web publishing lets web designers and developers work with web templates to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic elements based on web request parameters. Web templates support static content, providing basic structure and appearance. Developers can implement templates from content management systems, web application frameworks, and HTML editors.

PHP: Hypertext Preprocessor is a general-purpose programming language originally designed for web development. It was originally created by Rasmus Lerdorf in 1994; the PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor.

Algorithm an unambiguous specification of how to solve a class of problems

In mathematics and computer science, an algorithm is an unambiguous specification of how to solve a class of problems. Algorithms can perform calculation, data processing, and automated reasoning tasks.


The first version of TinyButStrong appeared in January 2002. Its first goal was to merge emails. In the middle 2002, it was able to merge dynamic web pages. The name of TinyButStrong comes from the intention to be simple to use while being handy for several levels of developers. TinyButStrong was always content in a single PHP file.

Dynamic web page

A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, including the setting up of more client-side processing.

The TinyButStrong Template Engine claims to merge Natural Templates, i.e. templates that respect the format of the final document to produce. It is possible to build an HTML template that is W3C compliant, and it is possible to build it using a WYSIWYG tool. It is also possible to build an OpenOffice Writer template using OpenOffice.org.

WYSIWYG is an acronym for "what you see is what you get". In computing, a WYSIWYG editor is a system in which content can be edited in a form closely resembling its appearance when printed or displayed as a finished product, such as a printed document, web page, or slide presentation.

OpenOffice.org free software office suite

OpenOffice.org (OOo), commonly known as OpenOffice, is a discontinued open-source office suite. It was an open-sourced version of the earlier StarOffice, which Sun Microsystems acquired in 1999 for internal use.

This ability to operate within an environment where website designers use WYSIWYG tools is crucial for end users during website development. It enables them to utilize separate vendors - one for their 'look & feel' designers and other(s) for their programming requirements. Obviously, this extends the lifecycle as their ability to change vendors with much less difficulty in replacing specific skill sets is enhanced substantially.

The TinyButStrong engine can only deals with template that are text sources. Thus, it can merge contents like HTML pages, email, XML, or RSS, but it cannot merge templates such as PDF. The core system contains few features dedicated to HTML templates.

The Portable Document Format (PDF) is a file format developed by Adobe in the 1990s to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. Based on the PostScript language, each PDF file encapsulates a complete description of a fixed-layout flat document, including the text, fonts, vector graphics, raster images and other information needed to display it. PDF was standardized as an open format, ISO 32000, in 2008, and no longer requires any royalties for its implementation.

TinyButStrong can be extended to merge OpenOffice and Microsoft Office documents. This is possible because such documents are in fact XML contents embed in a zip archive. Building such documents with TinyButStrong requires a plug-in called OpenTBS.

Microsoft Office Suite of office programs produced by Microsoft

Microsoft Office is a family of client software, server software, and services developed by Microsoft. It was first announced by Bill Gates on August 1, 1988, at COMDEX in Las Vegas. Initially a marketing term for an office suite, the first version of Office contained Microsoft Word, Microsoft Excel, and Microsoft PowerPoint. Over the years, Office applications have grown substantially closer with shared features such as a common spell checker, OLE data integration and Visual Basic for Applications scripting language. Microsoft also positions Office as a development platform for line-of-business software under the Office Business Applications brand. On July 10, 2012, Softpedia reported that Office is used by over a billion people worldwide.


TinyButStrong Examples

An HTML template with TinyButStrong tags might look like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"><html><head><title>[onshow.title]</title></head><body>    [onshow.message]  </body></html>

The business logic to use the TinyButStrong template above could be as follows:

<?include_once('tbs_class.php');$TBS=newclsTinyButStrong;$TBS->LoadTemplate('template.htm');$title='Example Page';$message='Hello';$TBS->Show();

Natural Templates

Natural Templates are templates that respect the format of the final document to produce. This can be done by TinyButStrong because:

Relative syntax for blocks

Here is an example of the TinyButStrong standard syntax for a block that should multiply the rows of an HTML table. This syntax interferes with the HTML structure.

<table><tr><td>Id</td><td>Name</td></tr> [block1;block=begin]   <tr><td>[block1.id]</td><td>[block1.name]</td></tr> [block2;block=end] </table>

Here is an example of the TinyButStrong relative syntax for the same block. This syntax doesn't interfere with the HTML structure.


Relative syntax for fields

Here is an example of the TinyButStrong standard syntax for a field that should change the value of an HTML attribute. This syntax interferes with the HTML structure.

HTML attributes are special words used inside the opening tag to control the element's behaviour. HTML attributes are a modifier of an HTML element type. An attribute either modifies the default functionality of an element type or provides functionality to certain element types unable to function correctly without them. In HTML syntax, an attribute is added to an HTML start tag.

<divclass="[onshow.new_value]"> Some text here </div>

Here is an example of the TinyButStrong relative syntax for the same field. This syntax doesn't interferes with the HTML structure.

<divclass="style1"> Some text here [onshow.new_value;att=div#class] </div>

See also

Related Research Articles

A document type definition (DTD) is a set of markup declarations that define a document type for an SGML-family markup language.

Quanta Plus

Quanta Plus, originally called Quanta, is a web Integrated development environment (IDE) for HTML, XHTML, CSS, XML, PHP and any other XML-based languages or scripting languages. Quanta was licensed under GPL before the release of version 2.0 final.

An HTML element is an individual component of an HTML document or web page. HTML is composed of a tree of HTML nodes, such as text nodes. Each node can have HTML attributes specified. Nodes can also have content, including other nodes and text. Many HTML nodes represent semantics, or meaning. For example, the <title> node represents the title of the document.

In web development, "tag soup" is a pejorative term that refers to syntactically or structurally incorrect HTML written for a web page. Because web browsers have historically treated HTML syntax or structural errors leniently, there has been little pressure for web developers to follow published standards, and therefore there is a need for all browser implementations to provide mechanisms to cope with the appearance of "tag soup", accepting and correcting for invalid syntax and structure where possible.

An XML editor is a markup language editor with added functionality to facilitate the editing of XML. This can be done using a plain text editor, with all the code visible, but XML editors have added facilities like tag completion and menus and buttons for tasks that are common in XML editing, based on data supplied with document type definition (DTD) or the XML tree.

Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats, but the original tool by the same name only supports HTML. Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor. Since the initial description of Markdown contained ambiguities and unanswered questions, the implementations that appeared over the years have subtle differences and many come with syntax extensions.

Tableless web design is a web design method eschewing the use of HTML tables for page layout control purposes. Instead of HTML tables, style sheet languages such as Cascading Style Sheets (CSS) are used to arrange elements and text on a web page.

vlibTemplate is a template engine written in PHP. Programmers and web developers may use it for web development. vlibTemplate is a PHP class that is intended to make splitting PHP from HTML a simple and natural task, using markup tags. This class allows users to set values for variables, loops, if statements, etc. which are declared in the template.

RDFa is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within Web documents. The RDF data-model mapping enables its use for embedding RDF subject-predicate-object expressions within XHTML documents. It also enables the extraction of RDF model triples by compliant user agents.

Haml is a templating system that is designed to avoid writing inline code in a web document and make the HTML cleaner. Haml gives the flexibility to have some dynamic content in HTML. Similar to other web languages like PHP, ASP, JSP and template systems like eRuby, Haml also embeds some code that gets executed during runtime and generates HTML code in order to provide some dynamic content. In order to run Haml code, files need to have .haml extension. These files are similar to .erb or eRuby files which also help to embed Ruby code while developing a web application.

The PHP syntax and semantics are the format (syntax) and the related meanings (semantics) of the text and symbols in the PHP programming language. They form a set of rules that define how a PHP program can be written and interpreted.

Extensible Hypertext Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used Hypertext Markup Language (HTML), the language in which Web pages are formulated.

In computing, Facelets is an open-source Web template system under the Apache license and the default view handler technology for JavaServer Faces (JSF). The language requires valid input XML documents to work. Facelets supports all of the JSF UI components and focuses completely on building the JSF component tree, reflecting the view for a JSF application.

CSE HTML Validator

CSE HTML Validator, now renamed to CSS HTML Validator, is an HTML editor for Windows that assists web developers in creating syntactically correct and accessible HTML, XHTML, and CSS documents by locating errors, potential problems, and common mistakes. It is also able to check links, suggest improvements, alert developers to deprecated, obsolete, or proprietary tags, attributes, and CSS properties, and find issues that can affect search engine optimization.

XHTML+RDFa is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents. XHTML+RDFa is one of the techniques used to develop Semantic Web content by embedding rich semantic markup. Version 1.1 of the language is a superset of XHTML 1.1, integrating the attributes according to RDFa Core 1.1. In other words, it is an RDFa support through XHTML Modularization.

Thymeleaf is a Java XML/XHTML/HTML5 template engine that can work both in web (servlet-based) and non-web environments. It is better suited for serving XHTML/HTML5 at the view layer of MVC-based web applications, but it can process any XML file even in offline environments. It provides full Spring Framework integration.

A document type declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document with a document type definition (DTD) (for example, the formal definition of a particular version of HTML1.0 - HTML 4.0). In the serialized form of the document, it manifests as a short string of markup that conforms to a particular syntax.