正在使用 codeigniter 视图层,没有 mdeium sizeapp sane 的模板引擎

发布于 2024-12-01 15:42:31 字数 416 浏览 0 评论 0原文

我正在开发一个中型应用程序,总共有大约 30 个视图可供服务。我只是使用 codeigniters 视图层,没有任何模板引擎集成,例如 smarty 等。对我来说,这最有效,因为它简单又容易。但在网络上,我看到人们对在他们的视图中使用模板引擎感到疯狂,这让我觉得我是否足够理智,可以为这样的应用程序使用 codeigniters 视图层。

到目前为止,除了在某些视图中使用一些(有时是很多)条件之外,我还没有遇到任何问题。但是,如果有人只使用了当前生产中的应用程序的 codeigniters 视图层,我很乐意听到他们的故事。我几乎已经完成了这个应用程序,如果我觉得我所做的事情足够理智,我可能会转向生产。

我已经在 SO 中看到人们建议 smarty 或 williamconcepts 模板引擎与 codeigniter 搭配使用,但我想听到的是我是否适合使用 CI 的本机视图层。

I am working on a medium sized app and i have around 30 views to serve in all. I am just using the codeigniters view layer without any template engine integration like smarty and stuff. For me this works best as its simple and easy. But all around the web i see people going cray about using template engine in their views which made me think am i sane enough to just use the codeigniters view layer for an app like this.

So far i havent run into any problems other than using some (sometimes a lot) conditionals in certain views. But if there are any one who ve used just the codeigniters view layer for apps currently in production id love to hear their story. I am almost done with this app and might move to production if i feel that wat i ve done is sane enough.

Ive already seen in SO that people suggesting smarty or williamconcepts template engine to go with codeigniter but all i wanna hear is am i good to go with the native view layer of CI.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绝對不後悔。 2024-12-08 15:42:31

如果标准的 codeigniter 视图层适合您,那么您就可以使用它。然后使用它就更明智了。

否则,您必须知道其他解决方案也有其缺点,因此,您可能只会用一个问题替换另一个问题 - 这是接近上线的疯狂

特别是如果这些建议来自您甚至不认识的人。比如:不要使用 codeigniter,而是使用 zend 框架。这不会帮助你完成任务,我想这对你来说是最重要的。

You are good to go with the standard codeigniter view layer if it does the job for you. Then it's even sane to use it.

Otherwise you must know that other solutions have their cons as well so, you might only replace one problem with another one - something which is insane close to going live.

Especially if those suggestion come from people you do not even personally know. Like: don't use codeigniter use zend framework instead. This won't help you to get things done on your end, which is most important for you I guess.

思慕 2024-12-08 15:42:31

在我看来,模板现在已经过时了……

Codeigniter 的用户指南第一页说,如果您

不想被迫学习模板语言,您可能需要 CI(尽管如果您需要的话,可以选择使用模板解析器)就我

个人而言,我发现在开发中使用模板很烦人(很久以前就使用过 smarty),它们具有不同的语法,并且无法使用调试器进行调试。

现在,正如您所问的,是的,我使用了一个非常高流量的电子商务门户,并且它在大量流量下运行没有问题。为了进一步提高响应速度,我们后来实施了 memcached,这也很有效!

In my opinion templates are old school now ...

Codeigniter's user guide first page says you may want CI if

You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).

Personally I have found using templates annoying in development (used smarty a long time back), they have a different syntax and they can't be debugged using a debugger.

Now as you asked, yes I have used a very high traffic eCommerce portal and it worked without issues for a good amount of traffic. To further improve the response we implemented memcached later which too worked like charm !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文