随着互联网产品规模的不断扩大,前端脚本代码规模大、重用性低、维护困难、扩展性差等问题不断涌现。为此,本文分析了目前主流的Web模板技术及各自的优缺点,并结合国内测览器的兼容性,在Livingtemplate技术思想的基础上,提出一种基于数据驱动的动态Web模板技术方案(DWTT),它能有效提高前端开发效率和代码复用性,降低程序扩展和维护的复杂度。
With the continuous expansion of Internet Web products, such problems as large scale, low reusability, difficulty in organizing and maintaining, poor expansibility and so on are emerging in the front-end script codes. So this paper studies the current mainstream Web template technologies and analyzes their merits and demerits. In light of the compatibility of domestic browsers, a data-driven dynamic Web template technology named as DWTT is put forward based on the thoughts of Living template technology. DWTT can improve the front-end development efficiency and code reusability, and reduce the complexity of program extension and maintenance.