Why would one use Dreamweaver Templates over PHP or Javascript for templating?

跟風遠走 提交于 2019-12-13 15:22:48

问题


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.

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.

So: What are the benefits of using Dreamweaver templates for our site pages, and why would one use them over PHP or Javascript?


回答1:


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.

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 :) )

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.




回答2:


Dreamweaver templates are just unusable for the dynamic site. You can't, for example, create a template to print out 10 recent news titles. You need some server-side engine for this.

JS is not the way to go too.



来源:https://stackoverflow.com/questions/7301576/why-would-one-use-dreamweaver-templates-over-php-or-javascript-for-templating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!