3/26/2023 0 Comments Don t be stupid be a smarty![]() The directory you point to should have the PHP class file in a folder called libs. If you decide to install Smarty under a different directory name, make sure you update the Smartie.php library module to point to your Smarty installation. I also like the fact that Smarty uses different delimiters '. This can quickly become a maintenance nightmare. I have seen too many developers get sloppy and start adding logic and even database calls in their HTML. I personally like having a clean separation between code (PHP) and views (templates using Smarty). Templating is a controversial topic with some devlopers since they feel that using PHP directly in the HTML is easier than learning a new templating language to accomplish the same thing. Smarty also "compiles" templates into pure PHP which makes them faster to execute. It has been around for a while and has many features beyond the simple templating engine built into CodeIgniter. Smarty is another open source project that handles templates and is also written in PHP. As the traffic volume picks up or with larger pages, this may impact the response time of the web site. For web sites with low traffic volumes and few variable replacements, this approach is fine. ![]() ![]() It also implements the templating by filtering the page using preg_match() and string replacement. CodeIgniter has a templating system built in but, the last time I looked at it, it does not have many features. It is an open source project created by EllisLabs. If you are not familiar with CodeIgniter, it is a lightweight Model-View-Controller (MVC) framework written in PHP. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |