Django Book 翻译
菜单>:
TOC
返回
原文:
A key advantage of such an approach is that components are *loosely coupled* . That is, each distinct piece of a Django-powered Web application has a single key purpose and can be changed independently without affecting the other pieces. For example, a developer can change the URL for a given part of the application without affecting the underlying implementation. A designer can change a pages HTML without having to touch the Python code that renders it. A database administrator can rename a database table and specify the change in a single place, rather than having to search and replace through a dozen files.
翻译:
这种设计模式关键的优势在于各种组件都是 *松散结合* 的。这样,每个由 Django驱动 的Web应用都有着明确的目的,并且可独立更改而不影响到其它的部分。比如,开发者 更改一个应用程序中的 URL 而不用影响到这个程序底层的实现。设计师可以改变 HTML 页面 的样式而不用接触 Python 代码。数据库管理员可以重新命名数据表并且只需更改一个地方,无需从一大堆文件中进行查找和替换。
备注:
译者: