If I am using CAKEphp do I need to use smartytemplates too?
If I am using CAKEp开发者_如何学Chp do I need to use smartytemplates too?
No.
Cake has its "own" templating system which uses .ctp
files, which are just straight HTML/PHP files.
You can integrate pretty much anything with Cake, including Smarty. When I first started, I thought about doing it and my advice is don't. You just don't need to. Cake's own templating system is fully featured and comes with a lot of helpers, integration, convention etc. (not to mention online wisdom).
Having another template system will only make life complicated. Apart from that, think of the practicalities of pushing two codebases around, maintaining them and wearing different hats depending on which part you're working on.
CakePHP is delivered with all you need to build most web applications.
Not necessary. The smarty templates are optional, if you wish you can use them or leave them.
精彩评论