AngularJS 1.4 -->Angular 9 迁移与 bigbang 重写 [英] AngularJS 1.4 --> Angular 9 migration vs bigbang rewrite

查看:22
本文介绍了AngularJS 1.4 -->Angular 9 迁移与 bigbang 重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定完全重写我正在处理的大型应用程序,因为它在 AngularJS 1.4 中.我转移了大部分 HTML 和 CSS 文件,现在准备创建 TypeScript 文件.

I have decided to do a complete rewrite of the large scale application that I am working on since it is in AngularJS 1.4. I transferred over most of my HTML and CSS files and am now ready to create the TypeScript files.

我是否需要为 1.4 版本的每个 JavaScript 文件创建一个 TypeScript 文件,或者 TypeScript 文件会更少?起初,我假设我需要与 JavaScript 相同数量的 TypeScript 文件.但是在研究它之后,我发现很多地方都说使应用程序的每一页都成为一个组件".所以这让我觉得如果我的应用程序总共有 5 个页面,那么我总共只需要 5 个 TypeScript 文件.原始文件包含约 80 个 JavaScript 文件.

Do I need to create a TypeScript file for every JavaScript file that is in the 1.4 version, or will there be fewer TypeScript files? At first, I assumed I would need the same amount of TypeScript files as there are JavaScript. But after researching it I find a lot of places that say "Make each page of your application one component". So this makes me think if I have 5 total pages on my application then I will only need 5 total TypeScript files. The original contains ~80 JavaScript files.

推荐答案

你的计划被称为大爆炸重写",这是很常见的,也是一个坏主意.

Your plan is called the "big bang rewrite", it's very common, and it's a bad idea.

在大多数情况下,大爆炸方法会赢得争论.

In most cases, it’s the Big Bang approach that wins the argument.

但是,通过将其发布为 Big Bang 版本,您最大限度地增加了在结束时落后于计划的机会,因此您也最大限度地减少了没有花足够时间准备的机会.这对您和您的客户来说都是一段糟糕的时光.

But by making it a Big Bang release, you’ve maximized the chances that you’ll be behind schedule when you get to the end, and you’ve therefore maximized the chances that you won’t spend enough time preparing. This results in a bad time for both you and your customers.

不幸的是,也许由于人性中的某些内在因素,这种情况对于 Big Rewrite 项目来说是陈词滥调.

Unfortunately, perhaps due to something intrinsic in human nature, this scenario is a cliche for Big Rewrite projects.

乍得福勒:生活大爆炸

成功升级的关键之一是逐步升级,通过在同一个应用程序中并排运行两个框架,并将 AngularJS 组件一一移植到 Angular.这使得在不中断其他业务的情况下升级甚至大型复杂的应用程序成为可能,因为工作可以协作完成并分布在一段时间内.Angular 中的 upgrade 模块旨在使增量升级无缝.

One of the keys to a successful upgrade is to do it incrementally, by running the two frameworks side by side in the same application, and porting AngularJS components to Angular one by one. This makes it possible to upgrade even large and complex applications without disrupting other business, because the work can be done collaboratively and spread over a period of time. The upgrade module in Angular has been designed to make incremental upgrading seamless.

有关详细信息,请参阅

这篇关于AngularJS 1.4 -->Angular 9 迁移与 bigbang 重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆