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't ideal for how we want to work but we'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'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?
The best line of code is one that doesn't get written.<p>The first question you need to ask is <i>How important is this, really?</i> It's not a matter of whether Angular is "ideal", 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'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't being spent creating new features or new products, that aren'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's really limiting the company'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.
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'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.