IT Hardwares

eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 
eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 
Business & Money
Technology
Women
Health
Education
Family
Travel
Cars
Entertainment
SD Editorials
Online Guide and article directory site.
Foodeditorials.com
Over 15,000 recipes & editorials on food.
Lyricadvisor.com
Get 100,000 Lyric & Albums.
  • Business & Money
    • A Guide to Business
    • Guide to Finance
    • Ideas for Marketing
    • Legal Guide
    • Guide to Insurance
    • Lettre De Motivation
    • Guide to the Stock Market
    • Human Resource Career
    • Sales Marketing
    • Forex & Trading
    • Advertising & Marketing
    • Startup Guide
  • Technology
    • Guide to Technology
    • Cell Phones
    • Computer Software
    • IT Hardwares
    • Internet
    • Online Security
    • Cameras
    • Search Engine Optimization
    • Science & Technology
  • Women
    • Guide to Women
    • Relationship Advice
    • Marriage
    • Jewelry
    • Pregnancy
    • Fashion Style
    • Divorce Guide
    • Wedding Guide
    • Dating Guide
    • Natural Beauty
  • Health
    • Guide to Health
    • Guide to Medical
    • Plastic Surgery
    • Weight Loss
    • Sports
    • Body Wellness
    • Cancer Treatment
    • Common Illness
    • Health & Lifestyle
  • Education
    • Military Service
    • Politics and Policy
    • Arts & Humanities
    • Education and Teaching
    • Learn Languages
    • Colleges & Universities
  • Family
    • Quality Home Improvement
    • Hobbies and Interests
    • Family Guide to
    • Pet Guide
    • Loans Guide
    • Credit Cards
    • Gardening Guide
    • Home Security
    • Real Estate
    • Home Decor
    • Gift & Present
  • Travel
    • The Travel Guide
    • Adventure Travel
    • Cruise Ships
    • Beach Holiday
    • Travel Accommodation
    • Holiday Destinations
  • Cars
    • Information on Cars
    • Traffic Violations
    • Auto Insurance
    • Trailers
    • Sport Cars
    • The Bikes
  • Entertainment
    • Entertainment Guide
    • World Music
    • Photo & Video
    • Television & Games

Php Using Smarty

    View: 
Till now i developed most of my projects using asp.net. Just last month only i learned PHP (PHP: Hypertext Preprocessor) is a programming language designed for producing dynamic Web pages. PHP is an open source language and considered to be free software by the Free Software Foundation. At this time, i discovered Smarty and have been using it in my projects.



Now the question is why do we use Smarty and what is the purpose of using it...???

Traditionally, when you make a web application using php, html and php scripts are mixed in one file.

More often than not, a programmer finishes a complete project, and someone suggests that the font and background colors chosenhe/his choose don't match with their requirement. The programmer would then hasve to search through dozens of php files and alter the HTML that was embedded within simply to change the appearance of the web site and change all other properties. Editing the php files greatly increases the chance of generatinge new errors or bugs. It will much easier when you separate your HTML from your PHP code and will also make it much easier to reuse your PHP code down the road in other projects.

So the above solution can be applied by using Smarty technology as, it allows you to change the appearance of your web site by changing an HTML template file. It also allows you to do simple if statements, dynamic repeating blocks, and variable substitution.

The basic use of Smarty is for separation of business logic and presentation logic, generates web content by the placement of special Smarty tags within a document. So it allows the presentation of a web page to change separately from the back-end, thus allowing applications to be developed in a more organized fashion. Using this development model, designers are hidden from the back-end coding and PHP programmers are hidden from the presentation coding.

Tasks of both designer and programmer are is as follows :

Programmer's Tasks:

-> Fetching data from database by firing simple queries to it.

-> Manipulate or validate the data by performing business logic on it.

-> The best thing is that we can change the data access method like from MySql to another without interfering with designer's work.

Designer's Task:

->Creating HTML pages without affecting php scripts , only concerned is with placing content elements on the right place where the programmer has agreed to provide.

Some of the attractive features of using smarty areis as follows :

1) Fast : Smarty is extremely fast by doing Template Compiling, means it reads the templates, creates php scripts and include the php files which is finally compiled by php engine..The best thing is that the templates are parsed only once by smarty if it is not modified again.. this results in to fast compilation and better performance.

2) Catching : Smarty has built-in catching of your template outputs. It catches the output of the template contents and thus saves the overhead of retrieving the data from data source.

3) Variable Modifiers : Smarty provides variable modifiers in order to modify the contents of a variable like converting string to uppercase or lowercase or truncating etc things like that very easily

4) Template Function : Smarty provides some builtin and custom functions like looping function like if statements or for loops etc.Or just write a simple one line code which will generate a radiobuttons or calendar or other form controls which make things faster and more simple.r.

Smarty is a great tool for both designers and developers. By using Smarty you can reduce the site development and maintenance times. If you are a developer you no longer need to mix PHP code with HTML code. Just take care of business logic and leave the HTML to the designer

Now the matter of debugging the smarty php scripts. Nusphere provides PHP Editor for editing and debugging..Ii'ss latest verison is PhpEd version 4.6.2 has been released with full support for PHP 5.2.

The definitive resource for learning Smarty is smarty.php.net,where you will get all the stuffs related to Smarty.
More Articles from
Computer Hardware Guide Pg477
Healthcare Information Technology Certification
How To Organize Business
Importance Of Marketing Management
In Information Technology In India
Information Technology And Organizations
Information Technology And Outsourcing
Information Technology And Telecommunications
Information Technology Associate Degree
Infrared Camera For Sale
Initial Gps Navigation System
Ink Cartridge For Hp
Ink Cartridge For Officejet
Ink Cartridge For Printer
Ink Cartridges For Canon
Ink Cartridges To Buy
Ink Cartridges To Refill
Outdoor Infrared Security Camera
Technology In The Hospitality Industry
Test Products For Free
The Cheapest Ink Cartridges
» More on
Computer Hardware Guide
  • Related Articles
  • Author
  • Most Popular
Nishant has sinced written about articles on various topics from Computers and The Internet. . Nishant's top article . to your Favourites.
Catastrophic Health Insurance Cost
Taxes are largely resonsible for the funding of these government programs and any future mandates on employer health insurance will most certainly equate to either higher taxes for consumers and empl...
 
A Guide to Business | Guide to Technology | Guide to Women | Guide to Health | Family Guide to | Travel & Vacations | Information on Cars

EditorialToday IT Hardwares has 2 sub sections. Such as Computer Guide and Hardware. With over 20,000 authors and writers, we are a well known online resource and editorial services site in United Kingdom, Canada & America . Here, we cover all the major topics from self help guide to A Guide to Business, Guide to Finance, Ideas for Marketing, Legal Guide, Lettre De Motivation, Guide to Insurance, Guide to Health, Guide to Medical, Military Service, Guide to Women, Pet Guide, Politics and Policy , Guide to Technology, The Travel Guide, Information on Cars, Entertainment Guide, Family Guide to, Hobbies and Interests, Quality Home Improvement, Arts & Humanities and many more.
About Editorial Today | Contact Us | Terms of Use | Submit an Article | Our Authors