FACTOID # 113: In Denmark, more than 50% of the tax collected is personal income tax. In the Netherlands, personal income tax makes up less than 15%.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "Smarty" also viewed:
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Smarty
Smarty
Image:smarty-logo.gif
Maintainer: Monte Ohrt, Messju Mohr
Latest release: 2.6.14 / 28th May 2006
Use: Template Engine
License: LGPL
Website: smarty.php.net

Smarty is a template engine written in PHP. Smarty separates PHP, as a business logic, from HTML, a presentation logic, and generates web content by the placement of special Smarty tags within a document (i.e. variable substitution). Image File history File links Smarty-logo. ... In software engineering, software maintenance is the process of enhancing and optimizing deployed software (software release), as well as remedying defects. ... A software release refers to the creation and availability of a new version of a computer software product. ... A software license is a legal agreement which may take the form of a proprietary or gratuitous license as well as a memorandum of contract between a producer and a user of computer software. ... GNU logo The GNU Lesser General Public License (formerly the GNU Library General Public License) is an FSF approved Free Software license designed as a compromise between the GNU General Public License and simple permissive licenses such as the BSD license and the MIT License. ... Website - Wikipedia, the free encyclopedia /**/ @import /skins-1. ... The server-side web template in the web page process, to produce dynamic web pages with the template engine. ... PHP is an open-source, reflective programming language. ... PHP is an open-source, reflective programming language. ... Business logic refers to the logic that embodies business rules rather than the view of data or storage, with the consumers of the business process. ... An excerpt of HTML code with syntax highlighting In computing, HyperText Markup Language (HTML) is a markup language designed for the creation of web pages with hypertext and other information to be displayed in a web browser. ...


Tags are variables such as {$variable}, and a range of logical and loop operators. In logical calculus, logical operators or logical connectors serve to connect statements into more complicated compound statements. ... In computer science control flow (or alternatively, flow of control) refers to the order in which the individual statements or instructions of an imperative program are performed or executed. ...


This makes for much cleaner coding and more flexible modification. For instance, one could typically modify a Smarty-based application's appearance (i.e. skin) easily, without ever looking at any business logic or PHP code. This compartmentalization also allows for the the back-end to change separate from the layout. Most intracellular organelles, i. ...


Smarty allows template programming with

and many more features. Other template engines also support these commands in templates. A regular expression (abbreviated as regexp, regex or regxp) is a string that describes or matches a set of strings, according to certain syntax rules. ... In computer science control flow (or alternatively, flow of control) refers to the order in which the individual statements or instructions of an imperative program are performed or executed. ... The server-side web template in the web page process, to produce dynamic web pages with the template engine. ...


Code example

Since Smarty separates PHP from HTML, you have two files:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title>{$title_text}</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <body> {* This is a little comment that won't be visible in HTML source *} <p>{$body_text}</p> </body><!-- this is a little comment that will be seen in source --> </html> 

In the business logic code you can configure Smarty to use this template:

 define('SMARTY_DIR', 'smarty-2.6.9/' ); require_once(SMARTY_DIR . 'Smarty.class.php'); $smarty = new Smarty; $smarty->config_dir = SMARTY_DIR; $smarty->template_dir = './tmpl'; $smarty->compile_dir = './tmpl/compile'; $smarty->compile_check = TRUE; $smarty->debugging = FALSE; $smarty->assign('title_text', 'TITLE: This is the Smarty basic example ...'); $smarty->assign('body_text', 'BODY: This is the message set using assign()'); $smarty->display('basic.htm'); 

See also

  • PRADO, a component-based web development framework for PHP5
  • CakePHP, a PHP web application framework inspired by Ruby on Rails
  • PHROOT, PHP Rapid Object Oriented Technology Framework Project

PRADO is a component-based and event-driven Web programming framework for PHP 5. ... CakePHP is a web application framework written in PHP, modeled after the concepts of Ruby on Rails. ... Ruby on Rails, often called RoR, or just Rails, is an open source web application framework written in Ruby that closely follows the Model-View-Controller (MVC) architecture. ... PHROOT stands for PHP Rapid Object Oriented Technology ([fru:t]) and is a framework that is generally modeled for object oriented PHP after the server <-> client abstraction taken from the basic specifications and interfaces of the Java programming language. ...

External links

  • Smarty Home Page - official site.
  • Download
  • Smarty Resources list
  • Forum - other languages
  • Smarty users knowledge base Wiki
  • PHP Templating with Smarty by Cezar Floroiu - Smarty tutorial
  • Smarty vs. XML/XSLT - from DevPapers.com by Sergey Makogon
  • Article "Templates, Gift from Heaven or Syntactic Junk Food?" by Nathan Oostendorp
  • Chapter from Smarty PHP Template Programming and Applications book.
  • Smarty Cheat Sheet Smarty Cheat Sheet for Templates Designers and Programmers
  • Timestretch: PHP, MySQL, and Smarty Programming - Also see the PHP2 page for more.
  • CakePHP

  Results from FactBites:
 
The Smarty Jones Story (1762 words)
Smarty Jones was bred at Someday Farm near Philadelphia by his owner, Roy Chapman, and was foaled on February 28, 2001.
Soon after Smarty Jones was foaled, Roy Chapman's trainer Bob Camac and his wife were murdered at their New Jersey farm, causing Chapman to consider getting out of the racing business altogether.
Besides Smarty Jones and Jostle, Servis' favorite horse he trained was La Grande Pos, because "he was a warrior and had such a long career." Servis' father was a jockey and managed the Jockeys' Guild for 11 years, then was a steward in West Virginia for 18 years.
Smarty Jones - Wikipedia, the free encyclopedia (1319 words)
Smarty Jones (born February 28, 2001) is a thoroughbred race horse, and winner of the 2004 Kentucky Derby and Preakness Stakes.
Smarty Jones won the most prestigious horse race in North America by 2¾ lengths, earning $854,800 for the Chapmans, along with a bonus of $5 million from Oaklawn Park for having swept the Rebel Stakes, the Arkansas Derby, and the Kentucky Derby.
Others pointed to Smarty Jones' relatively unfavourable 3.40 Dosage Index as being a portent of his inability to successfully negotiate the 1½-mile Belmont distance (Birdstone's Dosage Index was 1.77; the lower the Dosage number, the better suited a horse is to longer races).
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.