问题描述
我是一家公司的学生程序员,主要开发人员正在大力推动在我们的新站点中使用Dreamweaver模板,模糊的理由指出了性能优势。
I'm a student programmer for a company, and the lead developer is making a huge push to use Dreamweaver templates for our new site with vague reasoning pointing to performance benefits.
我不相信……为什么要在PHP或Javascript模板引擎上使用Dreamweaver模板?尤其是因为我们仍在使用LAMP堆栈来提取动态内容。
I'm not convinced…why would one use Dreamweaver templates over a PHP or a Javascript template engine? Especially since we're still using a LAMP stack for pulling in dynamic content.
因此:对于我们的网站页面使用Dreamweaver模板有什么好处,为什么是通过PHP还是Java脚本使用它们?
So: What are the benefits of using Dreamweaver templates for our site pages, and why would one use them over PHP or Javascript?
推荐答案
如果您要构建纯静态的网站且没有交互作用,则可以使用DW模板以下链接。该模板将允许您更改页面布局,并且所有页面都将更新以反映所做的更改。但是,您将必须重新上传使用该模板的每个页面。
You'd use DW templates if you were building a purely static website with no interaction beyond following links. The template will allow you to make changes to the page layout, and all your pages will be updated to reflect the changes you made. You will have to reupload every page that uses the template in question, however.
一旦您需要比简单导航更多的交互性,或者需要显示随时间变化的数据,那么您已经超出了DW模板可以合理使用的范围。做。到了那个阶段,您将需要某种服务器端脚本语言(PHP,Perl,Python,以P开头的东西:))
As soon as you need more interactivity than simple navigation, or need to present data that changes over time, you've gone beyond the scope of what a DW template can reasonably do. When you get to that stage, you'll need some kind of server-side scripting language (PHP, Perl, Python, something beginning with P :) )
就像管理层中的某人一样,他听说DW有模板,并且在不真正了解模板真正是什么的情况下就牢牢抓住了这个想法。可以争论的是,它们可以在某些情况下提高性能(例如,非脚本化的网页将比PHP脚本消耗更少的服务器资源来运行),但它们实际上并不适合维护大型网站,尤其是如果所述站点需要比DW模板所提供的更多的交互性/数据表示。
It sounds awfully like someone in management has heard that DW has templates and has latched onto that idea without really understanding what templates really are. Whilst it can be argued that they can improve performance in certain circumstances (a non-scripted web page will consume fewer server resources to run than a PHP script, for example), they aren't really suited to maintaining big sites, especially not if said sites require more interactivity/data presentation than DW templates can offer.
这篇关于为什么要在PHP或Javascript上使用Dreamweaver模板进行模板制作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!