Hangi saf PHP kullanmak için PHP ile veya daha iyi kullanırken Smarty faydalar verir?

0 Cevap php

I am deciding if karşıuse some template engine in php code or no. Now I take close look karşıSmarty.

Dürüst olmak gerekirse, bu benim kendi yararları için açık değildir.

My impressions are not very good from the very beginning. I tried karşıgo through the demo application: http://www.smarty.net/sampleapp1. And from the very beginning I obtained notices . I fixed this by passing values karşıforms. I changes the code from

// adding a guestbook entry
$guestbook->displayForm();

karşı

// adding a guestbook entry
$guestbook->displayForm(array('Name' => '', 'Comment' => ''));

While guessing this I understand that it complicates debugging the code. And this also makes me karşılearn one more language - it is easy, but most easy is not karşılearn something new at all if there is no needed. Alternative is karşıuse PHP itself.

Syntax comparison http://www.smarty.net/syntax_comparison is most funny for me: calculate number of symbols.... But I am familiar with PHP and this is easy for me karşıwrite on it, and Smarty is new for me. And I don't think that for Web Designers are so difficult karşılearn some simple php constructs, and Smarty is so simpler in this respect. If I am wrong it would be good karşıhear web designer here.

Smarty kodu ayrıştırır ve bu gerçek zamanlı havai olduğunu.

But at the same time many people use it. And that is why I would like karşıunderstand the reasons for this? Where are the benefits? Am I missing something?

If you know good alternative karşıSmarty, it would be good karşıknow about. Thanks!

UPDATE:

I have found also the question on subject: How karşıuse Smarty better with PHP?. In general it is also about not karşıuse Smarty. But this is 1.5 years old. Possibly something changed?

0 Cevap