说起PHP的模版引擎,大多数人第一个就会想起smarty,但是随着PHP的发展,而smarty一直在兼顾着老版本的PHP,慢慢的,慢慢的也就没落了。。。
如今,他好象又准备回来了。你看:
Yes, yes I know. The Smarty 3 beta is taking much longer than expected, but we wanted to be sure we had everything right. Our preliminary performance tests are already showing us very promising speed improvements over Smarty 2 (2-5x on average), and we're not done! To recap, Smarty 3 is a 100% rewrite from the ground up, and it is PHP 5 only. We will be getting a feature list up with the Beta, but let me give a quick summary:
- PHP5 OO design
- SPEED
- Object Chaining
- Exception Error Handling
- Assigned Data Objects
- Multiple Template Objects
- Static Object Access
- Pure PHP Template Option
- Powerful Parser/Lexer
- Tons of Template Syntax Enhancements
- Improved Data Scoping Features
- Variable Filters (ie. auto-html-escape)
- In-template Functions (easy recursion)
- Template Inheritance
- PHP Streams Support (per template/variable/include)
- Smart javascript/css handling (no more {literal} tags)
- Improved Cache handling (per template/variable/function)
- Many other things too numerous!
There are many folks using the Alpha in production, and with this feedback we feel the Beta is going to be very stable to begin with. Feel free to grab the Alpha and give it a test! We want feedback!
You can checkout Smarty 3 Alpha with SVN:
svn checkout http://smarty-php.googlecode.com/svn/branches/Smarty3Alpha/
想知道更多的信息?去http://www.smarty.net去看吧。也可以订阅他们的maillist哦。