3个被低估的javascript框架

When we think about JavaScript-based frameworks, a few names come to mind instantly. Angular, React, and Vue are certainly among those names. If you search for anything related to JavaScript, those frameworks are ranked at the top. That’s fair because they’re well established and have huge communities behind them. But today, I’m not going to talk about those frameworks. In this article, I’m going to discuss three underrated JavaScript frameworks and their features.

当我们想到基于JavaScript的框架时,马上就会想到一些名字。 Angular,React和Vue当然是这些名称之一。 如果您搜索与JavaScript相关的任何内容,则这些框架将排名最高。 这是公平的,因为他们已经建立并拥有庞大的社区。 但是今天,我将不讨论那些框架。 在本文中,我将讨论三个被低估JavaScript框架及其功能。

1.苗条 (1. Svelte)

Image for post
Screenshot by author: https://2019.stateofjs.com/front-end-frameworks/svelte/
作者截图: https//2019.stateofjs.com/front-end-frameworks/svelte/

Svelte is a JavaScript-based open-source framework that was introduced in 2016. It’s written in TypeScript and can be identified as a real threat to React.

Svelte是于2016年引入的基于JavaScript的开源框架。它是用TypeScript编写的,可以识别为对React的真正威胁。

Svelte is different from React and Vue. It doesn't have a virtual DOM — instead, it allows you to develop boilerplate-free components in simple HTML, CSS, and JavaScript code. When it comes to code compilation, Svelte compiles the code into small, framework-free, vanilla JavaScript modules at build time and surgically updates the DOM when the state changes. Thanks to this unique process, Svelte has become lightning-fast and now provides the best performance.

Svelte与React和Vue不同。 它没有虚拟DOM-相反,它允许您使用简单HTML,CSS和JavaScript代码开发无样板的组件。 关于代码编译,Svelte在构建时将代码编译为小型,无框架的原始JavaScript模块,并在状态更改时通过外科方式更新DOM。 由于这种独特的Craft.io,Svelte变得闪电般迅捷,现在提供了最佳性能。

Card.svelte的优点 (Advantages of Svelte)

  • Less boilerplate

    更少的样板
  • No virtual DOM

    没有虚拟DOM
  • No state management libraries

    没有状态管理库
  • Component-based model

    基于组件的模型
  • Lightning speed and performance

    闪电般的速度和性能
  • SEO support

    SEO支持
  • Easy learning curve

    易学曲线
  • Can create your own infrastructure

    可以创建自己的基础架构

Card.svelte的缺点 (Disadvantages of Svelte)

  • Lack of community base and resources

    缺乏社区基础和资源
  • Lack of tooling and third-party libraries

    缺少工具和第三方库
  • Difficult to scale in some cases

    在某些情况下难以扩展
  • Closer to vanilla JavaScript

    更接近原始JavaScript

If we compare those pros and cons, it is clear that we can almost neglect those disadvantages to some degree and make maximum use of its advantages. I feel that Svelte has been overshadowed by major frameworks — it deserves more recognition. So If you like to make a change and teste new things, take a chance on this little pocket rocket.

如果我们比较那些利弊,很明显,我们几乎可以在某种程度上忽略这些缺点,并最大程度地利用其优点。 我觉得Svelte已被主要框架所笼罩-它值得更多的认可。 因此,如果您想进行更改并尝试新事物,请抓住这个小型袖珍火箭的机会。

2.灰烬 (2. Ember)

Image for post
Screenshot by author: https://2019.stateofjs.com/front-end-frameworks/ember/
作者截图: https : //2019.stateofjs.com/front-end-frameworks/ember/

Ember is another significant JavaScript framework which is also underrated by most of the developers. Although this was initially released in 2011 and it is older than Angular, React, or Vue, it hasn't been able to make its arrival stable. Ember is based on the Model-View-View-Model (MVVM) architecture pattern and it is specialized for scalable enterprise-level single page application.

Ember是另一个重要JavaScript框架,大多数开发人员也对其低估了。 尽管此版本最初于2011年发布,并且比Angular,React或Vue还要老,但它无法使其稳定到达。 Ember基于模型-视图-视图-模型(MVVM)架构模式,并且专门用于可伸缩的企业级单页应用程序。

灰烬的优点: (Advantages of Ember:)

  • Ember Command-line interface

    Ember命令行界面
  • Convention over Configuration approach.

    约定优于配置方法。
  • Nested UIs

    嵌套的UI
  • Provides a stronger data layer

    提供更强大的数据层
  • Can work with a larger application ecosystem

    可以与更大的应用程序生态系统一起工作
  • Performance focused

    注重绩效
  • Rich documentation and API support

    丰富的文档和API支持
  • Supports two-way data binding

    支持双向数据绑定

灰烬的缺点: (Disadvantages of Ember:)

  • Steep learning curve

    陡峭的学习曲线
  • One of the heaviest frameworks

    最重的框架之一
  • Some documentation and examples may outdated

    一些文档和示例可能已过时
  • Highly opinionated

    高度自以为是

Although Ember is a powerhouse, using it for smaller projects might not be the ideal approach. If you are planning on large, scalable projects, Ember JS can be a good option for you.

尽管Ember是强大的力量,但将其用于较小的项目可能不是理想的方法。 如果您打算进行大型,可扩展的项目,那么Ember JS可能是您的理想选择。

3.预言 (3. Preact)

Image for post
Screenshot by author: https://2019.stateofjs.com/front-end-frameworks/preact/
作者截图: https : //2019.stateofjs.com/front-end-frameworks/preact/

Preact is something completely different from Ember. Preact was initially released in 2013 and this framework is lightweight by its means. But being lightweight hasn't limited its performance; it is considered as a very powerful framework and another great competitor to React, as well. Preact is also built based on a Component-based approach with virtual DOM like React and it can even use React packages without any issues. Although it is similar to React, it doesn't contain all the features of React. Preact developers have mainly focused on its size and performance while keeping some major features from React.

Preact与Ember完全不同。 Preact最初于2013年发布,其框架轻巧。 但是轻量级并不限制其性能。 它被认为是一个非常强大的框架,也是React的另一个强大竞争对手。 Preact也是基于基于组件的方法以及类似React的虚拟DOM构建的,它甚至可以毫无问题地使用React包。 尽管它与React类似,但并不包含React的所有功能。 Preact开发人员主要关注其大小和性能,同时保留了React的一些主要功能。

Preact的优点: (Advantages of Preact:)

  • Preact contains more features than React-lite

    Preact比React-lite包含更多功能
  • Small in size

    体积小
  • Portable

    随身携带
  • High performance

    高性能
  • Compatible with React libraries

    与React库兼容
  • Contains good documentation and examples

    包含良好的文档和示例

Preact JS的缺点: (Disadvantages of Preact JS:)

  • React propTypes are not supported

    不支持React propTypes

  • Only supports stateless functional components and ES6 class-based component

    仅支持无状态功能组件和基于ES6类的组件
  • Small community

    小社区

统计永不说谎 (Stats Never Lie)

Since now you have an understanding of the three frameworks, let's look into some statistics of JavaScript frameworks to see where we can see Svelte, Ember, and Preact ranked.

从现在开始,您已经了解了这三个框架,让我们研究一下JavaScript框架的一些统计数据,看看在哪里可以看到Svelte,Ember和Preact的排名。

Let’s look into the analysis done by the 2019 State of JavaScript. This report includes various aspects of frameworks including their popularity, awareness, satisfaction, ranking, etc. The below diagram shows the awareness about Angular, Vue, React, Ember, Svelte, and Preact.

让我们看一下2019年JavaScript状态所做的分析。 该报告包括框架的各个方面,包括其受欢迎程度,知名度,满意度,排名等。下图显示了对Angular,Vue,React,Ember,Svelte和Preact的认识。

Image for post
https://2019.stateofjs.com/front-end-frameworks/ https ://2019.stateofjs.com/front-end-frameworks/
Image for post
https://2019.stateofjs.com/front-end-frameworks/ https ://2019.stateofjs.com/front-end-frameworks/

As you can see in the first graph, awareness about Ember, Preact, and Svelte is much lower than React, Angular, and Vue. The second graph emphasizes the output of the first graph, as we can observe the large percentage of the people who have participated in this survey haven’t even heard about those three frameworks, and the percentage of the not interested population is also higher.

如您在第一张图中所看到的,对Ember,Preact和Svelte的了解远低于React,Angular和Vue。 第二张图强调了第一张图的输出,因为我们可以观察到参与调查的人中有很大一部分甚至没有听说过这三个框架,并且不感兴趣的人群所占的百分比也更高。

So, these stats re-state the facts that I have mentioned in the first half of the article. In conclusion, I must say that these three frameworks provide some great features, and sometimes one of these can be the best solution for your application. If you are a person who tries new things, give them a shot. Also, if you have used them, please let us know your thoughts in the response section as well. Thank you.

因此,这些统计数据重新陈述了我在本文上半部分提到的事实。 最后,我必须说这三个框架提供了一些很棒的功能,有时其中之一可能是您的应用程序的最佳解决方案。 如果您是尝试新事物的人,请给他们试一试。 另外,如果您使用过它们,也请在回复部分中让我们知道您的想法。 谢谢。

翻译自: https://medium.com/better-programming/3-underrated-javascript-frameworks-6827c931293f

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值