Refactor or not? Decision No. 1 when porting apps to the cloud

Should you lift and shift, partially refactor, or completely refactor your apps when porting to the cloud? Here are the pros and cons

moving van

Right now, thousands of applications are being ported to the cloud, and enterprises are faced with making some quick decisions about how to treat each application.

With thousands of apps to port, modifying each one is a daunting task. However, moving applications without modification could mean that you're not taking advantage of the features of cloud-based platforms.    

The options when migrating applications include:

  • A direct port without code modification, aka lift and shift.
  • A partial complete refactoring, to customize the applications for the cloud platform.
  • A complete refactoring, to customize the applications for the cloud and rework other functionality.

A partial refactoring modifies only specific portions of the application to take advantage of the cloud platform, whereas a complete refactoring changes most of the application.

Lift-and-shift pros and cons

The pros of a lift-and-shift approach are:

  • Minimal work required to move application.
  • Faster migration and deployment.

The cons are:

  • Typically does not take advantage of cloud-native features of the platform.
  • May cost more to operate in a cloud.

Partial-refactor pros and cons

The pros of a partial-refactor approach are:

  • Only parts of the application modified.
  • Faster migration and deployment than complete refactoring.

The cons are:

  • Only takes advantage of some cloud features of the platform.
  • May cost more to operate in a cloud.

Complete-refactor pros and cons

The pros of a complete-refactor approach are:

  • Applications typically perform better.
  • Applications can be optimized to operate at lower costs

The cons are:

  • Much higher cost because you're changing a large portion of the application.
  • Slower time to deployment.

Examples of applications that are ideal for lift-and-shift are those that use a well-defined architecture, where the data is coupled to the application logic, and thus is difficult to separate. In such cases, the cost of modifying or refactoring the application would be prohibitive. If the application runs well on the cloud, there is no compelling reason to refactor the application.

However, there are some applications that are business-critical but also poorly designed. Moving them to the cloud without refactoring means inefficient use of cloud resources, leading to a much higher public cloud bill, and perhaps to performance or stability problems. In this case, given the importance of the application, you can justify those cost to rewrite most of the application to take full advantage of the cloud platform. Or even do a complete refactor.

What's the best approach? That depends on your application and business objectives for that application. I suggest you get good at analyzing these applications now.

Copyright © 2015 IDG Communications, Inc.