开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
今日推荐开源项目:《创心 14th》
今日推荐英文原文:《Angular in 2020 and Beyond》
开源日报第652期:《创心 14th》
今日推荐开源项目:《创心 14th》传送门:GitHub链接
推荐理由:这个项目是第十四届 D2 前端技术论坛中所用到的 PPT 合集。这次的内容包含了基础的语言框架,工程化和最近热门的无服务和微前端等,如果想要回顾这次会议的话自然是不容错过,对下次会议感兴趣的话也可以就此开始了解,毕竟那个乐队看起来还有点帅。
开源日报第652期:《创心 14th》
今日推荐英文原文:《Angular in 2020 and Beyond》作者:Kalhara Perera
原文链接:https://medium.com/better-programming/angular-in-2020-and-beyond-b2e98543ef17
推荐理由:三大家族之一的未来发展

Angular in 2020 and Beyond

Pros, cons, and what will be next

First, let’s talk about what the benefits of Angular are, what will change, and is Angular better than React?

I’m mainly focusing on Angular’s future and what will change. Normally, to learn about Angular, I browse their repository on GitHub, which you can visit here. This is a great place to keep updated about what they’re changing in their code and which features they’re adding. You can also check for issues and be aware of them when using Angular for projects.

Weaknesses Where Angular Needs Improvement

Angular’s biggest problem is that the apps you build with it are relatively large. That means the project has a high file size. That happens because of the JavaScript bundles within them, which are because of the Angular CLI. If you compare these bundles split with the bundles you get by creating a React app, the Angular app is bigger.

At runtime, you won’t find any difference. Runtime performance is pretty good, but the loading can take longer because the app is relatively big, even for simple apps.

Secondly, the Angular app can be very complex. Angular is a complete framework. Not only that, but it is also a complete platform of features and tools. And that means learning Angular can be a bit more challenging than learning React. With React, you focus only on building components that are related to the use-case of the system. Later, React added some new features, but its core is based on building components. It’s only partly about global state management, services, and dependency injection, which we have in Angular but don’t exist in React. For an HTTP or AJAX request, you need a separate library for React, but it’s built into Angular. Routing is also the same.

This is why, when compared to React and Vue JS, Angular is a bit challenging to learn because it has more relationships built in. This also relates to the apps. That, of course, can be challenging, but this is also a huge strength because, since this is always built in, you can always rely on the features to exist, and they will perform really well. Since the same team that develops Angular’s core also works on things like form validation and routing, you can rely on these parts of the framework being up to date, following best practices, and being compatible with versions of Angular. That’s not something you can do with third-party apps used in React. If you use a routing library, it might not be updated to the latest version of React, or it might not support all the features of React. It will take some time to update third-party libraries to the same level.

Strengths Where Angular Shines

Since angular has more dependencies and components built inside, no matter what your project is, Angular has you covered. This is its biggest strength. You have many features to choose from. You have a clear set of rules, clear syntax, and typescripts to follow good practices. You have a clearly defined style guide and tons of resources and tutorials to learn Angular.

A new version of Angular is released every six months. That doesn’t mean everything changes, but the framework slowly evolves over time. That’s the core of these Angular updates. Every update is fully backward compatible, and since the first release of Angular 2, only smaller changes have happened, like small API changes. Slow but constant improvement is always good.

In the angular website, they have a blog post called “A plan for version 8.0 and IVY,” explaining their plans for version 8 and the future. This is worth reading, and it gives a preview of Opt-in-Ivy. Ivy is an internal Angular Renderer. A Renderer is an entity engine that takes your instructions and converts to DOM. Render is hidden, and that doesn’t change the way you can work with Angular.

When you work with Angular, you have small and high-performance apps. In the future, like 2020 and beyond, it will come with differential loading of modern JavaScript, Opt-in Ivy preview, and the angular team is working on implementing Bazel, which is a compiling tool developed by Google in the Angular CLI, which should also help with improving file size, producing smaller bundles, and may be a faster building process for an overall enhanced general developer experience. That will be available soon.

They will have smaller applications and therefore get rid of these weaknesses. Instead, they’ll have strengths: a lot of features, clear syntax, and structure. Then you have small and high-performance apps. And again, Angular team’s goal is to avert drastic API changes, but again, of course, they can see some alternative ways of creating components. And maybe, by getting rid of NG modules with IVY, that might be possible, so we could just focus on components.

Therefore, the present of Angular is already pretty good, and it’s very popular and works well. The apps are getting a bit bigger, but that’s not a big issue.
下载开源日报APP:https://openingsource.org/2579/
加入我们:https://openingsource.org/about/join/
关注我们:https://openingsource.org/about/love/