I know it might sound stupid, but does it really worth using HTML / JavaScript helpers? I mean CHtml, Zii and other classes.
I understand that it’s shorter (and maybe for some, it’s also easier) to write code with these helpers, but I think it has some disadventages as well:
-
not sure if it’s “good” to write PHP code in view, so instead of CHtml instances it might be preferable to write pure HTML.
-
AFAIK Yii doesn’t support HTML5 yet, so if for example I want to generate a form with Yii’s helpers it won’t be valid HTML5.
-
New version of jQuery is always coming out which means that if we use Yii’s helpers we don’t necessarily use the latest one.
-
We "have to" study how to use these helpers. While most people knows how to write pure HTML and jQuery code, we have to learn how to use these functions.
AFAIK Zend is also not going to have jQuery helpers in ZF2 for some reason while they used to have it (ZendX jQuery) in previous versions.
My question is, what’s the point of using these helpers? Is it that it’s easier and quicker to use (once you got to learn them) or are there any more adventages?