“基于配置的公约"的好处是:范例 [英] Benefits of the "Convention over Configuration" paradigm

查看:82
本文介绍了“基于配置的公约"的好处是:范例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Web开发中配置公约"范式有哪些好处?还有在某些情况下坚持使用没有意义吗?

What are the benefits of the "Convention over Configuration" paradigm in web development? And are there cases where sticking with it don't make sense?

谢谢

推荐答案

公约规定,90%的时间是某种方式.当您偏离该约定时,您可以进行更改...与强迫每个用户理解每个配置参数相反.这个想法是,如果您需要它与众不同,那么您将在那个时间点进行搜索,而不是试图将其缠绕在所有配置参数上,而这通常并没有实际价值.

Convention states that 90% of the time it will be a certain way. When you deviate from that convention then you can make changes...versus forcing each and every user to understand each and every configuration parameter. The idea is that if you need it to differ you will search it out at that point in time versus trying to wrap your head around all the configuration parameters when it often times has no real value.

恕我直言,这总是有道理的.使约定优先于显式配置是理想的.同样,如果有人担心,他们将强迫自己调查需求.

IMHO it always makes sense. Making convention the priority over explicit configuration is ideal. Again if someone has a concern, they will force themselves to investigate the need.

这篇关于“基于配置的公约"的好处是:范例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆