Misko Hevery's Journey From Angular to Qwik

2023-07-15 12:51:3648
切换 - 音频
00:00:00 / 00:00:00
声音简介

um my first child was on its way


嗯...开发AngularJS那时我的第一个孩子即将出生


and so it was about a


大约在他


you know half a year before he was born


出生前半年的时候


and I remember saying I need to quickly finish this


我意识到我需要尽快完成一项工作


so that you know it's done before he's born


让它在他出生前完成


um turns out software doesn't work that way right like


嗯...但是软件开发并不是这样的


software is something


软件开发是这样的


you keep on working on for a long time


它需要长时间的不断迭代和开发


and so my older kid is now 12


现在我的大儿子也已经12岁了


so


所以


that means I've been working on Angular for about 13 years


这意味着我已经为Angular上工作了将近13年


13 years is a super super long time


13年实在是非常非常长的一段时间了


you know and after 13 years


你也知道这13年来


you want to try new things


我也想尝试一些新的东西


and so about three years ago at NGConf I gave a


所以,大约三年前的NGConf大会上


keynote and in the keynote I was talking about like


我发表了一次主题演讲


how could we build applications different right


讨论了如何以不同的方式构建应用程序


if you go back in time like I think


回首过往,我认为


AngularJS kind of revolutionized the way we build


AngularJS彻底改变了我们构建


web applications right


Web应用程序的方式


because before that


因为在NG之前


we had things like jQuery


我们使用的是诸如jQuery之类的库


which was in itself pretty amazing


当然jQuery也非常出色(场面话,别当真)


but it didn't really


但它并没有


give a cohesive way for applications to be built right


为应用程序提供一个统一的构建方式


AngularJS kind of


AngularJS的出现


kind of started that


改变了这一点


and there was lots of derivative frameworks right


后来许多派生框架也都“一直在模仿“(但从未被超越)


of React being the most popular


比如:React、Vue、Svelte等


Vue, Svelte and so on and so forth


很多十分流行的框架(都是跟随我的脚本)


that all of these basically are taking the same


这些框架基本上都是在借鉴


idea of AngularJS


AngularJS的思想


and kind of improving


并进行


the DX(Develop Experinece) or tooling or sort of things of that sort right


开发体验和工具等方面的改进和优化


and so after um


经过了


12 years of working on something


12年的开发同一个作品


you know I wanted to try something new


你也知道,我也渴望尝试一些新的东西


there was a big question of what I should build


但是问题是我该搞点儿


anything right


啥呢


or maybe I should just do something else


或许应该去做一些不一样的东西


and I've definitely had a


为此,我一度


many months of like going back and forth


徘徊了好几个月


uh and in the end I kind of realized that the world needs a


额...最终我意识到业界需要


kind of a new framework that


一种注重性能的


really is about the performance right


新框架


because we have done


虽然我们


wonderful job improving on the double per experience


在用户体验方面取得了很大的进步


but if you look at existing state of the world


但你会发现业界的现状是


fast websites are kind of hard to find


快速秒开的网站依然很难被找到


and when you kind of dig into it


当你深究之后


you realize that the problem is always the same


你会发现问题的根源都是一样的


there's just too much JavaScript executed on the


那就是在启动应用程序时


startup of the application


依然执行了大量JavaScript代码


and so the focus for me became like


因此,对我来说,重点是


how could I lower the amount of JavaScript


如何减少JavaScript的使用量


like what kind of tricks we can do right


不管采取什么样的技巧都可以


and so PartyTown is one answer


所以,PartyTown(一个基于Web Worker的js多线程思路的库)是一种解法


and Qwik is the other answer


Qwik是另一种解法


and I really wanted to make sure that


我真的希望确保


whenever I'm going to work on something


我所做的工作不与其他框架竞争


I'm not competing on the same


我不想在某种程度上再跟


set of things like the rest of the frameworks


其他那些框架去“卷”


I don't want to compete on the DX like


我不想和那些框架在开发体验上去竞争


there's already lots of choices out there


毕竟对开发者用户而言已经有很多选择了


and having a get another


虽然多一种选择


choice in developer experience would be nice


对开发体验来说也挺不错的


but it's not really game changing right


但那并没有做出什么突破性的改变


and so I wanted to make sure that


因此,我希望确保


if I work on something


我所做的工作


it is going to be kind of game changing right


具有划时代的意义


and so the thing that Qwik focuses on is


好在Qwik的重点是


extreme fine-grained lazy loading right


极致的细粒度懒加载


how do I make sure


即:如何确保


that I don't have to download any JavaScript


在加载网站时


to get the website up and running right


不需要下载任何JavaScript


and this is in a stark contrast


与现有网站


into existing websites where like


形成鲜明对比的是


the amount of JavaScrip to get the side going


它们启动需要下载大量的JavaScript代码


is insane


这导致了


and that actually results in the really bad performance


非常炸裂且糟糕的性能


in terms of like a special


尤其是


and mobile devices


在移动设备上


it's not unheard of


有些网站


for a website to take 30 seconds to come up


在开始交互之前


before it's interactive


甚至需要等待30秒


right and so the question for me was: how can we get


因此,对我来说,问题是:如何在


even on a slow mobile device


即使是较慢的移动设备上


how can we get a side up and running


迅速启动网站


and so this is kind of why


因此,在经过了


after 13 years of working on an Angular


13年的Angular开发后


I kind of realized that


我意识到


you know Angular is just too big


Angular实在是太庞大了


like it's not really possible to


几乎不可能


move big pieces over it around


移动大块的代码


because any such


因为任何这样的


big movement would create


大型变动都会给客户带来


a breaking change for the customers right


破坏性的变化


and


事实上


most of these customers are in the state of mind where


大多数客户更关心是确保产品的推进状态


they need to make sure that they can deliver things


能够正常交付


rather than


而不是


doing big huge reverites or anything of that sort


进行大规模的重写或类似的操作


and so this is kind of where


因此,是时候做个了断了


I kind of decided that like you know what


我决定


I think Angular is in its teenage years


在Angular已经进入了青少年时期


it's all grown up


而它也已然成熟


it's time for it to kind of move out of the house


是时候


right


离开了


and you know I don't need to really uh be there for it


我也不需要再对它进行介入了


and so I started


然后,我开始


exploring different


探索不同


opportunities


的机会


and the opportunity with Builder.io came out


与Builder.io这家公司


where there was a good mixture of


结合起来的契机是因为


what Builder.io does as a company focuses on


Builder.io这家公司专注于


e-commerce websites


电子商务网站


but at the same time


并且与此同时


we can provide


我可以提供


open source solution


开源解决方案


to make these e-commerce websites faster


来帮助这些电子商务网站提升性能


right so it's a good combination of


所以,这是个不错的结合


of ulturistic open source softer that I can share


既可以分享具有前瞻性的开源软件


and at the same time there are real um


更不错的是,同时还可以为有真实需求的


companies which are really going to pay real money


公司获得付费合作机会


to kind of help to solve their problem


来帮助它们解决问题


and so that's where I ended up


所以,这就是我离开Angular之后的选择。





用户评论

表情0/300
喵,没有找到相关结果~
暂时没有评论,下载喜马拉雅与主播互动