Innter.Net - Domain name registration service

domain registration, webserver, domain server, website builder, provider, domain, domains, .com domain, .at domain, .de domain, .ch domain, webhosting, web hosting, webspace, hosting, website, websites, domain registry, webdesign

 

English German
Website language: English
Domain & Webserver
Domain check
Domain Server
Economy Webserver
Business Webserver
Website construction kit
Special offers
Show demo-videos
More Information
Domain & DNS infos
Business Webserver infos
Change your provider
Pricelist
Presales Inquiry
Your benefits at Innter.Net®
We accept

Verified by Visa

  Mastercard SecureCode

Visa

  MasterCard

WireTransfer

  MasterCard
SmartPage and Smarty
A template engine is a library that enables the separation of code and presentation during the development of web-applications. The presentation is usually handled by HTML, but could also be any text-based file format, for example XML.


Smarty:

Smarty is a template engine for PHP. To be more precise, it allows the easy
separation of application logic and design/presentation. This is especially desirable when the application developer and the designer are not the same person.


Usage example:
For example, consider a website that publishes newspaper articles.
The title, the introduction, the author and the content do not in themselves contain information about how they are presented. As such, the application gives these
to Smarty, so that the designer can create the design (tables, background colors, font-sizes, stylesheets, etc.) in the templates using a combination of HTML and template tags. The designer is not concerned if, one day, the application has to be altered, since the contents are still passed to the template(s) in the same way.
By the same token, the designer can change the presentation of the data at his discretion, without the needing to change the application. This allows the programmers and designers to freely change the application logic and presentation respectively, without interfering with each other.


What Smarty cannot do:

Smarty does not attempt to completely remove the logic from the template.
As long as the logic is exclusively applied to the presentation it may be embedded in the template.

A tip: try not to introduce application logic in the template and presentation logic in the application. This must be adhered to, in order to keep the application scalable for the foreseeable future.


One of the unique aspects of Smarty is the compilation of templates.
Smarty reads the template files and uses them to generate new PHP scripts; from then on only these scripts are used. This means that templates do not have to be parsed for each page call, which would be taxing on performance. Every template can profit from PHP compiler-cache solutions. (Zend, PHP Accelerator)
 

Some Smarty characteristics:

  • Very quick.
  • Very efficient, since the PHP parser carries out the ’dirty’ work.
  • No overhead due to template parsing, only one-off compilation.
  • Only recompiles changed templates.
  • You can extend the engine with individual functions and variable modifiers.
  • Configurable syntax for template tags: You can use {}, {{}}, <!--{}-->, etc.
  • ’if/elseif/else/endif’ constructs are given directly to the PHP parser.
    As such, {if ...} statements can be very simple and also very complex.
  • Unlimited nesting of ’section’, ’if’ and other blocks.
  • Enables the direct embedding of PHP code.
  • Built-in caching support
  • Arbitrary template sources.
  • Custom cache handling functions.
  • Plugin architecture.
Do you have further questions? We're happy to advise you.