The main claim to fame of JSP is that it allows the separation of content presentation from programming logic. PHP is a great programming language but as the maintenance cycle runs it course a PHP application can become an unwieldy unintelligible mess of HTML intermixed with PHP logic.

Smarty is a PHP class that addresses this problem by the use of templates. A Smarty template is a programming abstraction that allows the PHP developer to isolate logic from content. Smarty also pre-compiles it's templets so that real time parsing by the PHP interpreter is not bogged down with template assembly.