如何在不使用像 React 这样的框架的情况下构建大型前端应用程序?

5作者: thepianodan大约 1 个月前原帖
当我得知Obsidian是在没有任何前端JS框架的情况下构建时,我感到非常震惊。(https://forum.obsidian.md/t/what-framework-did-the-developer-use-to-create-obsidian-desktop-application/30724/11) 我能看到其中的好处。 JS框架发展得非常迅速,当我们在进行一个大型、长期的项目时,若在短短几年内引入重大破坏性变更,实在令人沮丧。坚持使用发展较慢的网络标准(这些标准现在已经相当成熟)可以延长项目的生命周期。 而且,稳定性也意味着我们可以花更多时间在交付功能上,而不是修复兼容性问题。 还有独立性的好处。项目的成功不依赖于框架的成功。这也使得项目在面对供应链攻击等威胁时更加安全。 由于没有框架的“抽象层”,你对项目的控制力更强,可以在更低的层面进行性能优化。 我觉得不使用框架甚至可以让我们成为更好的开发者,因为我们对发生的事情了解得更多。 使用框架也有其好处,我并不是在挑战这一点。 但这种不使用框架的替代方案似乎很少被提及。我想了解更多关于如何构建大型(最好是基于网络的)软件项目的方法,尤其是依赖较少的项目。 你有什么建议可以让我更深入了解吗?你知道有哪些以这种方式构建的开源项目吗?它们需要是大型、复杂、类似应用程序的,并且基于浏览器。我对前端方面更感兴趣。 谢谢!
查看原文
I had a mind-blown-moment when I learnt that Obsidian was built without any frontend JS framework. ( https:&#x2F;&#x2F;forum.obsidian.md&#x2F;t&#x2F;what-framework-did-the-developer-use-to-create-obsidian-desktop-application&#x2F;30724&#x2F;11 )<p>The benefits, I can see.<p><pre><code> JS frameworks move really quickly, and when we&#x27;re working on a large, long-term project, it sucks when big breaking changes are introduced after only a couple of years. Sticking to slow-moving web standards (which are quite mature by now) increases the longevity of a project. And the stability also means that more time is spent on delivering features, rather than on fixing compatibility issues. There is also the benefit of independence. The project&#x27;s success is not tied to the framework&#x27;s success. And it also makes the project more secure, from supply chain attacks and such. Because there is no &quot;abstraction layer&quot; of a framework, you also have greater control over your project, and can make performance optimizations at a lower level. I feel not using a framework can even make us a better developer. Because we know more of what&#x27;s going on. </code></pre> There are benefits to using frameworks too, I&#x27;m not here to challenge that.<p>But this alternative of using none... it seems rarely talked about. I want to learn more about building large (preferably web-based) software projects with few dependencies.<p>Do you have any suggestions on how to learn more about it? Are there any open source projects you know which are built this way? It needs to be large, complex, app-like, and browser based. I&#x27;m more interested in the frontend side.<p>Thank you!