Smarty+CodeIgniter 性能

Smarty+CodeIgniter Performance

我正在从事一个社交媒体项目,我想在 PHP 中使用 MVC 框架构建它。现在我知道 CodeIgniter,但没有丰富的经验,我知道它的占用空间小,但有人告诉我,使用 Smarty 作为模板引擎 CI 可以用于更大的占用空间。

所以我的问题是我应该采用这种策略还是尝试任何其他框架,如 laravel 或 yii2?

模板引擎不是性能问题的一个因素。即使 CI 也有自己的 template parser 但在视图文件中使用原始代码会使您的应用程序比模板引擎更快。例如来自 CI doc

CodeIgniter does not require you to use this class since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if they work with designers who they feel would find some confusion working with PHP.

但是,无论项目大小如何,您都可以为您的应用程序使用 CodeIgniter(CI)。连企业级的应用都可以CI搞定。如果您需要巨大的 API 或其他第 3 方 Web 服务来设计,那么 laravel 很好。