纯净版网页开发 – 摆脱框架的指南
Plain Vanilla Web

原始链接: https://plainvanillaweb.com/index.html

“纯香草” (Plain Vanilla) 方法提倡仅使用核心Web技术:HTML、CSS和JavaScript构建Web项目,无需框架或构建工具。它利用Web Components实现模块化(类似React或Vue组件),使用现代CSS进行样式设计(而不是预处理器),并使用标准浏览器功能实现应用程序逻辑。 这种方法优先考虑简单性和长期可维护性,而不是框架提供的速度和便利性。它认为现代浏览器已经发展到可以使用原生代码实现许多框架功能的程度,从而减少了工具开销和维护工作。虽然框架对于快速开发非常有价值,“纯香草”方法为那些将简单性和零维护作为首要任务的项目提供了一种替代方案。它专注于使用Web Components进行内容组合,利用现代CSS功能,并探索如何使用标准Web技术创建可部署的Web项目,甚至是单页应用程序。

Hacker News 的讨论围绕着“纯原生 Web”(Plain Vanilla Web)的概念展开,提倡仅使用 HTML、CSS 和 JavaScript 进行 Web 开发,摒弃各种框架。许多评论者辩论了这种方法与使用 React 等框架(尤其是在 B2B SaaS 中)的优缺点。 “原生”方法的支持者强调其简单性、性能和降低的长期维护成本,尤其对于简单的网站或内部工具而言。他们还指出,对于客户配置,Excel 文件实际上可能是一种 surprisingly good 的方法,而不是花费大量时间构建 Web 应用的管理面板。一些人还提到了拥有内容和摆脱复杂技术的重要性。 另一些人认为,框架可以提高开发人员的生产力、代码组织以及对复杂 Web 应用至关重要的反应性和状态管理等功能。关于仅使用 HTML 和少量 JS 是否可以构建功能齐全的网站,存在相当大的分歧,许多人认为开发人员的技能比工具更重要。一些人还指出了“轻量级框架”的实用性。 讨论还涉及 Web Components、可访问性和简单性和可扩展性之间的权衡。总的来说,评论强调了理解项目需求和为工作选择正确工具的重要性。
相关文章
  • Plain:一个使用 Python 构建产品的 Web 框架 2025-03-29
  • (评论) 2025-03-29
  • (评论) 2024-02-08
  • (评论) 2023-12-03
  • (评论) 2024-08-18

  • 原文
    Plain Vanilla

    An explainer for doing web development using only vanilla techniques. No tools, no frameworks — just HTML, CSS, and JavaScript.

    About this site

    This is an overview of the major techniques used to make web sites and web applications without making use of build tools or frameworks, with just an editor, a browser, and web standards.

    Specifically, that means these topics:

    Components
    The use of Web Components as the basic building block for making higher-level primitives out of plain HTML, JavaScript and CSS, replacing the components approach from frameworks like React or Vue.
    Styling
    Fully leveraging the abilities of modern CSS to replace the conveniences of CSS Modules, PostCSS, or SASS.
    Sites
    Making a web project based on web components and deploying it for production without involving build tools, frameworks or server-side logic.
    Applications
    How to build single-page web applications with vanilla techniques, how to do routing, and how to manage state.

    This tutorial is meant for those who already know their way around HTML, CSS and JavaScript. If you're just starting out learning web development and are looking for resources to get going, then this is not the site for you yet. You can get started at The Odin Project Foundations Course or the MDN Learn web development learning path.

    Wait, but why

    Modern web development frameworks are powerful in their ability to develop rich well-structured web applications quickly, and for this reason alone they are well worth your time to learn. However, this rich functionality comes at the cost of framework and tooling complexity, and the resulting projects often require regular maintenance to keep secure and up to date.

    The plain vanilla style of web development makes a different choice, trading off a few short term comforts for long term benefits like simplicity and being effectively zero-maintenance. This approach is made possible by today's browser landscape, which offers excellent web standards support.


    Up next

    Learn about using Web Components as the way to compose content, style and behavior.

    联系我们 contact @ memedata.com