开发者

What the benefit of using taglib?

I am going to use Spring Web MVC Framework on Netbeans. Writing Web user interface do I really need to use taglib or can I aim the same functionality wit开发者_开发百科h XHTML? Is there any good reason for using taglib? Best regards


You could also use a templating engine like FreeMarker or Velocity. If you wish to not go down a JSP route. Although the Spring tags are pretty good as well.


Taglibs simply equals code re-use that complies with the Don't Repeat Yourself principle.


Use a taglib when you have view logic that would be too difficult or impossible to code using JSTL, and you don't want to use scriptlets (Java embedded in the page). Unfortunately writing a taglib is fairly complex so in practice it's only done when really needed.

Oh yeah, and of course DRY :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜