2020 and beyond Angular-- the pros and cons and future development

The full text 2255 words, when learning is expected to grow 7 Fenzhong

Figure source: Unsplash

 

Angular function as a very complete front-end framework, was first created by MiskoHevery et al., 2009, was acquired by Google formula, for its merchandise.

 

Angular based TypeScript, providing a convenient way to develop Web applications through enhancement of HTML.

It has many features, the most central is: MVC (Model-view-controller), the modular, automated two-way data binding, semantic tags, dependency injection, and so on.

 

This article, the small core will introduce changes introduced and lessons learned in 2020 and beyond, Angular will happen in the future everyone.

 

Figure source: Unsplash

 

We will talk about "advantage Angular in which it will change anything, where fortunately Angular than React" and other issues together.

 

The main focus in the future Angular and changes will occur.

 

Normally, you would browse Angular repository on GitHub to understand it. This is a great site, you can keep abreast Angular code changes and added functionality, you can also check the problem, and calls attention to the use of Angular project.

 

 

Angular need to improve deficiencies

 

Angular biggest problem is to use it to build applications is relatively large, which means that a lot of the project file. This happens because the package contains JavaScript, there Angular CLI. If these bundles and create React application bundle obtained by comparing the Angular larger applications.

 

In the process of running you will not find any difference. Angular runtime performance is quite good, but the application is relatively large (even for simple applications), load time may be longer.

 

其次,Angular应用程序可能非常复杂。Angular是一个完整的框架,不仅如此,它还是全面的功能和工具平台。这意味着学习Angular比学习React更具挑战性。使用React,便只专注于构建与系统用例相关的组件。后来,React添加了一些新功能,但其核心是基于构建组件。Angular中已经存在部分涉及全局状态管理、服务和依赖项注入,但在React中却不存在。对于HTTP或AJAX请求,React需要一个单独的库,但该库已内置在Angular中。路由也是一样的。

 

这就是为什么与React和Vue JS相比,Angular学起来颇具挑战性,因为它存在更多内置关系,这与应用程序也有关。

当然,纵使具有挑战性,这也是一项巨大的优势,因为Angular关系始终是内置的,可以依赖其存在的功能,并且性能很棒。开发Angular核心的团队还从事诸如表单验证和路由之类的工作,因此可以依靠框架的这些部分来更新,遵循最佳实践,并与Angular的版本兼容。对于React中使用的第三方应用程序,这一点无法做到。如果使用路由库,则可能未将其更新为最新版本的React,或者可能不支持React的所有功能。将第三方库更新到相同级别需要一些时间。

图源:Unsplash

 

 

Angular的闪光点

 

Angular内部具有更多的依赖项和组件,因此无论你的项目是什么,Angular都可以满足要求。这是它的最大优势。而且许多功能可供选择:一套清晰的规则、明确的语法和类型脚本,以便完成最佳操作。此外,还有明确定义的样式指南以及大量资源和教程,用来学习Angular。

 

新版本的Angular每半年发布一次。这并不意味着一切都会改变,但是框架会缓慢发展,这就是Angular更新的核心。每次更新都完全与之前兼容,并且自Angular2的第一次发布以来,仅发生了较小的更改,例如API的细微更改。不激进但持续的改进是件好事。

 

在Angular网站上,有一篇题为《版本8.0和IVY的计划》(A planfor version 8.0 and IVY)的博客文章,介绍了版本8和未来计划。该文值得一读,它提供了Opt-in-Ivy的预览。Ivy是内部Angular Renderer(渲染器),这是一个实体引擎,它接受指令并将其转换为DOM。它是隐藏的,并且不会改变使用Angular的方式。

 

使用Angular时,会拥有小型高性能的应用程序。未来,2020年及以后,它将以不同的方式加载现代JavaScript,预览Opt-in Ivy,并且angular团队正在实施Bazel,这是Google在Angular CLI中开发的编译工具,它还有助于改善文件大小,产出更小的捆绑包。对于整体增强开发人员总体开发体验而言,这可能是更快的构建过程。不久将可用。

 

这些应用程序将更小,由此摆脱了上述不足之处。它们的优势有:众多功能、清晰的语法和结构。然后,可以获得小型高性能的应用程序。同样,Angular团队的目标是避免大幅的API更改,当然,他们也发现了一些创建组件的替代方法。也许,使用IVY摆脱NG模块是可行的,因此可以只关注组件。

 

图源:Unsplash

 

当前的Angular已经相当不错了,广受欢迎且运行良好。

 

相信在未来,这些应用程序会越来越多,为大家提供更多便利。

留言 点赞 关注

我们一起分享AI学习与发展的干货
欢迎关注全平台AI垂类自媒体 “读芯术”

(添加小编微信:dxsxbb,加入读者圈,一起讨论最新鲜的人工智能科技哦~)

发布了699 篇原创文章 · 获赞 2365 · 访问量 31万+

Guess you like

Origin blog.csdn.net/duxinshuxiaobian/article/details/103954497