TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do you switch frameworks when you have a large codebase?

3 点作者 benjaminjosephw大约 8 年前
I recently got a job at a company that has a very large Angular codebase. The company has a great engineering team and is trying to work on improving the design and structure of the code. The general opinion seems to be that Angular isn&#x27;t ideal for how we want to work but we&#x27;re so invested in it at this point that any move away would be painful and could be very costly. Stopping progress for a full-scale re-write would never be an option but I&#x27;m struggling to see how we can make gradual changes.<p>Has anyone had any experiences of transitioning a large clientside application to use a significantly different framework or design? How did you handle it?

2 条评论

beat大约 8 年前
The best line of code is one that doesn&#x27;t get written.<p>The first question you need to ask is <i>How important is this, really?</i> It&#x27;s not a matter of whether Angular is &quot;ideal&quot;, but whether Angular is <i>tolerable</i>. Is Angular actually <i>preventing</i> the team from implementing new features? Is it the primary source (or a primary source) of bugs? Do you have to do complicated workarounds to get real work done within the Angular framework?<p><i>What problem are you trying to solve?</i><p>Keep in mind that every line of code you write that doesn&#x27;t directly increase the value of the company is an opportunity cost. The man-months of work involved in switching frameworks are man-months that aren&#x27;t being spent creating new features or new products, that aren&#x27;t fixing known bugs, etc. Moreover, it introduces risk - what if the engineering effort fails to produce something that a: works, and b: is substantially better than the existing Angular code?<p>If it is truly important, if it&#x27;s really limiting the company&#x27;s bottom line or the stability of the engineering team (which is just another way of saying bottom line), then talk about how to get from A to B. But first, decide just how important this really is.
imaginenore大约 8 年前
Start writing new features with the new framework. Rewrite the most used parts of the old one, as much as you can.<p>You will end up with a codebase with two frameworks. It&#x27;s not the end of the world.<p>When we faced this issue, we did a complete rewrite. It actually reduced the amount of code and made everything nicer, legacy code is often full of hacks and undocumented nonsense.