@gin 不翻墙能访问啊?
大漠穷秋 发布的帖子
Angular官方做了一个问卷,期望开发者们来表达一下自己的心声,让Angular在2018年获得更大的进展。
呼吁中文开发者们也来表达(吐槽)一下吧,是时候告诉核心团队有一些东西真的很恶心了!
问卷在这里(墙?):https://google.qualtrics.com/jfe/form/SV_9zf3lfLkJSaVlVH
原文在此:https://blog.angular.io/angular-developer-survey-2018-f3d09d31d495
我刚才发的那一篇工具你看看,那个更厉害了,直接给一个github路径,它自己就能把项目跑起来,还能自动同步,这样基本上就可以让开发团队摆脱NodeJS环境导致的大量问题了。
这个厉害了!
如果能把前端开发环境都移到云端去,生产力能提升非常多。
因为目前NodeJS这套环境真的太操蛋了,无论哪个框架,NodeJS的开发环境都烦死人。
StackBlitz 团队最近发布了一款工具,让开发者可以直接在浏览器里面编写、运行 Angular CLI 项目,无需在你本地安装繁琐的NodeJS环境了!
来看动图:
这个工具的特色有:
- 你只要输入项目的github地址,它就可以自动打开你的项目代码,格式是:stackblitz.com/github/{GH_USERNAME}/{REPO_NAME}
- 如果你commit了代码,编辑器自己会自动同步。
- 瞬间启动,你不需要再在本地安装NodeJS环境了,服务器会自动帮你搞定,服务器的性能你懂的,这应该算是“云端开发”了吧?
以下是几个实例,你自己点开试试手感:
- https://stackblitz.com/github/aveferrum/angular-material-demo
- https://stackblitz.com/github/gothinkster/angular-realworld-example-app
StackBlitz 目前已经支持 React、Angular 和 Ionic,关于它的更多介绍请看这里:https://medium.com/@ericsimons/stackblitz-online-vs-code-ide-for-angular-react-7d09348497f4
小编的话: 对于前端开发来说,有这样的神器真的是个大福利,摆脱繁琐易碎的NodeJS环境,可以让生产率大幅度提升!
举个例子,某团队10个人,使用某框架来开发业务,每个人都在本地搭建一次环境,消耗很多时间,还经常升级坏掉。然后来了新人,再次重复这个过程。在后续多少年的维护过程里面,N次重复这种恶心的环境配置问题。如果把这些破事移到云端,最多用一个人批量维护就够了,其他成员只要专注业务实现就完事了。
有了这种东西,你机器上可以什么都不装,只有一个浏览器,无论你在蹲坑、在车站、在机场,只要有网络,打开就可以撸码。
你想跑别人的demo也很爽,只要贴链接就好了,不需要同步别人的环境。
这种效率的提升和分享的便捷,是无与伦比的。
英文原文在此:https://blog.angular.io/run-angular-cli-repos-directly-in-your-browser-41332fd80901
How much trouble is it to change from Angular 1 to Angular 5?
以下是 Aaron Martin-Colby 在 Quora 上的回答。 转过来的原因是:这个问题问的人很多,Aaron 回答阅读量最高,5.9K ,点赞数也最高。
A lot.
The Angular team initially hoped to provide tools to aid in the transition from AngularJS to Angular, but that never came to fruition. You are on your own, where basically you have to map your stuff over.
The more inside AngularJS your app was, the easier it should be. But if you were mixing standard JQuery-style DOM interactions with your AngularJS code, your transition is going to be a nightmare. The DOM no longer exists in Angular 2. It is a product. Even worse if you were delivering partially built pages from your middleware, such as .NET, and then building on top of those with AngularJS on the client. That means you will need to move logic from your middleware onto your client. Good luck with that.
Changing from AngularJS to Angular is just as hard as changing to any other framework. For apps that were already modular, it’s easier, but the more monolithic your app gets, the harder the transition. I do not envy your position.
For help with the transition, Rangle has some good videos.
Upgrading Your Angular 1.x App to Angular 2.0
Also
How to Start Using Angular 2.0 with Your Angular 1.0 Code Base
And finally
Upgrading Angular apps using ngUpgrade
You’ll notice how all of those articles are old. Closing in on two years old for the Rangle videos. That’s because upgrading is something that pretty much everyone gave up on while Angular was still officially on beta. Really, the only way forward is a complete, ground-up rewrite. These resources are good for positioning yourself on the scale of difficulty, but the end result is basically the same:
You’re going to be writing a lot of code.
As such, take this opportunity to be sure you want Angular. This moment, this moment of decision, is a moment in which thousands of teams all over the world found themselves starting with the announcement that Angular was going to be an utterly breaking change from AngularJS. It is also the moment where a majority of them made the decision to move to React, which is why React will, within the year, become the most widely deployed front-end toolset in North America and Europe. Angular shot itself in the foot.
I’m not saying you shouldn’t use Angular, I’m just saying that, since the transition is so intensive, that you should not stick with Angular because you think it will save time. It will not. Choose the best framework instead of sticking blindly with Angular.
Aaron 说了一大堆,还给了很多资源链接,他想表达的意思中文简述如下:
整体表达的意思是:从 Angular 1 升级到 Angular 5 很烦,就是重写。
- 官方曾经搞了一个工具来帮助升级,但是并没有什么卵用。
- 如果你在写 AngularJS 1.x 项目的时候混用了 jQuery,升级就更难了,原因你懂的。
- Angular 团队的升级策略搞死了自己,也直接导致了在欧美的使用量大幅度下降,让 React 有了机会。
- 别老死盯着 Angular 不放了,尝试一下其它框架吧。
原文在此:https://www.quora.com/How-much-trouble-is-it-to-change-from-Angular-1-to-Angular-5
Is YouTube a single page application?
以下是 Aaron Martin-Colby 在 Quora 上的回答。
Nope. Most of YouTube is a Python MVC application. Behind the scenes, they are transpiling Python to Go for greater performance, and on the front-end YouTube is one of the few major websites using Polymer. But it still loads individual pages, thus, it is not a SPA.
意译如下:不是。YouTube大部分是基于Python的MVC应用。他们在后台做了一些猥琐的事情,把Python转换成了Go语言,以便获得更高的性能。前端方面,他们使用了Polymer,在主流的站点里面,比较罕见。但是,在加载的时候,仍然会加载单独的页面,所以,它不是SPA。
备注:Polymer是Google的另一款前端框架,出来的时间比较久了,官方站点在这里: https://www.polymer-project.org/
原文在此:https://www.quora.com/Is-YouTube-a-single-page-application
这是 Aaron Martin 在 Quora 上的回答,转过来的原因是:他觉得这个问题比较喜感。。。
Hahaha! What?! Um, you don’t? I don’t even know how to answer this. You have got a LOT of work ahead of you if you’re trying to transition a React application over the Angular. If your app is of any significant size, even if you worked 16 hour days, you would need more than a month to transition and test. React and Angular’s interfaces are entirely different. They interact with you and with themselves differently. They also have different best practices. You need a complete re-architecture.
原文在此:https://www.quora.com/How-do-I-switch-from-React-to-Angular-5-in-a-month