网络编程标准

发布于 2024-08-02 20:27:31 字数 118 浏览 5 评论 0原文

这严格来说是一个出于研究目的的意见/经验问题。

我想知道公司现在为 Web 开发人员制定了哪些编码标准? (文档格式、编码标准、文件结构等)

显然无法全部列出,但一些主要的可以给我一个想法。

This is strictly an opinion/experience question for research purposes.

I was wondering what coding standards companies have in place now for Web Developers? (Document formats, coding standards, file structures, etc.)

Obviously they all can't be listed, but some major ones would give me an idea.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

香草可樂 2024-08-09 20:27:31

我希望 Web 开发人员的公司编码标准包括 W3C 标准,但商业压力往往会鼓励任何能够完成工作的解决方案。

我很乐意在这方面被证明是错误的。

I hope that company coding standards for Web Developers include W3C standards, but commercial pressures will tend to encourage whatever solution gets the job done.

I would love to be proved wrong in this regard.

↙厌世 2024-08-09 20:27:31

万维网联盟是万维网的主要国际标准组织。

The World Wide Web Consortium is the main international standards organization for the World Wide Web.

梦里°也失望 2024-08-09 20:27:31

在我之前工作过的(大型)公司,前端工作需要遵守三个主要标准:

  1. 所有 HTML 都将遵守 HTML 4.01 严格标准,但以下例外:

    • 由于广告原因,允许使用 iframe。
    • 列表中允许使用 start 属性。
    • target="_top" 被允许用于框架破坏目的。

    这些异常被编入自定义文档类型文档中,该文档记录在 此处。所有生成的工作都应根据此文档类型进行验证。

  2. 所有 CSS 都将根据 CSS 2.1 标准进行验证,但允许使用 * 和 _ 前缀 hack。

    所有

  3. 所有 JavaScript 都应该毫无问题地通过 JSLint(严格空白绝对没有打开)。

我们还定期进行代码审查,希望这些能够让我们总结出开发人员所做的出色工作,并将其编入最佳实践。

At the previous (large) company I worked for, there were three main standards that were to adhered to for front-end work:

  1. All HTML would adhere to the HTML 4.01 Strict standards, with the following exceptions:

    • iframes were to be allowed due to advertising.
    • The start attribute was to be allowed within lists.
    • target="_top" was allowed to be used for framebreaking purposes.

    These exceptions were codified into a custom doctype document, which is documented here. All work produced was expected to validate against this doctype.

  2. All CSS would validate against the CSS 2.1 standard, with the exception that the * and _ prefix hacks were allowed to be used.

  3. All JavaScript was expected to pass through JSLint without issue (strict whitespace was absolutely not turned on).

We also ran regular code reviews with the expectation that these would allow us to pull out the good work done by our developers and codify this into best practice.

无语# 2024-08-09 20:27:31

任何严肃的 Web 开发人员都应该考虑 Web Accessibility Initiative (WAI):http://www .w3.org/WAI/

The Web Accessibility Initiative (WAI) is something to be considered as well by any serious web developer: http://www.w3.org/WAI/

热情消退 2024-08-09 20:27:31

尝试 StyleCI,它支持 PHP、JavaScript、CSS、Typescript、Less、SCSS 和 Vue.js。

您也可以根据您的编码标准配置 StyleCI,它可以自动修复您的代码。我们在很多项目中使用它。

Try StyleCI, it supports PHP, JavaScript, CSS, Typescript, Less, SCSS and Vue.js.

You can configure StyleCI to your coding standards too and it can automatically fix your code. We use it on a bunch of projects.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文