jQuery Template Engine
According to this question, what are jQuery template engines?
What are the benef开发者_JAVA百科its and advantages of using them?
According to this post: http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx
Client-side templates enable jQuery developers to easily generate and render HTML UI on the client. Templates support a simple syntax that enables either developers or designers to declaratively specify the HTML they want to generate. Developers can then programmatically invoke the templates on the client, and pass JavaScript objects to them to make the content rendered completely data driven. These JavaScript objects can optionally be based on data retrieved from a server.
The benefits of using them is that you can seperate your logic (Main UI and controls) and code reuse. The latter being the bigger advantage IMO. As for disadvantages, well... maybe learning curve? Or excess free-time? Both are inherent disadvantages (if you don't like to be productive)
精彩评论