如果你讨厌 React,喜欢 HTML,那么无需构建、无需 NPM、SSR 优先的 JavaScript 框架 | Mewayz Blog 跳至主要内容
Hacker News

如果你讨厌 React,喜欢 HTML,那么无需构建、无需 NPM、SSR 优先的 JavaScript 框架

评论

8 最小阅读量

Mewayz Team

Editorial Team

Hacker News

现代网络不必要的复杂性

如果您在配置 Webpack 时感到灵魂枯萎,淹没在 node_modules 中,或者只是为了渲染一篇简单的博客文章而与水合错误搏斗,那么您并不孤单。以 React 及其构建工具为主的生态系统主导的现代 JavaScript 格局,通常感觉就像使用粒子加速器来悬挂相框。如果有一条回归简单的道路怎么办?回归 Web 的基础优势(语义 HTML、精益 CSS 和逐步增强的 JavaScript)而不牺牲用户期望的活力?这是新一波无构建、无 NPM、SSR 优先框架的承诺。它们面向热爱 HTML、重视浏览器原始功能并相信最好的运行时是已安装在每个用户设备上的开发人员。

拥抱平台:没有构建,就没有 NPM

“无建造”哲学是对理智的彻底回归。这意味着您的代码(HTML、CSS、JavaScript)是在浏览器中运行的代码。没有转译,没有捆绑步骤,最重要的是,无需等待依赖项下载和编译。您使用 ES 模块编写现代 JavaScript,浏览器会在本机处理它。这消除了整个类别的工具、配置和版本控制难题。同样,“no-NPM”并不意味着您不能使用库;而是意味着您不能使用库。这意味着您可以利用 jsDelivr 或 Skypack 等现代 CDN 直接通过浏览器端代码中的 URL 导入,或者更好的是,您会质疑是否需要那个 200kb 的库来完成一项简单的任务。其结果是更快的本地开发体验、即时的浏览器刷新以及生产包,毫不夸张地说,正是您所编写的。

“软件的复杂性应该在于它为用户提供的功能,而不是其工具链的复杂性。网络平台足够强大;我们的工作是明智地使用它。”

服务器端渲染:不是事后的想法,而是基础

SSR 优先框架彻底颠覆了现代单页应用程序 (SPA) 模型。它们不是发送一个空白的 HTML 文件和一个整体的 JavaScript 包来在客户端上呈现所有内容,而是在服务器上呈现完整的交互式 HTML。浏览器立即接收有意义的内容,这对于性能、SEO 和用户体验至关重要。然后,客户端 JavaScript 会“水合”此 HTML,附加事件侦听器以使其具有交互性。这种方法提供了静态网站的感知速度和网络应用程序的动态性。对于内容丰富的网站、管理面板或营销页面(其中快速交互时间和搜索可见性是关键),这种架构是无与伦比的。它与模块化的业务理念完美契合,在进行任何增强之前,核心内容和功能都会得到可靠的交付。

为什么这种方法会引起业务应用程序的共鸣

💡 您知道吗?

Mewayz在一个平台内替代8+种商业工具

CRM·发票·人力资源·项目·预订·电子商务·销售点·分析。永久免费套餐可用。

免费开始 →

对于商业软件来说,可靠性、可维护性和清晰的数据流至关重要。 HTML 优先、以 SSR 为中心的模型在这方面表现出色。服务器是唯一的事实来源,安全地管理状态和业务逻辑。 UI 是该状态的直接表示,以 HTML 形式交付。这创建了一个比大型 SPA 框架的反应式客户端状态同步难题更容易推理的心理模型。它对于表单较多的应用程序、仪表板和内部工具特别强大。像 Mewayz 这样的平台就明白这一点。通过提供可以与精益、专注的前端无缝集成的模块化业务操作系统,它们使团队能够在受控环境中构建复杂的业务逻辑,同时通过快速、SEO 友好且简单的界面呈现它。这种关注点分离(强大的后端模块、优雅的 HTML 前端)是可扩展、可维护的业务技术的本质。

这种范式转变的核心优势可以清晰地概括为:

出色的性能:发送到客户端的 JavaScript 最少,从而实现更快的 loa

Frequently Asked Questions

The Modern Web's Unnecessary Complexity

If you've felt your soul wither while configuring Webpack, drowning in node_modules, or wrestling with hydration errors just to render a simple blog post, you're not alone. The modern JavaScript landscape, dominated by React and its build-tool-heavy ecosystem, often feels like using a particle accelerator to hang a picture frame. What if there was a path back to simplicity? A return to the web's foundational strengths—semantic HTML, lean CSS, and progressively enhanced JavaScript—without sacrificing the dynamism users expect? This is the promise of the new wave of no-build, no-NPM, SSR-first frameworks. They are for developers who love HTML, value the raw power of the browser, and believe the best runtime is the one already installed on every user's device.

Embracing the Platform: No Build, No NPM

The "no-build" philosophy is a radical return to sanity. It means your code—HTML, CSS, JavaScript—is the code that runs in the browser. There is no transpilation, no bundling step, and crucially, no waiting for dependencies to download and compile. You write modern JavaScript with ES modules, and the browser handles it natively. This eliminates an entire category of tooling, configuration, and versioning headaches. Similarly, "no-NPM" doesn't mean you can't use libraries; it means you leverage modern CDNs like jsDelivr or Skypack to import directly via URL in your browser-side code, or better yet, you question whether you need that 200kb library for a simple task at all. The result is a faster local development experience, instantaneous browser refreshes, and a production bundle that is, quite literally, exactly what you wrote.

Server-Side Rendering: Not an Afterthought, But the Foundation

SSR-first frameworks flip the modern Single Page App (SPA) model on its head. Instead of sending a blank HTML file and a monolithic JavaScript bundle to render everything on the client, they render the full, interactive HTML on the server. The browser receives meaningful content instantly, which is crucial for performance, SEO, and user experience. Client-side JavaScript then "hydrates" this HTML, attaching event listeners to make it interactive. This approach delivers the perceived speed of static sites with the dynamism of web apps. For content-heavy sites, admin panels, or marketing pages—where fast Time-to-Interactive and search visibility are key—this architecture is unbeatable. It aligns perfectly with a modular business philosophy, where core content and functionality are delivered robustly before any enhancement occurs.

Why This Approach Resonates for Business Applications

For business software, reliability, maintainability, and clear data flow are paramount. The HTML-first, SSR-centric model excels here. The server is the single source of truth, managing state and business logic securely. The UI is a direct representation of that state, delivered as HTML. This creates a mental model that is easier to reason about than the reactive, client-state-synchronization puzzles of larger SPA frameworks. It's particularly powerful for form-heavy applications, dashboards, and internal tools. Platforms like Mewayz understand this. By providing a modular business OS that can seamlessly integrate with lean, focused frontends, they enable teams to build complex business logic in a controlled environment while presenting it through fast, SEO-friendly, and simple interfaces. This separation of concerns—robust backend modules, elegant HTML frontend—is the essence of scalable, maintainable business tech.

Finding Your Path Back to Simple Web Development

This isn't about rejecting modern web development; it's about refining it. It's a choice to prioritize the user's experience and the developer's sanity over the allure of the newest, most complex abstraction. Frameworks like Astro (with its optional interactive islands), Enhance, or even leveraging web components with server-side templating, provide this streamlined path. They ask you to start with what the web already does well—deliver documents—and layer on interactivity only where needed. When paired with a powerful and modular backend system like Mewayz, which handles the complex business operations and data integrity, you achieve a powerful synergy. You get a resilient, fast frontend that showcases your business logic, not the complexity of its construction. It's for those who remember that at its heart, the web is about content and function, delivered simply.

Streamline Your Business with Mewayz

Mewayz brings 208 business modules into one platform — CRM, invoicing, project management, and more. Join 138,000+ users who simplified their workflow.

Start Free Today →

免费试用 Mewayz

集 CRM、发票、项目、人力资源等功能于一体的平台。无需信用卡。

立即开始更智能地管理您的业务

加入 6,208+ 家企业使用 Mewayz 专业开具发票、更快收款并减少追款时间。无需信用卡。

觉得这有用吗?分享一下。

准备好付诸实践了吗?

加入6,208+家使用Mewayz的企业。永久免费计划——无需信用卡。

开始免费试用 →

准备好采取行动了吗?

立即开始您的免费Mewayz试用

一体化商业平台。无需信用卡。

免费开始 →

14 天免费试用 · 无需信用卡 · 随时取消